Page 1 of 1

Transformation of Coordinate Formats

Posted: Wed Dec 16, 2015 9:58 am
by Bernd Welter
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).
  • 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
Let us know which libraries you already use - whether you are dealing with JacaScript frameworks such as OpenLayers or Leaflet or with "backend" languages such as C# or Java.

Best regards Bernd

Re: Transformation of Coordinate Formats

Posted: Thu Apr 06, 2017 11:18 am
by MISTERX
High Bernd

late but hopefully not to late:

if you have a look to PTV-xAjax framework you'll find a bunch of methods doing conversions from and to various formats. But this will not help for applications outside the map.

Due to this we have build our own class with various methods for generic purposes like format conversions. Please keep in mind that we are working with ABAP (SAP).

Using functions in spatial extensions or even spatial RDBMS is only sometimes possible.

IMHO it would be a big benefit when e.g. xLocate is able to provide such services. Is there an official statement from PTV (aka PM)?

Re: Transformation of Coordinate Formats

Posted: Thu Apr 06, 2017 11:28 am
by Bernd Welter
Hello MisterX,

of course it would be a benefit, but I doubt in the importance. As I already said:
Most environments and frameworks offer transformation so PTV will focus on our main topics.
Anyhow: I forwarded your recommendation to PM (Daniel) and DEV (Haba) though I'm quite sure they will confirm my statement.

Best regards
Bernd

PS:
Doctor: "You should quit smoking."
Patient: "I'm 55 years old - it is too late for me to quit."
Doctor: "It is never too late to quit."
Patient: "Then there's no need to hurry."

Re: Transformation of Coordinate Formats

Posted: Tue Jun 19, 2018 7:18 am
by Bernd Welter
By the way: there's also a description of how to transform coordinates from MERCATOR to OG_GEODECIMAL and vice versa:
CoordinateFormatConversion.PNG
Feel free to use these terms to transform coordinates on client side.
Best regards,
Bernd