1

I cant' make something like that work:

<OGRVRTDataSource>
    <OGRVRTLayer name="adresses-33">
        <SrcDataSource>/vsigzip//vsicurl/https://adresse.data.gouv.fr/data/ban/adresses/latest/csv/adresses-33.csv</SrcDataSource>
        <GeometryType>wkbPoint</GeometryType>
        <LayerSRS>EPSG:4326</LayerSRS>
    </OGRVRTLayer>
</OGRVRTDataSource>

Am I missing something or it's simply not possible to use VSI syntax as datasource in *.vrt files?

2

You need to change it to the following

<OGRVRTDataSource>
    <OGRVRTLayer name="adresses-33">
        <SrcDataSource>/vsigzip//vsicurl/https://adresse.data.gouv.fr/data/ban/adresses/latest/csv/adresses-33.csv.gz</SrcDataSource>
        <GeometryType>wkbPoint</GeometryType>
        <LayerSRS>EPSG:4326</LayerSRS>
        <GeometryField encoding="PointFromColumns" x="lon" y="lat"/>
    </OGRVRTLayer>
</OGRVRTDataSource>

Considering a file debug.vrt with the above content, it's working using below command

ogrinfo -so -al debug.vrt

The changes made are

1
  • Oh thanks Thomas, that was just a typo with the gz extension -_-. For the GeometryField, don't worry, I just partially copied my file here.
    – Guts
    Aug 31 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.