NSDK_CoordinateSystem

enum NSDK_CoordinateSystem {}

Enumeration of the coordinate formats used and supported by the NavigationSDK. The values can be used for coordinate transformations between different formats. The NavigationSDKs method [NSDK_UIMapView transformCoordinatesWithSourceFormat:] is the method to use for this purpose.

Geodez

The Geodez-format is nothing else than the well known WGS84 coordinate format. For further explanation of this format please consult WGS84.

Mercator

The PTV Mercator projection is a Spherical Mercator projection. This term is used by the GIS community to refer to the fact that Spherical Mercator uses the WGS 84 datum, but a Mercator projection which treats the earth as a sphere, rather than a projection which treats the earth as an ellipsoid. For more information about sperical mercator see Sperical Mercator.

The PTV Mercator assumes an earth radius of 6371km. Therefore a simple method to convert from WGS84 and PTV Mercator would be:

     //LatLonToPtvMercator
     double x = 6371000.0 * longitude * Math.PI / 180.0;
     double y = 6371000.0 * Math.Log(Math.Tan(Math.PI / 4.0 + latitude * Math.PI / 360.0));
 

PTV Mercator vs. Google Mercator
PTV and Google both use the same Spherical Mercator projection. Consult Google Maps deconstructed. The formula for calculating y from the latitude looks different, but it is the same because you can write log(tan(pi/4 + lat/2)) as 1/2log(1+sin(lat)/(1-sin(lat)). The only difference is the underlying earth radius. PTV (and ESRI SRID 53004) use 6371 km (the mean between major and minor axis of WGS 84), while Google, Microsoft, OSM and Yahoo use 6378137 meters (the major axis of WGS 84). Looking at the formula above, we see that the conversion between PTV and Google is quite simple.

     //PtvToGoogle
     double googleX = (6378137.0 / 6371000.0) * ptvX;
     double googleY = (6378137.0 / 6371000.0) * ptvY;
 

Pixel

The Pixel coordinate format is defined as the number of pixels measured from the lower left corner of the screen.

@author PTV AG Karlsruhe

  • PTV Mercator

    Declaration

    Objective-C

    NSDK_CS_MERCATOR = 0
  • Geodecimal (value * 1000000) - WGS84

    Declaration

    Objective-C

    NSDK_CS_GEODEZ = 2
  • Pixel of rendered map (depends on the corresponding map view)

    Declaration

    Objective-C

    NSDK_CS_PIXEL = 3
  • Latitude (X) and length in meter (Y)

    Declaration

    Objective-C

    NSDK_CS_LATNMETER = 4