[gdal-dev] issue with Virtual Format and a remote CSV service
Even Rouault
even.rouault at spatialys.com
Tue Mar 24 14:22:25 PDT 2015
Le mardi 24 mars 2015 22:16:30, Martin Ouellet a écrit :
> Hi all,
>
> I have a solr service which provide a valid csv response like this:
>
> PHOTO_LATITUDE,PHOTO_LONGITUDE,ID
> 49.482333,-82.580556,A21524-047-1970-0
> 49.485278,-82.640444,A21524-048-1970-0
> 49.487583,-82.701194,A21524-049-1970-0
> 49.490444,-82.761111,A21524-050-1970-0
> 49.490333,-82.824333,A21524-051-1970-0
>
> my vrt is:
>
> <OGRVRTDataSource>
> <OGRVRTLayer name="coord">
> <SrcDataSource>http://solr/select?q=*%3A*&fl=PHOTO_LATITUDE%2CPHOTO_LONGITU
> DE%2CID&wt=csv</SrcDataSource> <SrcLayer>coord</SrcLayer>
> <GeometryType>wkbPoint</GeometryType>
> <LayerSRS>WGS84</LayerSRS>
> <GeometryField encoding="PointFromColumns" x="PHOTO_LONGITUDE"
> y="PHOTO_LATITUDE"/>
> </OGRVRTLayer>
> </OGRVRTDataSource>
>
> I've try to escape the & with & in the url like the suggestions
> here
> <http://osgeo-org.1560.x6.nabble.com/Define-Virtual-Format-for-a-remote-Ge
> oJSON-file-td5173766.html>but in all cases, I still receive this error:
>
> msOGRFileNextShape(): OGR error. Failed to read GeoJSON data
You need to do XML escaping indeed (& --> &) and also prefix the URL by
/vsicurl/ (the GeoJSON driver is the exception in that it tries to interpret
any string by http:// as a potential source for it)
>
> any ideas?
>
> MartinO
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list