Re: [gdal-dev] GPKG raster creation : error with too small resolution

2024-01-18 Thread Philippe Ghesquiere via gdal-dev
Thanks Even :-)


On Thu, Jan 18, 2024 at 3:48 PM Even Rouault 
wrote:

> cf improvement https://github.com/OSGeo/gdal/pull/9101
>
> https://docs.ogc.org/is/17-083r2/17-083r2.html#76 mentions "TileMatrices
> for more detailed scales is possible if they follow the same pattern."  .
> The current limitation to 25 was to make some computations easier, but
> supporting up to 30 (or 29 when MatrixWidth=2 at zoom level = 0) is now
> possible.
> Le 18/01/2024 à 15:35, Rahkonen Jukka via gdal-dev a écrit :
>
> Hi,
>
>
>
> I am not sure how standard the level 25 is for the InspireCRS84Quad, the
> INSPIRE technical guidance stops at 17. But I believe that you know your
> own use case and have considered also that EPSG:3857 at 1 mm resolution is
> good for you.
>
> The number of tiles at level 25 is 2^50= 1.1259E+15. TileCol and TileRow
> would get rather large numbers but I suppose that it is not an issue.
>
>
>
> -Jukka Rahkonen-
>
>
>
> *Lähettäjä:* Philippe Ghesquiere 
> 
> *Lähetetty:* torstai 18. tammikuuta 2024 16.06
> *Vastaanottaja:* Rahkonen Jukka 
> 
> *Kopio:* gdal-dev  
> *Aihe:* Re: [gdal-dev] GPKG raster creation : error with too small
> resolution
>
>
>
> Hi Jukka,
>
>
>
> I have no choice but to use the standard InspireCRS84Quad tiling grid.
>
>
>
> Thanks for the "-a_ullr fix"
>
>
>
> Philippe
>
>
>
>
>
> On Thu, Jan 18, 2024 at 2:42 PM Rahkonen Jukka <
> jukka.rahko...@maanmittauslaitos.fi> wrote:
>
> Hi,
>
>
>
> Can you imagine using a custom tiling schema instead of the world-wide
> InspireCRS84Quad? These commands work
>
> gdal_create -of GTiff -co COMPRESS=DEFLATE -outsize 2000 2000 -burn 255
> -burn 0 -burn 0 -bands 3 -ot Byte -a_srs epsg:32631 -a_ullr 100 102
> 102 100 1mm.tif
>
> gdal_translate -of GPKG  1mm.tif 1mm.gpkg
>
> Notice the fixed ullr for making the image north-up.
>
>
>
> -Jukka Rahkonen-
>
>
>
> gdal_translate -of GPKG  1mm.tif 1mm.gpkg
>
> Input file size is 2000, 2000
>
> 0ERROR 6: Only north-up non rotated geotransform supported
>
> ..ERROR 1: Raster table 1mm not correctly initialized due to missing call
> to SetGeoTransform()
>
>
>
> *Lähettäjä:* gdal-dev  *Puolesta *Philippe
> Ghesquiere via gdal-dev
> *Lähetetty:* torstai 18. tammikuuta 2024 15.22
> *Vastaanottaja:* gdal-dev 
> *Aihe:* [gdal-dev] GPKG raster creation : error with too small resolution
>
>
>
>
>
> Dear all,
>
> I just had an error while converting an image to GPKG. This image has a
> very small resolution and gdal_translate pops up an error message.
>
> *Test image :*
> gdal_create -of GTiff -co COMPRESS=DEFLATE -outsize 2000 2000 -burn 255
> -burn 0 -burn 0 -bands 3 -ot Byte -a_srs epsg:32631 -a_ullr 100 100
> 102 102 1mm.tif
>
> *Conversion to GPKG :*
> gdal_translate -of GPKG -co TILING_SCHEME=InspireCRS84Quad -co
> ZOOM_LEVEL_STRATEGY=UPPER 1mm.tif 1mm.gpkg
> Input file size is 2000, 2000
> ERROR 1: Could not find an appropriate zoom level
>
> *Analysis*
>
> The error is due to  ogrgeopackagedatasource.cpp
> <https://github.com/OSGeo/gdal/blob/master/ogr/ogrsf_frmts/gpkg/ogrgeopackagedatasource.cpp#L3169>
>  (line
> 3169), and it does make sense : the zoom level is too high (Z>25).
>
>
>
> However, wouldn't it be possible to modify gdal_translate behavior ?
>
> For example, we could :
>
>- let GDAL compute the appropriate zoom level : -co
>ZOOM_LEVEL_STRATEGY=AUTO/LOWER/UPPER,
>- optionally specify a maximum zoom level : -co MAX_ZOOM_LEVEL=18
>
> What do you think ?
>
>
>
> Philippe
>
>
>
> The information in this e-mail is confidential. The contents may not be
> disclosed or used by anyone other than the addressee. Access to this e-mail
> by anyone else is unauthorised.
> If you are not the intended recipient, please notify Airbus immediately
> and delete this e-mail.
> Airbus cannot accept any responsibility for the accuracy or completeness
> of this e-mail as it has been sent over public networks. If you have any
> concerns over the content of this message or its Accuracy or Integrity,
> please contact Airbus immediately.
> All outgoing e-mails from Airbus are checked using regularly updated virus
> scanning software but you should take whatever measures you deem to be
> appropriate to ensure that this message and any attachments are virus free.
>
> The information in this e-mail is confidential. The contents may not be
> disclosed or used by anyone other than the addressee. Access to this e-mail
> by anyone else is unauthorised.
> If you are not the i

