Database function to get a part of a layer and java implementation of SDK

ApliesAplies Global Mapper UserPosts: 35Trusted User
edited May 2013 in SDK
Hello,

I have two questions about the future developments of the SDK.

Have you planned, in the future, to implement the SDK with Java?
Is there a possibility to have a function that get a part of a layer from a spatial database (instead of the entire layer)?

Best regards,

Tristan

Comments

  • ApliesAplies Global Mapper User Posts: 35Trusted User
    edited May 2013
    I have another question but not for the future developments.

    Can I do multi-threading with database functions? The objective is to retrieve multiple layers simultaneously.

    Best regards,

    Tristan
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited May 2013
    Tristan,

    You can call the Global Mapper SDK from Java applications using JNI. We just don't have any samples of that, but it has been done as the SDK is just a standard Windows DLL interface so anything can call it.

    You could in theory span a separate threat for each database layer to load and load them separately. The Global Mapper SDK isn't completely thread-safe internally, but I think that should be safe (or we could make it so).

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited May 2013
    Tristan,

    I forgot to mention, for a database layer, there is a method to load just some bounding box of a layer by passing a bounding box in the extra parameters of the GM_LoadLayerListEx function. Is something like that what you are after?

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • ApliesAplies Global Mapper User Posts: 35Trusted User
    edited May 2013
    Indeed, I search something like that. I will test it.

    Thanks,

    Tristan
  • ApliesAplies Global Mapper User Posts: 35Trusted User
    edited May 2013
    Hum... I said I will test it but i don't know how :). I pass already the name of the table in the extra parameter and I don't know how to pass the bounding box.

    Tristan
  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,264
    edited May 2013
    Hi Tristan,
    Aplies wrote: »
    Hum... I said I will test it but i don't know how :). I pass already the name of the table in the extra parameter and I don't know how to pass the bounding box.

    You can pass both the table name and bounding box in the extra parameter string. The format is:

    <table>,<minX>,<minY>,<maxX>,<maxY>

    The values are separated by commas. The bounds are assumed to be in the same projection as the table being loaded. If the projection has an angular unit, the values must be in decimal degrees. For example, loading a table called ROADS with data in a geodetic projection (WGS84, for example), you could use the following:

    ROADS,-70.5,40.0,-65.0,45.0

    I hope this helps.

    Cheers,

    Bob
Sign In or Register to comment.