Re: [gdal-dev] Yet another GML EPSG::4326 offsetvector XY-order problem

2025-03-20 Thread Riivo Kolka via gdal-dev
GDAL_JP2K_ALT_OFFSETVECTOR_ORDER=YES helps, thanks.

The spec, though. Holy Space Crab! Verbosity over clarity.

Kontakt Even Rouault () kirjutas kuupäeval
K, 19. märts 2025 kell 20:52:
>
> Hi,
>
> This is a recurring source of confusion as the related specs aren't very 
> explicit / clear about that. But all example in 
> https://docs.ogc.org/is/08-085r8/08-085r8.html use
>
> 0 positive_value
> negative_value 0
>
> for EPSG:4326, so at least the behavior of GDAL is consistent with that, and 
> thus I'd tend to believe your Pleiades images are faulty
>
> Rather than hacking the file, you might try setting the environment variable 
> / configuration option GDAL_JP2K_ALT_OFFSETVECTOR_ORDER to YES, although I'm 
> not 100% positive it does the exact switch of coefficients that is needed 
> here...
>
> Even
>
> Le 19/03/2025 à 18:51, Riivo Kolka via gdal-dev a écrit :
>
> Hi.
>
> I see that gdaljp2metadata.cpp has lots of code for extracting
> something useful but I got files that still escape the effort.
>
> Some Pleiades jp2 images that gdalinfo fails to find the
> Origin and Pixel Size and reports wrong Corner Coordinates.
> gdalinfo only reports (seemingly correct) GeoTransform
>
> I verified that just the order ofs matter.
> If i switch the values inside jp2  then gdal detects 
> correct
> Origin, Pixel Size and correct Corner Coordinates.
>
> GDAL 3.10.2, released 2025/02/11
>
> Full description in a gist
> https://gist.github.com/rkolka/70ef4ac1172d6ed98b51d0412ff73d49
> ___
> 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


Re: [gdal-dev] Yet another GML EPSG::4326 offsetvector XY-order problem

2025-03-19 Thread Even Rouault via gdal-dev

Hi,

This is a recurring source of confusion as the related specs aren't very 
explicit / clear about that. But all example in 
https://docs.ogc.org/is/08-085r8/08-085r8.html use


|0 positive_value 
negative_value 0 for EPSG:4326, so 
at least the behavior of GDAL is consistent with that, and thus I'd tend 
to believe your Pleiades images are faulty Rather than hacking the file, 
you might try setting the environment variable / configuration option 
GDAL_JP2K_ALT_OFFSETVECTOR_ORDER to YES, although I'm not 100% positive 
it does the exact switch of coefficients that is needed here... Even |


Le 19/03/2025 à 18:51, Riivo Kolka via gdal-dev a écrit :

Hi.

I see that gdaljp2metadata.cpp has lots of code for extracting
something useful but I got files that still escape the effort.

Some Pleiades jp2 images that gdalinfo fails to find the
Origin and Pixel Size and reports wrong Corner Coordinates.
gdalinfo only reports (seemingly correct) GeoTransform

I verified that just the order ofs matter.
If i switch the values inside jp2  then gdal detects correct
Origin, Pixel Size and correct Corner Coordinates.

GDAL 3.10.2, released 2025/02/11

Full description in a gist
https://gist.github.com/rkolka/70ef4ac1172d6ed98b51d0412ff73d49
___
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