Universite-Gustave-Eiffel / Tempus

C++ framework to develop multimodal path planning requests
76 stars 13 forks source link

Spatial Reference System ? #12

Closed celiamercier closed 9 years ago

celiamercier commented 9 years ago

Hello again guys, I was wondering how the tempus loader manages the spatial reference system ? I am a little bit lost ... does it convert my OSM data into a specific one ? When I use a database that was imported by your loader into QGIS, the reference system EPSG:2154 is automatically chosen. Actually my problem is that I would like to ask an itinerary to the WPS server directly without using QGIS, but I only have my start and end points into the usual system EPSG:4326 (latitude, longitude). How am I supposed to handle this ? Thanks !

mhugo commented 9 years ago

Hi, The default projection system is 2154 (lambert 93 - for french metropolitan) and is hard coded. That's a known issue (#6). If you want to use another projection system, you would have to replace 2154 by your own in the .sql files (tempus.sql, osm.sql and gtfs.sql if you use public transport data), or wait that I can fix this (don't know when yet). Also, the WPS server uses the "road_node_id_from_coordinates" function declared in tempus.sql to convert X Y coordinates (expressed in ... 2154 then) to node ID. Client-side, if you have coordinates in EPSG:4326, you should convert them into the projection used by the database (using libs like proj4), or modify this "road_node_id_from_coordinates" function in the database.

celiamercier commented 9 years ago

Ok, thank you for answering me so fast.