[Gdal-dev] OGR and ODGI: reprojection problem

Markus Neteler neteler at itc.it
Thu Oct 14 10:58:06 EDT 2004


Hi,

for a long time I am trying to convert/reproject the
VMAP0 to SHAPE/PostGIS/WGS84.

Today I have updated another time OGDI and compiled with:
 ./configure --with-proj --with-zlib --with-expat

This should use the external PROJ4 as far as I understand.
Still no hope:

ogr2ogr -t_srs +init=epsg:4326 -nlt LINESTRING coastl_eurnasia_wgs84.shp gltp:/vrf/grass0/warmerdam/v0eur/vmaplv0/eurnasia 'coastl at bnd(*)_line'
ERROR 6: Failed to initialize PROJ.4 with `+proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs '.
unknown projection id
Failed to create coordinate transformation between the
following coordinate systems.  This may be because they
are not transformable, or because projection services
(PROJ.4 DLL/.so) could not be loaded.
Source:
GEOGCS["NAD83",
    DATUM["North_American_Datum_1983",
        SPHEROID["GRS 1980",6378137,298.257222101,
            AUTHORITY["EPSG","7019"]],
        TOWGS84[0,0,0,0,0,0,0],
        AUTHORITY["EPSG","6269"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9108"]],
    AXIS["Lat",NORTH],
    AXIS["Long",EAST],
    AUTHORITY["EPSG","4269"]]
Target:
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.01745329251994328,
        AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4326"]]


But: I have recompiled PROJ4 with the NAD files:
ls /usr/local/share/proj/
alaska  epsg  FL    hawaii  nad27  nad.lst       null          prvi      stlrnc  TN  WO
conus   esri  GL27  MD      nad83  ntv1_can.dat  proj_def.dat  stgeorge  stpaul  WI  world

Trying the command line version of 'cs2cs':

cs2cs -v +proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs +to +proj=longlat +ellps=WGS84
# ---- From Coordinate System ----
#Lat/long (Geodetic)
#
# +proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs +towgs84=0,0,0
#--- following specified but NOT used
# +ellps=GRS80
# ---- To Coordinate System ----
#Lat/long (Geodetic)
#
# +proj=longlat +ellps=WGS84
10.0001E 10.0001N
10d0'0.36"E     10d0'0.36"N -0.000

It's at least doing something.

Checking with 'ldd' reports:

ldd /usr/local/bin/ogr2ogr | grep 'ogdi\|proj'
        libogdi31.so => /usr/local/lib/libogdi31.so (0x40367000)
        libzlib_ogdi31.so => /usr/local/lib/libzlib_ogdi31.so (0x4063c000)
        libexpat_ogdi31.so => /usr/local/lib/libexpat_ogdi31.so (0x40649000)

ldd /usr/local/lib/libgdal.so | grep 'ogdi\|proj'
        libogdi31.so => /usr/local/lib/libogdi31.so (0x4033a000)
        libzlib_ogdi31.so => /usr/local/lib/libzlib_ogdi31.so (0x40626000)
        libexpat_ogdi31.so => /usr/local/lib/libexpat_ogdi31.so (0x40633000)

ldd /usr/local/lib/libogdi.so | grep 'ogdi\|proj'
        libzlib_ogdi31.so => /usr/local/lib/libzlib_ogdi31.so (0x40052000)
        libexpat_ogdi31.so => /usr/local/lib/libexpat_ogdi31.so (0x4005f000)

No indication that libproj.so is used (which is there as well).

Any ideas what could be wrong? I'm getting desperated now... :-)

Best regards

 Markus Neteler




More information about the Gdal-dev mailing list