Transformation of Coordinate Formats
Posted: Wed Dec 16, 2015 9:58 am
Hello together,
these days a player asked me how to deal with different coordinate formats. He has an old address table with PTV_MERCATOR (aka EPSG:76131) based coordinates (provided by PTV Map&Guide, e.g. Karlsruhe = 937139 / 6270074 ) and wants to go on with the defacto internet standard format also known as OG_GEODECIMAL (EPSG:4326: Karlsruhe = 8.4279 / 49.01318).
Best regards Bernd
these days a player asked me how to deal with different coordinate formats. He has an old address table with PTV_MERCATOR (aka EPSG:76131) based coordinates (provided by PTV Map&Guide, e.g. Karlsruhe = 937139 / 6270074 ) and wants to go on with the defacto internet standard format also known as OG_GEODECIMAL (EPSG:4326: Karlsruhe = 8.4279 / 49.01318).
- Our xServers are able to deal with various standard formats such as PTV_MERCATOR, PTV_GEODECIMAL and OG_DECIMAL. Just use the CallerContextProperty feature to tell the servers which format you want to use (see api doc http://xserver.ptvgroup.com/fileadmin/f ... xtProperty )
- The xServers themselves do not provide a function that receives FORMAT A and returns FORMAT B. This kind of computation should be performed on clientside and requires no access to binary maps or PTV competence. Scan the internet for 3rd party libraries that provide such simple transformations.
- On top of that some databases provide access to generic geometry functions: SPATIAL extensions. These functions not only fullfill the original task - they are very mighty and enable you to perform and include geometry based tasks such as "check whether a coordinate is within a given polygon" as parts of SQL clauses. They also provide various Geometry types such as polygons, points. Look at this example at MS SQL Server: very cool... https://msdn.microsoft.com/en-us/library/ff929109.aspx
Best regards Bernd