failed to initialize projection with: '+init=epsg:4326'
masa126 opened this issue · comments
Hi,
When I invoked generate_xml.py scriped in openstreetmap/mapnik-stylesheets repositry, it failed to generate xml file for my database on a Windows machine with mapnik 2.2.0. , python 2.7, postGres 9.6.
The error messages are
Traceback (most recent call last):
File "generate_xml.py", line 204, in
serialize(template_xml,options)
File "generate_xml.py", line 80, in serialize
mapnik.load_map(m,xml,True)
RuntimeError: failed to initialize projection with: '+init=epsg:4326' encountered during parsing of layer 'necountries' in Layer at line 58 of 'osm.xml
It is strange, it worked correctly in the past, maybe 5 years ago.
But I rebuilt the environment on my new machine and encountered this error.
Thank you for your help,
Hello,
I do have the same issue on RHEL 7.9 with "make test".
environment is RHEL 7.9, postgres 9.6, Boost 1.69, python 3.6, mapnik 3.0.24.
`
[osm@toto mapnik]$ make test
- Starting Mapnik tests
- Running C++ Unit tests...
psql (PostgreSQL) 9.2.24
Password:
Password:run is a Catch v1.3.2 host application. Run with -? for options ------------------------------------------------------------------------------- postgis Ping Postmaster (check if server is runnging and accessible ------------------------------------------------------------------------------- test/unit/datasource/postgis.cpp:79 ............................................................................... test/unit/datasource/postgis.cpp:85: warning: Can't run postgis.input tests - check postmaster is running and accessible ------------------------------------------------------------------------------- geometry reprojection test_projection_4326_3857 - Empty Geometry Object ------------------------------------------------------------------------------- test/unit/geometry/geometry_reprojection.cpp:11 ............................................................................... test/unit/geometry/geometry_reprojection.cpp:13: FAILED: due to unexpected exception with message: failed to initialize projection with: '+init=epsg:4326' ... `
I do not see issue with GIS DB:
`[osm@toto~]$ psql -d gis
Password:
psql (9.2.24, server 9.6.24)
WARNING: psql version 9.2, server version 9.6.
Some psql features might not work.
Type "help" for help.gis=> SELECT PostGIS_version();
postgis_version3.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
(1 row)gis=> SELECT PostGIS_full_version();
postgis_full_versionPOSTGIS="3.1.4 ded6c34" [EXTENSION] PGSQL="96" GEOS="3.9.2-CAPI-1.14.3" PROJ="7.2.1" LIBXML="2.9.1" LIBJSON="0.11"
(1 row) `
OK, I fixed the issue by installing more packages:
boost.x86_64 0:1.53.0-28.el7 boost-devel.x86_64 0:1.53.0-28.el7 bzip2-devel.x86_64 0:1.0.6-13.el7 pandoc.x86_64 0:1.12.3.1-2.el7 proj-epsg.x86_64 0:4.8.0-4.el7 cabextract.x86_64 0:1.9-7.el7 gdal.x86_64 0:1.11.4-4.el7 pycairo.x86_64 0:1.8.10-8.el7 ragel.x86_64 0:7.0.0.9-2.el7