Re: [gdal-dev] GPKG raster creation : error with too small resolution

2024-01-18 Thread Philippe Ghesquiere via gdal-dev
I agree with the standard limit of  the InspireCRS84Quad grid.
That's why I was wondering if we could deal with this weird image like :
gdal_translate -of GPKG -co TILING_SCHEME=InspireCRS84Quad -co
ZOOM_LEVEL_STRATEGY=UPPER *-co MAX_ZOOM_LEVEL=17* 1mm.tif 1mm.gpkg

In this particular case, the GPKG will stop at ZoomLevel=17
Philippe

On Thu, Jan 18, 2024 at 3:36 PM Rahkonen Jukka <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi,
>
>
>
> I am not sure how standard the level 25 is for the InspireCRS84Quad, the
> INSPIRE technical guidance stops at 17. But I believe that you know your
> own use case and have considered also that EPSG:3857 at 1 mm resolution is
> good for you.
>
> The number of tiles at level 25 is 2^50= 1.1259E+15. TileCol and TileRow
> would get rather large numbers but I suppose that it is not an issue.
>
>
>
> -Jukka Rahkonen-
>
>
>
> *Lähettäjä:* Philippe Ghesquiere 
> *Lähetetty:* torstai 18. tammikuuta 2024 16.06
> *Vastaanottaja:* Rahkonen Jukka 
> *Kopio:* gdal-dev 
> *Aihe:* Re: [gdal-dev] GPKG raster creation : error with too small
> resolution
>
>
>
> Hi Jukka,
>
>
>
> I have no choice but to use the standard InspireCRS84Quad tiling grid.
>
>
>
> Thanks for the "-a_ullr fix"
>
>
>
> Philippe
>
>
>
>
>
> On Thu, Jan 18, 2024 at 2:42 PM Rahkonen Jukka <
> jukka.rahko...@maanmittauslaitos.fi> wrote:
>
> Hi,
>
>
>
> Can you imagine using a custom tiling schema instead of the world-wide
> InspireCRS84Quad? These commands work
>
> gdal_create -of GTiff -co COMPRESS=DEFLATE -outsize 2000 2000 -burn 255
> -burn 0 -burn 0 -bands 3 -ot Byte -a_srs epsg:32631 -a_ullr 100 102
> 102 100 1mm.tif
>
> gdal_translate -of GPKG  1mm.tif 1mm.gpkg
>
> Notice the fixed ullr for making the image north-up.
>
>
>
> -Jukka Rahkonen-
>
>
>
> gdal_translate -of GPKG  1mm.tif 1mm.gpkg
>
> Input file size is 2000, 2000
>
> 0ERROR 6: Only north-up non rotated geotransform supported
>
> ..ERROR 1: Raster table 1mm not correctly initialized due to missing call
> to SetGeoTransform()
>
>
>
> *Lähettäjä:* gdal-dev  *Puolesta *Philippe
> Ghesquiere via gdal-dev
> *Lähetetty:* torstai 18. tammikuuta 2024 15.22
> *Vastaanottaja:* gdal-dev 
> *Aihe:* [gdal-dev] GPKG raster creation : error with too small resolution
>
>
>
>
>
> Dear all,
>
> I just had an error while converting an image to GPKG. This image has a
> very small resolution and gdal_translate pops up an error message.
>
> *Test image :*
> gdal_create -of GTiff -co COMPRESS=DEFLATE -outsize 2000 2000 -burn 255
> -burn 0 -burn 0 -bands 3 -ot Byte -a_srs epsg:32631 -a_ullr 100 100
> 102 102 1mm.tif
>
> *Conversion to GPKG :*
> gdal_translate -of GPKG -co TILING_SCHEME=InspireCRS84Quad -co
> ZOOM_LEVEL_STRATEGY=UPPER 1mm.tif 1mm.gpkg
> Input file size is 2000, 2000
> ERROR 1: Could not find an appropriate zoom level
>
> *Analysis*
>
> The error is due to  ogrgeopackagedatasource.cpp
> <https://github.com/OSGeo/gdal/blob/master/ogr/ogrsf_frmts/gpkg/ogrgeopackagedatasource.cpp#L3169>
>  (line
> 3169), and it does make sense : the zoom level is too high (Z>25).
>
>
>
> However, wouldn't it be possible to modify gdal_translate behavior ?
>
> For example, we could :
>
>- let GDAL compute the appropriate zoom level : -co
>ZOOM_LEVEL_STRATEGY=AUTO/LOWER/UPPER,
>- optionally specify a maximum zoom level : -co MAX_ZOOM_LEVEL=18
>
> What do you think ?
>
>
>
> Philippe
>
>
>
> The information in this e-mail is confidential. The contents may not be
> disclosed or used by anyone other than the addressee. Access to this e-mail
> by anyone else is unauthorised.
> If you are not the intended recipient, please notify Airbus immediately
> and delete this e-mail.
> Airbus cannot accept any responsibility for the accuracy or completeness
> of this e-mail as it has been sent over public networks. If you have any
> concerns over the content of this message or its Accuracy or Integrity,
> please contact Airbus immediately.
> All outgoing e-mails from Airbus are checked using regularly updated virus
> scanning software but you should take whatever measures you deem to be
> appropriate to ensure that this message and any attachments are virus free.
>
> The information in this e-mail is confidential. The contents may not be
> disclosed or used by anyone other than the addressee. Access to this e-mail
> by anyone else is unauthorised.
> If you are not the intended recipient, please notify Airbus immediately
> and delete this e-mail.
> Airbus cannot accept any responsi

Re: [gdal-dev] GPKG raster creation : error with too small resolution

2024-01-18 Thread Even Rouault via gdal-dev

cf improvement https://github.com/OSGeo/gdal/pull/9101

https://docs.ogc.org/is/17-083r2/17-083r2.html#76 mentions "TileMatrices 
for more detailed scales is possible if they follow the same pattern."  
. The current limitation to 25 was to make some computations easier, but 
supporting up to 30 (or 29 when MatrixWidth=2 at zoom level = 0) is now 
possible.


Le 18/01/2024 à 15:35, Rahkonen Jukka via gdal-dev a écrit :


Hi,

I am not sure how standard the level 25 is for the InspireCRS84Quad, 
the INSPIRE technical guidance stops at 17. But I believe that you 
know your own use case and have considered also that EPSG:3857 at 1 mm 
resolution is good for you.


The number of tiles at level 25 is 2^50=1.1259E+15. TileCol and 
TileRow would get rather large numbers but I suppose that it is not an 
issue.


-Jukka Rahkonen-

*Lähettäjä:* Philippe Ghesquiere 
*Lähetetty:* torstai 18. tammikuuta 2024 16.06
*Vastaanottaja:* Rahkonen Jukka 
*Kopio:* gdal-dev 
*Aihe:* Re: [gdal-dev] GPKG raster creation : error with too small 
resolution


Hi Jukka,

I have no choice but to use the standard InspireCRS84Quad tiling grid.

Thanks for the "-a_ullr fix"

Philippe

On Thu, Jan 18, 2024 at 2:42 PM Rahkonen Jukka 
 wrote:


Hi,

Can you imagine using a custom tiling schema instead of the
world-wide InspireCRS84Quad? These commands work

gdal_create -of GTiff -co COMPRESS=DEFLATE -outsize 2000 2000
-burn 255 -burn 0 -burn 0 -bands 3 -ot Byte -a_srs epsg:32631
-a_ullr 100 102 102 100 1mm.tif

gdal_translate -of GPKG  1mm.tif 1mm.gpkg

Notice the fixed ullr for making the image north-up.

-Jukka Rahkonen-



gdal_translate -of GPKG  1mm.tif 1mm.gpkg

Input file size is 2000, 2000

0ERROR 6: Only north-up non rotated geotransform supported

..ERROR 1: Raster table 1mm not correctly initialized due to
missing call to SetGeoTransform()

*Lähettäjä:* gdal-dev  *Puolesta
*Philippe Ghesquiere via gdal-dev
*Lähetetty:* torstai 18. tammikuuta 2024 15.22
*Vastaanottaja:* gdal-dev 
    *Aihe:* [gdal-dev] GPKG raster creation : error with too small
resolution

Dear all,

I just had an error while converting an image to GPKG. This image
has a very small resolution and gdal_translate pops up an error
message.

_Test image :_
gdal_create -of GTiff -co COMPRESS=DEFLATE -outsize 2000 2000
-burn 255 -burn 0 -burn 0 -bands 3 -ot Byte -a_srs epsg:32631
-a_ullr 100 100 102 102 1mm.tif

_Conversion to GPKG :_
gdal_translate -of GPKG -co TILING_SCHEME=InspireCRS84Quad -co
ZOOM_LEVEL_STRATEGY=UPPER 1mm.tif 1mm.gpkg
Input file size is 2000, 2000
ERROR 1: Could not find an appropriate zoom level

_Analysis_

The error is due to ogrgeopackagedatasource.cpp

<https://github.com/OSGeo/gdal/blob/master/ogr/ogrsf_frmts/gpkg/ogrgeopackagedatasource.cpp#L3169>
 (line
3169), and it does make sense : the zoom level is too high (Z>25).

However, wouldn't it be possible to modify gdal_translate behavior ?

For example, we could :

  * let GDAL compute the appropriate zoom level : -co
ZOOM_LEVEL_STRATEGY=AUTO/LOWER/UPPER,
  * optionally specify a maximum zoom level : -co MAX_ZOOM_LEVEL=18

What do you think ?

Philippe

The information in this e-mail is confidential. The contents may
not be disclosed or used by anyone other than the addressee.
Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus
immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or
completeness of this e-mail as it has been sent over public
networks. If you have any concerns over the content of this
message or its Accuracy or Integrity, please contact Airbus
immediately.
All outgoing e-mails from Airbus are checked using regularly
updated virus scanning software but you should take whatever
measures you deem to be appropriate to ensure that this message
and any attachments are virus free.

The information in this e-mail is confidential. The contents may not 
be disclosed or used by anyone other than the addressee. Access to 
this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus 
immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or 
completeness of this e-mail as it has been sent over public networks. 
If you have any concerns over the content of this message or its 
Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated 
virus scanning software but you should take whatever measures you deem 
to be appropriate to ensure that this message and any attachments are 
virus free.



___
gdal-dev mailing 

Re: [gdal-dev] GPKG raster creation : error with too small resolution

2024-01-18 Thread Rahkonen Jukka via gdal-dev
Hi,

I am not sure how standard the level 25 is for the InspireCRS84Quad, the 
INSPIRE technical guidance stops at 17. But I believe that you know your own 
use case and have considered also that EPSG:3857 at 1 mm resolution is good for 
you.

The number of tiles at level 25 is 2^50= 1.1259E+15. TileCol and TileRow would 
get rather large numbers but I suppose that it is not an issue.

-Jukka Rahkonen-

