WKB to WKT transformation
Posted: Fri Sep 14, 2018 11:47 am
Dear all,
I am currently developing an application for a customer to restore or display routes that have already been calculated.
Therefore, I need to store somehow either WKB, WKT or the plain coordinates. Since storing WKT either than plain coordinates would be quite tricky (huge amount of data), I planned to store WKB.
Storing issue is therefore solved, but unfortunately I cannot convert my stored WKB back to WKT (example WKB is attached) to draw the route in my JavaScript frontend.
Since I could not solve the issue with JavaaScript, I thought about transforming it within my backend written in Java (JTS library). I have tried this with several different routes but always received an "invalid" WKB (not the expected HEX format) which resulted in an IllegalArgumentException.
Is there any possibility to receive a valid WKB in HEX format?
Or does PTV deliver a Java class for the transformation from this WKB I got from the xRoute to a LineString (WKT)?
Many thanks!
Julian Ulonska
I am currently developing an application for a customer to restore or display routes that have already been calculated.
Therefore, I need to store somehow either WKB, WKT or the plain coordinates. Since storing WKT either than plain coordinates would be quite tricky (huge amount of data), I planned to store WKB.
Storing issue is therefore solved, but unfortunately I cannot convert my stored WKB back to WKT (example WKB is attached) to draw the route in my JavaScript frontend.
Since I could not solve the issue with JavaaScript, I thought about transforming it within my backend written in Java (JTS library). I have tried this with several different routes but always received an "invalid" WKB (not the expected HEX format) which resulted in an IllegalArgumentException.
Is there any possibility to receive a valid WKB in HEX format?
Or does PTV deliver a Java class for the transformation from this WKB I got from the xRoute to a LineString (WKT)?
Many thanks!
Julian Ulonska