Re: [gdal-dev] About -oo -lco -dsco in docs

2024-03-27 Thread Daniel Baston via gdal-dev
Perhaps a Sphinx substitution could be made with the relevant text and
added to
https://github.com/OSGeo/gdal/blob/master/doc/source/substitutions.rst

Dan

On Wed, Mar 27, 2024 at 5:01 PM Even Rouault via gdal-dev <
gdal-dev@lists.osgeo.org> wrote:

> Salut Thomas,
>
> There's a tension between being clear to users, and also aiming at being
> concise / not repeating us too much (we have already one thousand pages
> of doc to maintain), and if we need to repeat, find the technical way of
> doing it without actually having to copy&paste&maintain the same text.
>
> Probably a solution could be to have under each "Open options"
> paragraph, and introduction sentence like
>
> "Consult :ref:`how to specify open options ` with command
> line utilities and the API." that links to a page explaining the concept
> and how to use it.
>
> I was wondering if we'd just want to copy&paste that sentence at all
> relevant places, or create a custom Sphinx extension for a directive
> that would do that. The later is probably overkill. Possibly a one-time
> simple Python script could automatically insert that at relevant places
>
> Even
>
>
> Le 26/03/2024 à 21:25, Thomas Gratier via gdal-dev a écrit :
> > Hi,
> >
> > There are implicit rules when you read the OGR/GDAL docs in fact, in
> > particular when you use `ogr2ogr` or `ogrinfo`
> >
> > `-oo =` like "Open Options"
> > `-lco =` for "Layer Creation Option"
> > `-dsco =` for "DataSet Creation Option"
> >
> > So, when you read for instance
> > https://gdal.org/drivers/vector/csv.html, you will see there is a
> > section "Open options" so you will know that you can use `-oo`. Also,
> > you will see a "Layer Creation options" block so again, you will know
> > it mean use `-lco`.
> >
> > It's documented in "ogr2ogr" but you need to know the rule to make the
> > link in your mind when reading the doc. Any idea to clarify the doc
> > about the "tip".
> >
> > An idea could be about adding in drivers docs "Open options" block a
> > sentence like "When using the command line, use the flag `-oo
> > =`" and do the same for "Layer creation options" block
> > "When using the command line, use the flag `-lco =`"
> >
> > Thoughts about the suggestion? Better idea? Not worth?
> >
> > Regards,
> >
> > Thomas Gratier
> >
> > ___
> > gdal-dev mailing list
> > gdal-dev@lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> --
> http://www.spatialys.com
> My software is free, but my time generally not.
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] About -oo -lco -dsco in docs

2024-03-27 Thread Even Rouault via gdal-dev

Salut Thomas,

There's a tension between being clear to users, and also aiming at being 
concise / not repeating us too much (we have already one thousand pages 
of doc to maintain), and if we need to repeat, find the technical way of 
doing it without actually having to copy&paste&maintain the same text.


Probably a solution could be to have under each "Open options" 
paragraph, and introduction sentence like


"Consult :ref:`how to specify open options ` with command 
line utilities and the API." that links to a page explaining the concept 
and how to use it.


I was wondering if we'd just want to copy&paste that sentence at all 
relevant places, or create a custom Sphinx extension for a directive 
that would do that. The later is probably overkill. Possibly a one-time 
simple Python script could automatically insert that at relevant places


Even


Le 26/03/2024 à 21:25, Thomas Gratier via gdal-dev a écrit :

Hi,

There are implicit rules when you read the OGR/GDAL docs in fact, in 
particular when you use `ogr2ogr` or `ogrinfo`


`-oo =` like "Open Options"
`-lco =` for "Layer Creation Option"
`-dsco =` for "DataSet Creation Option"

So, when you read for instance 
https://gdal.org/drivers/vector/csv.html, you will see there is a 
section "Open options" so you will know that you can use `-oo`. Also, 
you will see a "Layer Creation options" block so again, you will know 
it mean use `-lco`.


It's documented in "ogr2ogr" but you need to know the rule to make the 
link in your mind when reading the doc. Any idea to clarify the doc 
about the "tip".


An idea could be about adding in drivers docs "Open options" block a 
sentence like "When using the command line, use the flag `-oo 
=`" and do the same for "Layer creation options" block 
"When using the command line, use the flag `-lco =`"


Thoughts about the suggestion? Better idea? Not worth?

Regards,

Thomas Gratier

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


--
http://www.spatialys.com
My software is free, but my time generally not.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Antwort: Re: ERROR 1: Couldn't fetch requested layer when using a filter in the ogr2ogr- GetFeature request

2024-03-27 Thread Michael Otto via gdal-dev
Thank you Jukka,

that's it!

Michael




Von:"Rahkonen Jukka" 
An: "Michael Otto" , 
"gdal-dev@lists.osgeo.org" 
Datum:  27.03.2024 14:39
Betreff:Re: [gdal-dev] ERROR 1: Couldn't fetch requested layer 
when using a filter in the ogr2ogr- GetFeature request



Hi,
 
Works for me with an URL encoded request:

ogrinfo "
https://isk.geobasis-bb.de/ows/feldblockkataster_wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=refbb:Feldblock&SRSNAME=EPSG:25833&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%20xmlns:xsi=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsi:schemaLocation=%22http://www.opengis.net/fes/2.0http://schemas.opengis.net/filter/2.0/filterAll.xsd%22%3E%20%3Cfes:And%3E%20%3Cfes:PropertyIsEqualTo%3E%20%3Cfes:ValueReference%3EFLIK%3C/fes:ValueReference%3E%20%3Cfes:Literal%3EDEBBLI1873413738%3C/fes:Literal%3E%20%3C/fes:PropertyIsEqualTo%3E%20%3Cfes:PropertyIsEqualTo%3E%20%3Cfes:ValueReference%3EFACHL_GUELTIG_AB%3C/fes:ValueReference%3E%20%3Cfes:Literal%3E2022-01-01%3C/fes:Literal%3E%20%3C/fes:PropertyIsEqualTo%3E%20%3C/fes:And%3E%20%3C/fes:Filter%3E
" -al

-Jukka Rahkonen-
 
Lähettäjä: gdal-dev  Puolesta Michael 
Otto via gdal-dev
Lähetetty: keskiviikko 27. maaliskuuta 2024 15.29
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] ERROR 1: Couldn't fetch requested layer when using a 
filter in the ogr2ogr- GetFeature request
 
Hello,

I'm trying to query a free WFS with filter values via ogr2ogr and write 
the results to a GeoJson file. 

If I use the following URL incl. filter:

https://isk.geobasis-bb.de/ows/feldblockkataster_wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=refbb:Feldblock&SRSNAME=EPSG:25833&filter=
http://www.opengis.net/fes/2.0"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
http://www.opengis.net/fes/2.0
http://schemas.opengis.net/filter/2.0/filterAll.xsd";>  
 FLIK 
DEBBLI1873413738  
 
FACHL_GUELTIG_AB 
2022-01-01   


get the error message:

ERROR 1: Couldn't fetch requested layer '
http://schemas.opengis.net/filter/2.0/filterAll. xsd>  
 FLIK 
DEBBLI1873413738   
FACHL_GUELTIG_AB 
2022-01-01   
'!

and no results.

If I submit the GetFeature request directly in the browser, I get the 
expected result (namely exactly 2 features).
Without the filter on the URL, my GetFeature requests also work as 
expected with ogr2ogr.

What am I doing wrong?

Michael 


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] ERROR 1: Couldn't fetch requested layer when using a filter in the ogr2ogr- GetFeature request

2024-03-27 Thread Rahkonen Jukka via gdal-dev
Hi,

Works for me with an URL encoded request:

ogrinfo 
"https://isk.geobasis-bb.de/ows/feldblockkataster_wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=refbb:Feldblock&SRSNAME=EPSG:25833&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%20xmlns:xsi=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsi:schemaLocation=%22http://www.opengis.net/fes/2.0http://schemas.opengis.net/filter/2.0/filterAll.xsd%22%3E%20%3Cfes:And%3E%20%3Cfes:PropertyIsEqualTo%3E%20%3Cfes:ValueReference%3EFLIK%3C/fes:ValueReference%3E%20%3Cfes:Literal%3EDEBBLI1873413738%3C/fes:Literal%3E%20%3C/fes:PropertyIsEqualTo%3E%20%3Cfes:PropertyIsEqualTo%3E%20%3Cfes:ValueReference%3EFACHL_GUELTIG_AB%3C/fes:ValueReference%3E%20%3Cfes:Literal%3E2022-01-01%3C/fes:Literal%3E%20%3C/fes:PropertyIsEqualTo%3E%20%3C/fes:And%3E%20%3C/fes:Filter%3E";
 -al

-Jukka Rahkonen-

Lähettäjä: gdal-dev  Puolesta Michael Otto 
via gdal-dev
Lähetetty: keskiviikko 27. maaliskuuta 2024 15.29
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] ERROR 1: Couldn't fetch requested layer when using a filter in 
the ogr2ogr- GetFeature request

Hello,

I'm trying to query a free WFS with filter values via ogr2ogr and write the 
results to a GeoJson file.

If I use the following URL incl. filter:

https://isk.geobasis-bb.de/ows/feldblockkataster_wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=refbb:Feldblock&SRSNAME=EPSG:25833&filter=http://www.opengis.net/fes/2.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://www.opengis.net/fes/2.0http://schemas.opengis.net/filter/2.0/filterAll.xsd";>
   
FLIK 
DEBBLI1873413738  
 
FACHL_GUELTIG_AB 
2022-01-01   


get the error message:

ERROR 1: Couldn't fetch requested layer 
'http://schemas.opengis.net/filter/2.0/filterAll. xsd>  
 FLIK 
DEBBLI1873413738   FACHL_GUELTIG_AB 
2022-01-01   
'!

and no results.

If I submit the GetFeature request directly in the browser, I get the expected 
result (namely exactly 2 features).
Without the filter on the URL, my GetFeature requests also work as expected 
with ogr2ogr.

What am I doing wrong?

Michael
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] ERROR 1: Couldn't fetch requested layer when using a filter in the ogr2ogr- GetFeature request

2024-03-27 Thread Michael Otto via gdal-dev
Hello,

I'm trying to query a free WFS with filter values via ogr2ogr and write 
the results to a GeoJson file. 

If I use the following URL incl. filter:

https://isk.geobasis-bb.de/ows/feldblockkataster_wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=refbb:Feldblock&SRSNAME=EPSG:25833&filter=
http://www.opengis.net/fes/2.0"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
http://www.opengis.net/fes/2.0 
http://schemas.opengis.net/filter/2.0/filterAll.xsd";>  
 FLIK 
DEBBLI1873413738  
 
FACHL_GUELTIG_AB 
2022-01-01   


get the error message:

ERROR 1: Couldn't fetch requested layer '
http://schemas.opengis.net/filter/2.0/filterAll. xsd>  
 FLIK 
DEBBLI1873413738   
FACHL_GUELTIG_AB 
2022-01-01   
'!

and no results.

If I submit the GetFeature request directly in the browser, I get the 
expected result (namely exactly 2 features).
Without the filter on the URL, my GetFeature requests also work as 
expected with ogr2ogr.

What am I doing wrong?

Michael
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev