Andreas. Thanks for your suggestion - I had the feeling it is somewhere there but was unable to find (I am a bit overwhelmed, next time I shall first query wiki and then mailing list.)
Finally I found, that even with Java is the conversion quite complex. But we lowered our expectation for resulting precision (1 m precision is enough for locating traffic information) and are almost complete with implementing XQuery function for this task (few lines of code, mosty just some constants and parameters).
Thanks anyway. I learned again something.
Jan
2011/1/26 Andreas Weiler andreas.weiler@uni-konstanz.de
Hi Jan,
i would suggest using the available java classes in your query. If you can get the source you can just add the java source files into your project and call them within BaseX in a query using the XQuery Java Bindings ( http://docs.basex.org/wiki/Java_Bindings).
That would be the best way.
Kind regards, Andreas
Am 26.01.2011 um 15:32 schrieb Jan Vlčinský (CAD):
Hi I am facing problem, that my XML data have coordinates in system S-JTSK (used a lot for area of Czech Republic) and resulting data must be in WGS84, as they will be used by Google Maps. Be sure, that the conversion is not trivial task (the other way is simpler, but S-JTSK to WGS84 is well known complexity) - so I am not sure, if writing complete conversion code by XQuery function itself is feasible.
I can try do some conversion by other tools before I insert the XML or after I create resulting data - but elegant solution would accomplish this by XQuery.
I know, that there are Java libs available for this (like GeoTools - http://geotools.org/).
My question is:
- is there any option to add more XQuery methods/functions written in
Java to BaseX? Like the conversion function for coordinates? - It would go: add some JAR into class path - register it somehow and then be able to use it. - optionally writing some interface, which would make the jar available to BaseX XQuery processing.
Any ideas what to do with my crazy wishes?
With best regards
Jan _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk