Global Mapper v25.0

ranges rings according to database

ravinus
ravinus Global Mapper User
edited June 2010 in Raster Data
Hello,
i have an access database with locations and ranges. is there any possibility with global mapper to display the locations with there names and the associated range rings (by a script for example).

Thanks

Bruno

Comments

  • global_mapper
    global_mapper Administrator
    edited December 2009
    Bruno,

    If you have all of the range center points loaded, you can simply select them all with the Digitizer Tool, then right-click and select the option to create range rings (or choose the toolbar button). You will be prompted to create range rings centered on the selected points. You can then setup the the ranges to use.

    You can't do this via a script, but for more advanced functionality you could use the Global Mapper SDK to write a program to do this.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmappersoftware.com
  • hungqnx
    hungqnx Global Mapper User
    edited June 2010
    Could I use the Global Mapper SDK to write a program to do this?. What functions?(for example).
    Thank you very much!
  • global_mapper
    global_mapper Administrator
    edited June 2010
    You could use the SDK to do some of this. You would need to write your own code to get the data from the Access database, then once you have the coordinates of each ring (including the range), you could use the GM_CalcProjectedLocation function in the SDK to calculate a bunch of coordinates at the ring range from the ring center at various bearings to form a ring. Then create an area feature from the ring using GM_AddAreaToVectorLayer (create the vector layer using GM_CreateCustomVectorLayer), then finally export that to a new vector file using GM_ExportVector.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • hungqnx
    hungqnx Global Mapper User
    edited June 2010
    Could you tell me the way to use GM_CalcProjectedLocation function?
    Thanks!
  • global_mapper
    global_mapper Administrator
    edited June 2010
    Here is the declaration for the GM_CalcProjectedLocation function:


    // Calculates the location of a new point projected from a start point along
    // a given bearing.
    GM_DLL_EXPORTED GM_Error_t32 __stdcall GM_CalcProjectedLocation
    (
    double aFromX, // IN: start X/longitude coordinate
    double aFromY, // IN: start Y/latitude coordinate
    double aBearing, // IN: bearing in degrees to project along (0 is north, 90 is east, 180 is south, 270 is west)
    double aDist, // IN: distance to project along bearing in meters
    double* aToX, // OUT: stop X/longitude coordinate
    double* aToY, // OUT: stop Y/latitude coordinate
    boolean aLatLon // IN: TRUE - coordinates are lat/lon, FALSE - coordinates are in the current projection
    );

    So if you wanted to calculate a point directly to the east 100 meters from the lat/lon location 40N 90W, you would call it as follows:

    double theNewLon, theNewLat;
    GM_CalcProjectedLocation( -90.0, 40.0, 90.0, 100.0, &theNewLon, &theNewLat, TRUE );

    To calculate a ring, just repeatedly call this function with bearings from 0 to 360 to get the points around a circle.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com