[gdal-dev] Define Virtual Format for a remote GeoJSON file

aborruso aborruso at gmail.com
Wed Nov 19 05:22:02 PST 2014


Hi Even,
thank you.


Even Rouault-2 wrote
> Yes, you can use the URL as the datasource name expected by the VRT
> format.

I have tried with:
<OGRVRTDataSource>
	<OGRVRTLayer name="OGRGeoJSON">
	
<SrcDataSource>http://www.provincia.caltanissetta.sitr.it/ArcGIS/rest/services/Immobili/MapServer/0/query?where=objectid+%3D+objectid&outfields=*&f=json</SrcDataSource>
		<LayerSRS>EPSG:3004</LayerSRS>
		<SrcLayer>OGRGeoJSON</SrcLayer> 
	</OGRVRTLayer>
</OGRVRTDataSource>

But if I run "ogrinfo -ro my_virtual_format_file.vrt" I have:
INFO: Open of `my_virtual_format_file.vrt'
      using driver `VRT' successful.
1: OGRGeoJSONERROR 4: Failed to read GeoJSON data

If I run:
ogrinfo -ro 
"http://www.provincia.caltanissetta.sitr.it/ArcGIS/rest/services/Immobili/MapServer/0/query?where=objectid+%3D+objectid&outfields=*&f=json"
OGRGeoJSON -summary

It's all OK.

What's wrong in my VRT definition?

Thank you again,

a




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Define-Virtual-Format-for-a-remote-GeoJSON-file-tp5173766p5173799.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list