Skip to main content
1 of 2
dkastl
  • 4.8k
  • 18
  • 21

Maybe another suitable format could be GeoJSON. PostGIS can return edge geometries in GeoJSON format with ST_AsGeoJSON, so all you need to do is wrapping all edges into a GeoJSON "FeatureCollection".

You can find a simple example in the pgRouting workshop: http://workshop.pgrouting.org/chapters/php_server.html#geojson-output

You can create KML, GML, GPX or other formats in a similar way, but GeoJSON is probably the easiest one.

dkastl
  • 4.8k
  • 18
  • 21