I'm trying to import some OSM data into psql as equirectangular projection using osm2pgsql with the following command:
osm2pgsql -c -d osm -S /usr/local/share/osm2pgsql/default.style -l /OPENSTREETMAP/south-america-latest.osm.pbf
However, it fails with this error:
Projection code failed to initialise
I have installed the latest version of the PROJ framework from here.
What am I doing wrong?
EDIT 1:
Running 'select * from spatial_ref_sys where srid=4326;' on the database produces this:
srid | auth_name | auth_srid | srtext | proj4text
------+-----------+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------
4326 | EPSG | 4326 | GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] | +proj=longlat +datum=WGS84 +no_defs
(1 row)
select * from spatial_ref_sys where srid=4326;
run on the database report?~/osm2pgsql/osm2pgsql -c -d osm -S /usr/local/share/osm2pgsql/default.style -l /OPENSTREETMAP/south-america-latest.osm.pbf
. The exact path will depend on where you downloaded osm2pgsql and built it.