Lähettäjä: Philippe Ghesquiere 
Lähetetty: torstai 18. tammikuuta 2024 16.06
Vastaanottaja: Rahkonen Jukka 
Kopio: gdal-dev 
Aihe: Re: [gdal-dev] GPKG raster creation : error with too small resolution

Hi Jukka,

I have no choice but to use the standard InspireCRS84Quad tiling grid.

Thanks for the "-a_ullr fix"

Philippe


On Thu, Jan 18, 2024 at 2:42 PM Rahkonen Jukka 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 wrote:
Hi,

Can you imagine using a custom tiling schema instead of the world-wide 
InspireCRS84Quad? These commands work

gdal_create -of GTiff -co COMPRESS=DEFLATE -outsize 2000 2000 -burn 255 -burn 0 
-burn 0 -bands 3 -ot Byte -a_srs epsg:32631 -a_ullr 100 102 102 
100 1mm.tif

gdal_translate -of GPKG  1mm.tif 1mm.gpkg

Notice the fixed ullr for making the image north-up.

-Jukka Rahkonen-



gdal_translate -of GPKG  1mm.tif 1mm.gpkg
Input file size is 2000, 2000
0ERROR 6: Only north-up non rotated geotransform supported
..ERROR 1: Raster table 1mm not correctly initialized due to missing call to 
SetGeoTransform()

Lähettäjä: gdal-dev 
mailto:gdal-dev-boun...@lists.osgeo.org>> 
Puolesta Philippe Ghesquiere via gdal-dev
Lähetetty: torstai 18. tammikuuta 2024 15.22
Vastaanottaja: gdal-dev 
mailto:gdal-dev@lists.osgeo.org>>
Aihe: [gdal-dev] GPKG raster creation : error with too small resolution


Dear all,

I just had an error while converting an image to GPKG. This image has a very 
small resolution and gdal_translate pops up an error message.

Test image :
gdal_create -of GTiff -co COMPRESS=DEFLATE -outsize 2000 2000 -burn 255 -burn 0 
-burn 0 -bands 3 -ot Byte -a_srs epsg:32631 -a_ullr 100 100 102 
102 1mm.tif

Conversion to GPKG :
gdal_translate -of GPKG -co TILING_SCHEME=InspireCRS84Quad -co 
ZOOM_LEVEL_STRATEGY=UPPER 1mm.tif 1mm.gpkg
Input file size is 2000, 2000
ERROR 1: Could not find an appropriate zoom level

Analysis
The error is due to  
ogrgeopackagedatasource.cpp<https://github.com/OSGeo/gdal/blob/master/ogr/ogrsf_frmts/gpkg/ogrgeopackagedatasource.cpp#L3169>
 (line 3169), and it does make sense : the zoom level is too high (Z>25).

However, wouldn't it be possible to modify gdal_translate behavior ?
For example, we could :

  *   let GDAL compute the appropriate zoom level : -co 
ZOOM_LEVEL_STRATEGY=AUTO/LOWER/UPPER,
  *   optionally specify a maximum zoom level : -co MAX_ZOOM_LEVEL=18
What do you think ?

Philippe

The information in this e-mail is confidential. The contents may not be 
disclosed or used by anyone other than the addressee. Access to this e-mail by 
anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and 
delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of 
this e-mail as it has been sent over public networks. If you have any concerns 
over the content of this message or its Accuracy or Integrity, please contact 
Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus 
scanning software but you should take whatever measures you deem to be 
appropriate to ensure that this message and any attachments are virus free.
The information in this e-mail is confidential. The contents may not be 
disclosed or used by anyone other than the addressee. Access to this e-mail by 
anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and 
delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of 
this e-mail as it has been sent over public networks. If you have any concerns 
over the content of this message or its Accuracy or Integrity, please contact 
Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus 
scanning software but you should take whatever measures you deem to be 
appropriate to ensure that this message and any attachments are virus free.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] GPKG raster creation : error with too small resolution

2024-01-18 Thread Philippe Ghesquiere via gdal-dev
Hi Jukka,

I have no choice but to use the standard InspireCRS84Quad tiling grid.

Thanks for the "-a_ullr fix"

Philippe


