Map Reprojection and GPS Tracking

TatukGIS Internet Server Sample

This Internet Server sample demonstrates the implementation of two areas of functionality:

  1. Tracking of WGS84 GPS points on a projected map. The x,y point coordinate data is converted on-the-fly from the Geodetic (unprojected) coordinate system (which is the same as WGS 84 coordinate system used by typical GPS devices) into the coordinate system in which the vector map layers are presented. The locations of the tracked vehicles are represented by the moving symbols (two airplanes). If the tracking is focused on one of the two airplanes, the application zooms in closer and automatically scrolls the map to follow that airplane after each movement. The application is set up to update the positions of the tracked objects every three seconds.
  2. On-the-fly reprojection of vector map layers. The map data set in this sample, totaling 260 MB, is converted from the Geodetic (unprojected) coordinate system to any of the projected coordinate systems defined by the 25 projections in the drop down list below the map window. (The drop down list becomes visible when the tracking is paused). The underlying map layers are not altered, as only the presentation of the map layers is converted to the selected projection each time the screen is refreshed. The presentation of the tracking points is also converted to the selected coordinate system so that the tracking positions appear properly on the map presentation.

Use the Pause Tracking button to temporarily stop the tracking in order to select a different projection. After selecting a new projection from the drop down list, wait for the Internet Server product to perform the conversion and render the reprojected map view. Notice how the map visibly changes shape to reflect the projection and how quickly each conversion calculation is performed despite the substantial size of the map data being converted. Still, the sample will run slightly faster when the map is presented in the Geodetic (unprojected) coordinate system of the base data because this eliminates the need to perform a conversion upon each screen refresh.

The ASP.NET source code for this sample may be reviewed by clicking on this link.

Acknowledgment: The map layers in this sample containing the road, street, rail, and ferry line data are provided by the company AND Automotive Navigation Data (www.and.com). AND, based on the Netherlands, is a leading supplier of vector map navigation data (addresses, roads, and routes) for all regions of the world. The other map layers presented in this sample – showing rivers, lakes, forested areas, etc. – are less precise than the AND map data and sometimes do not match perfectly at close zoom levels.