[gdal-dev] Possibility to use config options in VRT-files

Pekka Sarkola pekka at gispo.fi
Tue Jun 14 06:19:34 PDT 2022


Hi,

Ok, I understand and agree with this security issue.

However, I still have problems with the WFS service file.

This works perfectly:

    ogrinfo WFS:
https://geodata.tampere.fi/geoserver/wfs?typename=maankaytto:KAAVAYKSIKOT_ALUE_MVIEW
-al -so --config OGR_WFS_PAGING_ALLOWED OFF

Without  OGR_WFS_PAGING_ALLOWED, I got some HTTP 400 errors.

I create WFS Service file (tre_wfs.xml):

<OGRWFSDataSource>
  <URL>
https://geodata.tampere.fi/geoserver/wfs?typename=maankaytto:KAAVAYKSIKOT_ALUE_MVIEW
</URL>
  <PagingAllowed>OFF</PagingAllowed>
</OGRWFSDataSource>


When I run this service file with ogrinfo:

ogrinfo -ro tre_wfs.xml -al -so


I also got those HTTP 400 errors. However, if I add config parameter:

ogrinfo -ro tre_wfs.xml -al -so --config OGR_WFS_PAGING_ALLOWED OFF


It works, I'm confused.

Rgs,

Pekka




ti 14. kesäk. 2022 klo 15.52 Even Rouault (even.rouault at spatialys.com)
kirjoitti:

> Hi,
>
> It is not possible to set configuration options in VRT files. There could
> potentially be security issues in doing so and reading untrusted VRT.
>
> Even
> Le 14/06/2022 à 14:49, Pekka Sarkola a écrit :
>
> Hi!
>
> I had some other problems with the WFS service description file, need to
> check that.
>
> However, in another case I'd like to use GML_ATTRIBUTES_TO_OGR_FIELDS
> -config for WFS service.
>
> Rgs,
>
> Pekka
>
> ti 14. kesäk. 2022 klo 8.58 Rahkonen Jukka (
> jukka.rahkonen at maanmittauslaitos.fi) kirjoitti:
>
>> Hi,
>>
>>
>>
>> Do you need to use just the OGR virtual format
>> https://gdal.org/drivers/vector/vrt.html? The simple WFS service
>> description file https://gdal.org/drivers/vector/wfs.html seems to
>> support an additional PagingAllowed element as immediate children of the
>> OGRWFSDataSource for that purpose.
>>
>>
>>
>> -Jukka Rahkonen-
>>
>>
>>
>> *Lähettäjä:* gdal-dev <gdal-dev-bounces at lists.osgeo.org> *Puolesta *Pekka
>> Sarkola
>> *Lähetetty:* tiistai 14. kesäkuuta 2022 8.34
>> *Vastaanottaja:* 'gdal-dev at lists.osgeo.org' (gdal-dev at lists.osgeo.org) <
>> gdal-dev at lists.osgeo.org>
>> *Aihe:* [gdal-dev] Possibility to use config options in VRT-files
>>
>>
>>
>> Hi!
>>
>>
>>
>> Could it be possible to add GDAL configuration options to VRT-files?
>>
>>
>>
>> I have worked with several WFS-services, where I have to set
>> OGR_WFS_PAGING_ALLOWED=OFF -option to get data.It is not problem to add
>> system variable or --config when running ogrinfo/ogr2ogr from command line.
>> But I like to use the same .vrt-files also in QGIS and it will be more
>> convenient to add necessary config-options to vrt-files.
>>
>>
>>
>> Rgs,
>>
>>
>>
>> Pekka
>>
>>
>>
>>
>
> _______________________________________________
> gdal-dev mailing listgdal-dev at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220614/b966c393/attachment.htm>


More information about the gdal-dev mailing list