On Thu, Jan 18, 2024 at 2:42 PM Rahkonen Jukka <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi,
>
>
>
> Can you imagine using a custom tiling schema instead of the world-wide
> InspireCRS84Quad? These commands work
>
> gdal_create -of GTiff -co COMPRESS=DEFLATE -outsize 2000 2000 -burn 255
> -burn 0 -burn 0 -bands 3 -ot Byte -a_srs epsg:32631 -a_ullr 100 102
> 102 100 1mm.tif
>
> gdal_translate -of GPKG  1mm.tif 1mm.gpkg
>
> Notice the fixed ullr for making the image north-up.
>
>
>
> -Jukka Rahkonen-
>
>
>
> gdal_translate -of GPKG  1mm.tif 1mm.gpkg
>
> Input file size is 2000, 2000
>
> 0ERROR 6: Only north-up non rotated geotransform supported
>
> ..ERROR 1: Raster table 1mm not correctly initialized due to missing call
> to SetGeoTransform()
>
>
>
> *Lähettäjä:* gdal-dev  *Puolesta *Philippe
> Ghesquiere via gdal-dev
> *Lähetetty:* torstai 18. tammikuuta 2024 15.22
> *Vastaanottaja:* gdal-dev 
> *Aihe:* [gdal-dev] GPKG raster creation : error with too small resolution
>
>
>
>
>
> Dear all,
>
> I just had an error while converting an image to GPKG. This image has a
> very small resolution and gdal_translate pops up an error message.
>
> *Test image :*
> gdal_create -of GTiff -co COMPRESS=DEFLATE -outsize 2000 2000 -burn 255
> -burn 0 -burn 0 -bands 3 -ot Byte -a_srs epsg:32631 -a_ullr 100 100
> 102 102 1mm.tif
>
> *Conversion to GPKG :*
> gdal_translate -of GPKG -co TILING_SCHEME=InspireCRS84Quad -co
> ZOOM_LEVEL_STRATEGY=UPPER 1mm.tif 1mm.gpkg
> Input file size is 2000, 2000
> ERROR 1: Could not find an appropriate zoom level
>
> *Analysis*
>
> The error is due to  ogrgeopackagedatasource.cpp
> <https://github.com/OSGeo/gdal/blob/master/ogr/ogrsf_frmts/gpkg/ogrgeopackagedatasource.cpp#L3169>
>  (line
> 3169), and it does make sense : the zoom level is too high (Z>25).
>
>
>
> However, wouldn't it be possible to modify gdal_translate behavior ?
>
> For example, we could :
>
>- let GDAL compute the appropriate zoom level : -co
>ZOOM_LEVEL_STRATEGY=AUTO/LOWER/UPPER,
>- optionally specify a maximum zoom level : -co MAX_ZOOM_LEVEL=18
>
> What do you think ?
>
>
>
> Philippe
>
>
>
> The information in this e-mail is confidential. The contents may not be
> disclosed or used by anyone other than the addressee. Access to this e-mail
> by anyone else is unauthorised.
> If you are not the intended recipient, please notify Airbus immediately
> and delete this e-mail.
> Airbus cannot accept any responsibility for the accuracy or completeness
> of this e-mail as it has been sent over public networks. If you have any
> concerns over the content of this message or its Accuracy or Integrity,
> please contact Airbus immediately.
> All outgoing e-mails from Airbus are checked using regularly updated virus
> scanning software but you should take whatever measures you deem to be
> appropriate to ensure that this message and any attachments are virus free.
>
The information in this e-mail is confidential. The contents may not be 
disclosed or used by anyone other than the addressee. Access to this e-mail by 
anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and 
delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of 
this e-mail as it has been sent over public networks. If you have any concerns 
over the content of this message or its Accuracy or Integrity, please contact 
Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus 
scanning software but you should take whatever measures you deem to be 
appropriate to ensure that this message and any attachments are virus free.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] GPKG raster creation : error with too small resolution

2024-01-18 Thread Rahkonen Jukka via gdal-dev
Hi,

Can you imagine using a custom tiling schema instead of the world-wide 
InspireCRS84Quad? These commands work

gdal_create -of GTiff -co COMPRESS=DEFLATE -outsize 2000 2000 -burn 255 -burn 0 
-burn 0 -bands 3 -ot Byte -a_srs epsg:32631 -a_ullr 100 102 102 
100 1mm.tif

