[gdal-dev] illegal axis orientation combination when re-projecting

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] illegal axis orientation combination when re-projecting

Nick Cummins
I'm trying to re-project a lidar point cloud file using PDAL, which uses GDAL under the hood. When re-projecting a .las tile which I was previously able to successfully transform the coordinate system from EPSG:4269 (lat/lon) to a US state plane projection, EPSG:102749, I now get the following error:

(pdal pipeline filters.reprojection Error) GDAL failure (1) illegal axis orientation combination
(pdal pipeline filters.reprojection Error) GDAL failure (1) Reprojection failed, err = -47, further errors will be suppressed on the transform object.
*** Error in `pdal': munmap_chunk(): invalid pointer: 0x00007f4ab1fec400 ***

I was looking online and found someone with a similar issue when running ogr2ogr to re-project a shapefile. I am able to reproduce an error running the command and data described:

ogr2ogr -f "GeoJSON" -t_srs EPSG:4326 dest.json TOWNSSURVEY_POLY.shp
*** Error in `ogr2ogr': munmap_chunk(): invalid pointer: 0x00007fced25ef400 ***
[1]    21243 abort (core dumped)  ogr2ogr -f "GeoJSON" -t_srs EPSG:4326 dest.json TOWNSSURVEY_POLY.shp

Any ideas on what could be going wrong, or at least some pointers as to how I can pinpoint the source of the problem? My gdal-config --version is 2.2.1.

Thanks,
Nick

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: illegal axis orientation combination when re-projecting

Even Rouault-2

On mardi 12 septembre 2017 21:55:31 CEST Nick Cummins wrote:

> I'm trying to re-project a lidar point cloud file using PDAL, which uses

> GDAL under the hood. When re-projecting a .las tile which I was previously

> able to successfully transform the coordinate system from EPSG:4269

> (lat/lon) to a US state plane projection, EPSG:102749, I now get the

> following error:

>

> (pdal pipeline filters.reprojection Error) GDAL failure (1) illegal axis

> orientation combination (pdal pipeline filters.reprojection Error) GDAL

> failure (1) Reprojection failed, err = -47, further errors will be

> suppressed on the transform object. *** Error in `pdal': munmap_chunk():

> invalid pointer: 0x00007f4ab1fec400 ***

>

> I was looking online and found someone with a similar issue when running

> ogr2ogr to re-project a shapefile. I am able to reproduce an error running

> the command and data described:

 

Nick,

 

Can you point to a link to the source shapefile that triggers the crash ?

 

Even

 

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: illegal axis orientation combination when re-projecting

Nick Cummins
TOWNSSURVEY_POLY.shp in

ogr2ogr -f "GeoJSON" -t_srs EPSG:4326 dest.json TOWNSSURVEY_POLY.shp
produces the error for me

On Sep 12, 2017, at 04:01 PM, Even Rouault <[hidden email]> wrote:

On mardi 12 septembre 2017 21:55:31 CEST Nick Cummins wrote:

> I'm trying to re-project a lidar point cloud file using PDAL, which uses

> GDAL under the hood. When re-projecting a .las tile which I was previously

> able to successfully transform the coordinate system from EPSG:4269

> (lat/lon) to a US state plane projection, EPSG:102749, I now get the

> following error:

>

> (pdal pipeline filters.reprojection Error) GDAL failure (1) illegal axis

> orientation combination (pdal pipeline filters.reprojection Error) GDAL

> failure (1) Reprojection failed, err = -47, further errors will be

> suppressed on the transform object. *** Error in `pdal': munmap_chunk():

> invalid pointer: 0x00007f4ab1fec400 ***

>

> I was looking online and found someone with a similar issue when running

> ogr2ogr to re-project a shapefile. I am able to reproduce an error running

> the command and data described:

 

Nick,

 

Can you point to a link to the source shapefile that triggers the crash ?

 

Even

 

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: illegal axis orientation combination when re-projecting

Nick Cummins
In reply to this post by Even Rouault-2
The source projection is contained in the accompanying .prj file in the zip, so it's probably easiest just to download and extract the zip.

On Sep 12, 2017, at 04:06 PM, Nick Cummins <[hidden email]> wrote:

TOWNSSURVEY_POLY.shp in

ogr2ogr -f "GeoJSON" -t_srs EPSG:4326 dest.json TOWNSSURVEY_POLY.shp
produces the error for me

On Sep 12, 2017, at 04:01 PM, Even Rouault <[hidden email]> wrote:

On mardi 12 septembre 2017 21:55:31 CEST Nick Cummins wrote:

> I'm trying to re-project a lidar point cloud file using PDAL, which uses

> GDAL under the hood. When re-projecting a .las tile which I was previously

> able to successfully transform the coordinate system from EPSG:4269

> (lat/lon) to a US state plane projection, EPSG:102749, I now get the

> following error:

>

> (pdal pipeline filters.reprojection Error) GDAL failure (1) illegal axis

> orientation combination (pdal pipeline filters.reprojection Error) GDAL

> failure (1) Reprojection failed, err = -47, further errors will be

> suppressed on the transform object. *** Error in `pdal': munmap_chunk():

> invalid pointer: 0x00007f4ab1fec400 ***

>

> I was looking online and found someone with a similar issue when running

> ogr2ogr to re-project a shapefile. I am able to reproduce an error running

> the command and data described:

 

Nick,

 

Can you point to a link to the source shapefile that triggers the crash ?

 

Even

 

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: illegal axis orientation combination when re-projecting

Even Rouault-2

On mardi 12 septembre 2017 23:08:13 CEST you wrote:

> The source projection is contained in the accompanying .prj file in the zip,

> so it's probably easiest just to download and extract the zip.

 

I can't reproduce any crash nor error on Ubuntu 16.04 with gdal trunk, head of 2.2 branch or 2.2.1 release.

Which OS do you run ?

If you build GDAL yourself, which configure command line did you use ?

Which proj.4 version do you use ?

Since you probably run Linux from the crash message, can you install valgrind if not already done and run

 

valgrind ogr2ogr -f "GeoJSON" -t_srs EPSG:4326 dest.json TOWNSSURVEY_POLY.shp

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: illegal axis orientation combination when re-projecting

Nick Cummins
In reply to this post by Even Rouault-2
I am using Arch Linux (continuous/rolling distro), using gdal from the official repositories.
Using proj. 4.9.3-1 from official repos.
As mentioned, previously (within the past month) the first re-projection example was working fine. Suddenly today I was analyzing a different tile and ran into the error, and I have not made any changes to my setup that I am aware of that would change behavior. 

Output of running ogr2ogr with valgrind in attached file.

Thanks,
Nick

On Sep 12, 2017, at 04:28 PM, Even Rouault <[hidden email]> wrote:

On mardi 12 septembre 2017 23:08:13 CEST you wrote:

> The source projection is contained in the accompanying .prj file in the zip,

> so it's probably easiest just to download and extract the zip.

 

I can't reproduce any crash nor error on Ubuntu 16.04 with gdal trunk, head of 2.2 branch or 2.2.1 release.

Which OS do you run ?

If you build GDAL yourself, which configure command line did you use ?

Which proj.4 version do you use ?

Since you probably run Linux from the crash message, can you install valgrind if not already done and run

 

valgrind ogr2ogr -f "GeoJSON" -t_srs EPSG:4326 dest.json TOWNSSURVEY_POLY.shp

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

valgrind-ogr2ogr-reproject.txt (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: illegal axis orientation combination when re-projecting

Even Rouault-2

On mardi 12 septembre 2017 23:47:09 CEST Nick Cummins wrote:

> I am using Arch Linux (continuous/rolling distro), using gdal from the

> official repositories.

>

> Using proj. 4.9.3-1 from official repos.

> As mentioned, previously (within the past month) the first re-projection

> example was working fine. Suddenly today I was analyzing a different tile

> and ran into the error, and I have not made any changes to my setup that I

> am aware of that would change behavior. 

>

> Output of running ogr2ogr with valgrind in attached file.

 

It crashes in proj.4. But the lines mentionned are weird : pj_free (pj_init.c:496). At line 496 of pj_init.c, this is not the pj_free() function. Perhaps due to optimizations that mess up line reporting. I tried with proj 4.9.3 and it works fine for me.

 

I see from

https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/gdal that archlinux doesn't build with GDAL with --with-static-proj4, so I'm wondering if there isn't a mix of proj.4 versions. Isn't there a chance that one of the dependencies of GDAL links against a libproj.so.X (spatialite could be a good candidate) and that GDAL then loads a libproj.so that is a symlink to libproj.so.Y

Can you check your /usr/lib/libproj.so* files ?

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: illegal axis orientation combination when re-projecting

Nick Cummins
In reply to this post by Even Rouault-2
➜ ls -lah /usr/lib/ | grep -i libproj  
lrwxrwxrwx   1 root root    17 Sep 14  2016 libproj.so -> libproj.so.12.0.0
lrwxrwxrwx   1 root root    17 Sep 14  2016 libproj.so.12 -> libproj.so.12.0.0
-rwxr-xr-x   1 root root  423K Sep 14  2016 libproj.so.12.0.0

Also,
➜ ldd /usr/bin/ogr2ogr | grep -i proj
libproj.so.12 => /usr/lib/libproj.so.12 (0x00007fcbcfd92000)
➜ /usr/bin/ogr2ogr | grep -i spatial
libspatialite.so.7 => /usr/lib/libspatialite.so.7 (0x00007f20274ad000)
➜ ldd /usr/lib/libspatialite.so.7 | grep -i proj
libproj.so.12 => /usr/lib/libproj.so.12 (0x00007f7c7a032000)

➜ print $LD_LIBRARY_PATH
/usr/lib:/usr/lib32

On Sep 13, 2017, at 02:22 AM, Even Rouault <[hidden email]> wrote:

On mardi 12 septembre 2017 23:47:09 CEST Nick Cummins wrote:

> I am using Arch Linux (continuous/rolling distro), using gdal from the

> official repositories.

>

> Using proj. 4.9.3-1 from official repos.

> As mentioned, previously (within the past month) the first re-projection

> example was working fine. Suddenly today I was analyzing a different tile

> and ran into the error, and I have not made any changes to my setup that I

> am aware of that would change behavior. 

>

> Output of running ogr2ogr with valgrind in attached file.

 

It crashes in proj.4. But the lines mentionned are weird : pj_free (pj_init.c:496). At line 496 of pj_init.c, this is not the pj_free() function. Perhaps due to optimizations that mess up line reporting. I tried with proj 4.9.3 and it works fine for me.

 

I see from

https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/gdal that archlinux doesn't build with GDAL with --with-static-proj4, so I'm wondering if there isn't a mix of proj.4 versions. Isn't there a chance that one of the dependencies of GDAL links against a libproj.so.X (spatialite could be a good candidate) and that GDAL then loads a libproj.so that is a symlink to libproj.so.Y

Can you check your /usr/lib/libproj.so* files ?

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: illegal axis orientation combination when re-projecting

Nick Cummins
In reply to this post by Even Rouault-2
Hey, I was able to solve by issue by compiling and installing GDAL from source with --with-static-proj4 set. Thanks for the help.

On Sep 13, 2017, at 09:58 AM, Nick Cummins <[hidden email]> wrote:

➜ ls -lah /usr/lib/ | grep -i libproj  
lrwxrwxrwx   1 root root    17 Sep 14  2016 libproj.so -> libproj.so.12.0.0
lrwxrwxrwx   1 root root    17 Sep 14  2016 libproj.so.12 -> libproj.so.12.0.0
-rwxr-xr-x   1 root root  423K Sep 14  2016 libproj.so.12.0.0

Also,
➜ ldd /usr/bin/ogr2ogr | grep -i proj
libproj.so.12 => /usr/lib/libproj.so.12 (0x00007fcbcfd92000)
➜ /usr/bin/ogr2ogr | grep -i spatial
libspatialite.so.7 => /usr/lib/libspatialite.so.7 (0x00007f20274ad000)
➜ ldd /usr/lib/libspatialite.so.7 | grep -i proj
libproj.so.12 => /usr/lib/libproj.so.12 (0x00007f7c7a032000)

➜ print $LD_LIBRARY_PATH
/usr/<a href="lib:/usr/lib32" data-mce-href="https://www.icloud.com/message/current/en-us/lib:/usr/lib32">lib:/usr/lib32

On Sep 13, 2017, at 02:22 AM, Even Rouault <[hidden email]> wrote:

On mardi 12 septembre 2017 23:47:09 CEST Nick Cummins wrote:

> I am using Arch Linux (continuous/rolling distro), using gdal from the

> official repositories.

>

> Using proj. 4.9.3-1 from official repos.

> As mentioned, previously (within the past month) the first re-projection

> example was working fine. Suddenly today I was analyzing a different tile

> and ran into the error, and I have not made any changes to my setup that I

> am aware of that would change behavior. 

>

> Output of running ogr2ogr with valgrind in attached file.

 

It crashes in proj.4. But the lines mentionned are weird : pj_free (pj_init.c:496). At line 496 of pj_init.c, this is not the pj_free() function. Perhaps due to optimizations that mess up line reporting. I tried with proj 4.9.3 and it works fine for me.

 

I see from

https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/gdal that archlinux doesn't build with GDAL with --with-static-proj4, so I'm wondering if there isn't a mix of proj.4 versions. Isn't there a chance that one of the dependencies of GDAL links against a libproj.so.X (spatialite could be a good candidate) and that GDAL then loads a libproj.so that is a symlink to libproj.so.Y

Can you check your /usr/lib/libproj.so* files ?

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: illegal axis orientation combination when re-projecting

Even Rouault-2

On jeudi 14 septembre 2017 03:41:33 CEST Nick Cummins wrote:

> Hey, I was able to solve by issue by compiling and installing GDAL from

> source with --with-static-proj4 set. Thanks for the help.

>

 

Hum this could well be a sign that there's another libproj.so lying in your filesystem in a directory in the library search paths, perhaps in /usr/local/lib or LD_LIBRARY_PATH or in one of the directories pointed by ld.so.conf. Otherwise I don't have an explanation why this would crash.

 

>

> On Sep 13, 2017, at 09:58 AM, Nick Cummins <[hidden email]> wrote:

>

>

> ➜ ls -lah /usr/lib/ | grep -i libproj  

> lrwxrwxrwx   1 root root    17 Sep 14  2016 libproj.so -> libproj.so.12.0.0

> lrwxrwxrwx   1 root root    17 Sep 14  2016 libproj.so.12 ->

> libproj.so.12.0.0 -rwxr-xr-x   1 root root  423K Sep 14  2016

> libproj.so.12.0.0

>

> Also,

> ➜ ldd /usr/bin/ogr2ogr | grep -i proj

> libproj.so.12 => /usr/lib/libproj.so.12 (0x00007fcbcfd92000)

> ➜ /usr/bin/ogr2ogr | grep -i spatial

> libspatialite.so.7 => /usr/lib/libspatialite.so.7 (0x00007f20274ad000)

> ➜ ldd /usr/lib/libspatialite.so.7 | grep -i proj

> libproj.so.12 => /usr/lib/libproj.so.12 (0x00007f7c7a032000)

>

> ➜ print $LD_LIBRARY_PATH

> /usr/lib:/usr/lib32

>

>

> On Sep 13, 2017, at 02:22 AM, Even Rouault <[hidden email]>

> wrote:

> On mardi 12 septembre 2017 23:47:09 CEST Nick Cummins wrote:

> > I am using Arch Linux (continuous/rolling distro), using gdal from the

> >

> > official repositories.

> >

> >

> >

> > Using proj. 4.9.3-1 from official repos.

> >

> > As mentioned, previously (within the past month) the first re-projection

> >

> > example was working fine. Suddenly today I was analyzing a different tile

> >

> > and ran into the error, and I have not made any changes to my setup that I

> >

> > am aware of that would change behavior. 

> >

> >

> >

> > Output of running ogr2ogr with valgrind in attached file.

>

>  

>

> It crashes in proj.4. But the lines mentionned are weird : pj_free

> (pj_init.c:496). At line 496 of pj_init.c, this is not the pj_free()

> function. Perhaps due to optimizations that mess up line reporting. I tried

> with proj 4.9.3 and it works fine for me.

>

>  

>

> I see from

>

> https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packa

> ges/gdal that archlinux doesn't build with GDAL with --with-static-proj4, so

> I'm wondering if there isn't a mix of proj.4 versions. Isn't there a chance

> that one of the dependencies of GDAL links against a libproj.so.X

> (spatialite could be a good candidate) and that GDAL then loads a

> libproj.so that is a symlink to libproj.so.Y

>

> Can you check your /usr/lib/libproj.so* files ?

>

>  

>

> Even

>

>  

>

> --

>

> Spatialys - Geospatial professional services

>

> http://www.spatialys.com

 

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev