[gdal-dev] Question about ogr2ogr and geojson url

Maxime Demers burton449geo at gmail.com
Wed Sep 16 11:15:17 PDT 2015


Hello,

I am using nodejs on localhost to serve dynamic geojson at urls such
http://localhost:3000/711/points.geojson

The way I am serving the geojson from the server is like this:

                var geojson =
{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"LineString","coordinates":[[-7576433,6176485],[-7307069,6261483]]}}],"crs":{"type":"link","properties":{"href":"
http://spatialreference.org/ref/sr-org/6864/proj4/","type":"proj4"}}}

                res.writeHead(200, {'Content-Type': 'application/json'});
                res.end(JSON.stringify(geojson));


However, I have Failure Unable to open datasource with drivers... when
trying to convert the geojson to shapefile from the url.

ogr2ogr output.shp http://localhost:3000/711/points.geojson

Can ogr2ogr convert dynamic geojson like I am trying to do, or it has to be
a static geojson file?

Thank you!

Max Demars

-- 
Stack Overflow: http://stackoverflow.com/users/1914034/burton449
GIS Overflow: http://gis.stackexchange.com/users/14426/burton449
LastFm: http://www.lastfm.fr/user/burton449
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150916/2167483b/attachment-0001.html>


More information about the gdal-dev mailing list