gdal_translate -of GPKG  1mm.tif 1mm.gpkg

Notice the fixed ullr for making the image north-up.

-Jukka Rahkonen-



gdal_translate -of GPKG  1mm.tif 1mm.gpkg
Input file size is 2000, 2000
0ERROR 6: Only north-up non rotated geotransform supported
..ERROR 1: Raster table 1mm not correctly initialized due to missing call to 
SetGeoTransform()

Lähettäjä: gdal-dev  Puolesta Philippe 
Ghesquiere via gdal-dev
Lähetetty: torstai 18. tammikuuta 2024 15.22
Vastaanottaja: gdal-dev 
Aihe: [gdal-dev] GPKG raster creation : error with too small resolution


Dear all,

I just had an error while converting an image to GPKG. This image has a very 
small resolution and gdal_translate pops up an error message.

Test image :
gdal_create -of GTiff -co COMPRESS=DEFLATE -outsize 2000 2000 -burn 255 -burn 0 
-burn 0 -bands 3 -ot Byte -a_srs epsg:32631 -a_ullr 100 100 102 
102 1mm.tif

Conversion to GPKG :
gdal_translate -of GPKG -co TILING_SCHEME=InspireCRS84Quad -co 
ZOOM_LEVEL_STRATEGY=UPPER 1mm.tif 1mm.gpkg
Input file size is 2000, 2000
ERROR 1: Could not find an appropriate zoom level

Analysis
The error is due to  
ogrgeopackagedatasource.cpp<https://github.com/OSGeo/gdal/blob/master/ogr/ogrsf_frmts/gpkg/ogrgeopackagedatasource.cpp#L3169>
 (line 3169), and it does make sense : the zoom level is too high (Z>25).

However, wouldn't it be possible to modify gdal_translate behavior ?
For example, we could :

  *   let GDAL compute the appropriate zoom level : -co 
ZOOM_LEVEL_STRATEGY=AUTO/LOWER/UPPER,
  *   optionally specify a maximum zoom level : -co MAX_ZOOM_LEVEL=18
What do you think ?

Philippe

The information in this e-mail is confidential. The contents may not be 
disclosed or used by anyone other than the addressee. Access to this e-mail by 
anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and 
delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of 
this e-mail as it has been sent over public networks. If you have any concerns 
over the content of this message or its Accuracy or Integrity, please contact 
Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus 
scanning software but you should take whatever measures you deem to be 
appropriate to ensure that this message and any attachments are virus free.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] GPKG raster creation : error with too small resolution

2024-01-18 Thread Philippe Ghesquiere via gdal-dev
Dear all,

I just had an error while converting an image to GPKG. This image has a
very small resolution and gdal_translate pops up an error message.

*Test image :*
gdal_create -of GTiff -co COMPRESS=DEFLATE -outsize 2000 2000 -burn 255
-burn 0 -burn 0 -bands 3 -ot Byte -a_srs epsg:32631 -a_ullr 100 100
102 102 1mm.tif

*Conversion to GPKG :*
gdal_translate -of GPKG -co TILING_SCHEME=InspireCRS84Quad -co
ZOOM_LEVEL_STRATEGY=UPPER 1mm.tif 1mm.gpkg
Input file size is 2000, 2000
ERROR 1: Could not find an appropriate zoom level

*Analysis*
The error is due to  ogrgeopackagedatasource.cpp

(line
3169), and it does make sense : the zoom level is too high (Z>25).

However, wouldn't it be possible to modify gdal_translate behavior ?
For example, we could :

   - let GDAL compute the appropriate zoom level : -co
   ZOOM_LEVEL_STRATEGY=AUTO/LOWER/UPPER,
   - optionally specify a maximum zoom level : -co MAX_ZOOM_LEVEL=18

What do you think ?

Philippe
The information in this e-mail is confidential. The contents may not be 
disclosed or used by anyone other than the addressee. Access to this e-mail by 
anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and 
delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of 
this e-mail as it has been sent over public networks. If you have any concerns 
over the content of this message or its Accuracy or Integrity, please contact 
Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus 
scanning software but you should take whatever measures you deem to be 
appropriate to ensure that this message and any attachments are virus free.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev