<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Andrea,<br>
<br>
The VRT is an XML format and hence you need to ensure the content is
XML compliant: your URL contained `&` characters that need to be
escaped to `&`. The following VRT works for me:<br>
<br>
<OGRVRTDataSource><br>
<OGRVRTLayer name="OGRGeoJSON"><br>
<SrcDataSource><a class="moz-txt-link-freetext" href="http://www.provincia.caltanissetta.sitr.it/ArcGIS/rest/services/Immobili/MapServer/0/query?where=objectid+%3D+objectid&outfields=*&f=json">http://www.provincia.caltanissetta.sitr.it/ArcGIS/rest/services/Immobili/MapServer/0/query?where=objectid+%3D+objectid&outfields=*&f=json</a></SrcDataSource><br>
<LayerSRS>EPSG:3004</LayerSRS><br>
<SrcLayer>OGRGeoJSON</SrcLayer><br>
</OGRVRTLayer><br>
</OGRVRTDataSource><br>
<br>
Best regards,<br>
<br>
Homme<br>
<br>
On 19/11/14 13:22, aborruso wrote:<br>
<span style="white-space: pre;">> Hi Even,<br>
> thank you.<br>
><br>
><br>
> Even Rouault-2 wrote<br>
>> Yes, you can use the URL as the datasource name expected
by the VRT<br>
>> format.<br>
><br>
> I have tried with:<br>
> <OGRVRTDataSource><br>
> <OGRVRTLayer name="OGRGeoJSON"><br>
> <br>
>
<SrcDataSource><a class="moz-txt-link-freetext" href="http://www.provincia.caltanissetta.sitr.it/ArcGIS/rest/services/Immobili/MapServer/0/query?where=objectid+%3D+objectid&outfields=*&f=json">http://www.provincia.caltanissetta.sitr.it/ArcGIS/rest/services/Immobili/MapServer/0/query?where=objectid+%3D+objectid&outfields=*&f=json</a></SrcDataSource><br>
> <LayerSRS>EPSG:3004</LayerSRS><br>
> <SrcLayer>OGRGeoJSON</SrcLayer> <br>
> </OGRVRTLayer><br>
> </OGRVRTDataSource><br>
><br>
> But if I run "ogrinfo -ro my_virtual_format_file.vrt" I have:<br>
> INFO: Open of `my_virtual_format_file.vrt'<br>
> using driver `VRT' successful.<br>
> 1: OGRGeoJSONERROR 4: Failed to read GeoJSON data<br>
><br>
> If I run:<br>
> ogrinfo -ro <br>
>
<a class="moz-txt-link-rfc2396E" href="http://www.provincia.caltanissetta.sitr.it/ArcGIS/rest/services/Immobili/MapServer/0/query?where=objectid+%3D+objectid&outfields=*&f=json">"http://www.provincia.caltanissetta.sitr.it/ArcGIS/rest/services/Immobili/MapServer/0/query?where=objectid+%3D+objectid&outfields=*&f=json"</a><br>
> OGRGeoJSON -summary<br>
><br>
> It's all OK.<br>
><br>
> What's wrong in my VRT definition?<br>
><br>
> Thank you again,<br>
><br>
> a<br>
><br>
><br>
><br>
><br>
> --<br>
> View this message in context:
<a class="moz-txt-link-freetext" href="http://osgeo-org.1560.x6.nabble.com/Define-Virtual-Format-for-a-remote-GeoJSON-file-tp5173766p5173799.html">http://osgeo-org.1560.x6.nabble.com/Define-Virtual-Format-for-a-remote-GeoJSON-file-tp5173766p5173799.html</a><br>
> Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
> _______________________________________________<br>
> gdal-dev mailing list<br>
> <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
> <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></span><br>
<br>
<br>
</body>
</html>