[gdal-dev] -sql switch in gdal_rasterize
Scott
public at postholer.com
Sun Feb 12 08:16:25 PST 2023
The hope was to have the gdal_rasterize -sql switch work like it does in
the other gdal utilities, ie, -sql @/path/to/source.sql. That
consistency would be really nice.
All my .sql files live in a single directory and things are structured
around the @ syntax. Further, these .sql quieries can be used
independently of gdal.
Having an optfile bloated with sql is a hack, not really a solution.
On 2/12/23 03:34, Rahkonen Jukka wrote:
> Hi,
>
> Optfile will work if you use it right. Optfile is flexible and it can be used for anything, not only for saving a SQL query into a file. Therefore optfile must have the same literal content that user would write by hand to the command. With optfile
>
> optfile.txt
> ========
> -sql "select * from rakennus"
>
> this command works fine for me
>
> gdal_rasterize --optfile optfile.txt helsinki_city_region.gpkg test.tif -burn 10 -tr 10 10
>
> -Jukka Rahkonen-
>
>
>
> -----Alkuperäinen viesti-----
> Lähettäjä: gdal-dev <gdal-dev-bounces at lists.osgeo.org> Puolesta Scott
> Lähetetty: lauantai 11. helmikuuta 2023 23.15
> Vastaanottaja: gdal-dev at lists.osgeo.org
> Aihe: [gdal-dev] -sql switch in gdal_rasterize
>
> Other gdal utilities that use the -sql switch allow you to specify a path to an sql file preceded with the @ symbol, such as:
>
> -sql @/path/to/source.sql
>
> Is there a way to do this with gdal_rasterize? Adding the above to an --optfile returns the same error as doing it on the command line.
>
> TIA
>
> --
> https://eur06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.postholer.com%2F&data=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C914b668d0a674f638f6f08db0c7cddb2%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C1%7C638117502675505065%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=dRgnBYMNwxd109bxxKlNEoda9BcBz6p8r1%2FSkgB8zSw%3D&reserved=0
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fgdal-dev&data=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C914b668d0a674f638f6f08db0c7cddb2%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C1%7C638117502675505065%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=iwBy%2F9rMMB67K969yfqpz9YowN7mfxIm21I4VMjOkUQ%3D&reserved=0
More information about the gdal-dev
mailing list