Global Mapper v25.0

Project of a GIS application using GM sdk

diofantis
diofantis Global Mapper UserTrusted User
edited October 2009 in SDK
Hello all,
in the near future my company may assign me to develop a GIS application.
My proposal was to use the GM sdk (in VB.net 2005 or in the worst case for me in C#) for such development, since it is the only sdk that i have "played" in the past.

The description of the application is pretty simple i believe and should support atleast the following functionality:
- support of S57/SRTM/satelite maps
- standard map functions, such as zoom in/out, pan
- measuring tool (azimuth,range) between two points
- connection with GPS, in order to display the position
- connection with other devices such as AIS and/or Radar.

Since i am new to this kind of development, i would like to ask for your assistance/help in order to help me create the most proper design and finally the correct/professional implementation.

Who knows, this might end up as a guideline for GM sdk.

Thanks in advance,
and i hope for the participation not only of the administrator but from other users with experience of such developments.

Comments

  • diofantis
    diofantis Global Mapper User Trusted User
    edited October 2009
    Starting from the design and having as a reference the GM application and as a goal the low CPU load:

    1. Does GM application uses a backbuffer and then a bitblit function in order to perform the zoom in/out, pan, etc actions?

    2. Does GM application uses directly the form as the map final drawing area or a picture box component? Do you think that there are some advantages in case you use one or the other?

    3. In case a GPS is connected and the application is placed on a platform (car/ship) that it moves, then how the flow goes? The GPS is updating the position with x Hz, (i.e. with 1 Hz). In that scenario the map is refreshed with 1 Hz?

    4. In case a source for tracks is connected (AIS/Radar) and the application should display the tracks, then do you think that the tracks should be inserted on a different custom GM layer? or the tracks should not be incorporated with the map layers at all? (i hope you understand what i mean). Have in mind that if you are close to a port then the AIS system will provide many many tracks.

    Sorry for my bad english.
    Thanks again.
  • global_mapper
    global_mapper Administrator
    edited October 2009
    The Global Mapper SDK should be ideal for this application. The C++ sample application included with the SDK already has much of the functionality that you need regarding map display and zoom in/out, so you would just need to port the portions that you need to VB or C# (or use C++ if possible).

    There are also simple VB.NET and C# sample applications that show how to use the SDK from those environments. Those samples just have simple load and display capabilities.

    The Global Mapper application does use an offscreen bitmap (backbuffer) to improve render speed. When tracking dynamic data like a GPS that changes a lot, the backbuffer just contains the static map data for the current view, then the dynamic data (like GPS location and track) are drawn to the screen buffer after the backbuffer has been BitBlt'd to the screen buffer.

    The GM application draws directly to the client window area and doesn't use a PictureBox. I don't think there would be any noticeable performance differences. The VB.NET sample app draws to a picture box.

    When tracking a GPS you can register a callback function in your application to be called every time a new GPS position is received. This would be an appropriate place to invalidate your window to redraw.

    It would probably be easiest to create a custom map layer for your AIS tracks and render that like a normal layer. You could also draw the tracks yourself rather than using the SDK drawing code, whatever is easiest for you.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • diofantis
    diofantis Global Mapper User Trusted User
    edited October 2009
    Thanks for your quick responce,

    I have downloaded the latest C# sample to use it as a reference. I have converted the sample to VB.net and i am able to do standard actions like zoom in/out, offcenter (in a position defined by a left mouse click).
    The available C# sample does not use a backbuffer(offscreen buffer), am i correct?

    Since yesterday i am trying to implement the following concept, with no luck:
    - the gm_drawlayer function to draw the map on a backbuffer
    - then with the use of bitblt to display the map on the form.

    Please, can someone help me, with these createcompatibledc etc.

    thanks in advance.
  • global_mapper
    global_mapper Administrator
    edited October 2009
    You are correct that the SDK sample applications do not use double-buffering. There is a good article on double-buffering in C# at http://www.codeguru.com/csharp/csharp/cs_graphics/drawing/article.php/c6137/ that I think will be very helpful.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com