[gdal-dev] Unable to create OGRSpatialReference

Frank Warmerdam warmerdam at pobox.com
Fri Oct 19 15:40:22 PDT 2012


On Fri, Oct 19, 2012 at 2:00 PM, jcurru <jcurru at yahoo.es> wrote:

> I often use other programs to display geospatial information, for example
> Global Mapper. It realizes coordinate systems from (for example) shapefiles
> without EPSG, and applies transformations correctly. What am I missing?
>

Jose,

It is hard to answer this very broadly, but it is possible that Global
Mapper
knows how to lookup *ESRI* datum names to find towgs84 parameters.
To some extent we have this information in the system now.  For instance
if you look in gdal_datum.csv, the last column is "ESRI_DATUM_NAME"
and has D_European_1950 for EPSG datum 6230.

The gcs.csv file has a TOWGS84 parameter value for GCS 4230 (which
uses datum 6230).

So in theory given ESRI datum names we ought to be able to (fairly
often) derived a TOWGS84 shift and in fact this should quite possible
be part of the morphFromESRI() process though apparently it is not
now.   It would make it easier to do this if we included the
ESRI_DATUM_NAME field in the gcs.csv file.

So if it is really just the ESRI datum's case that you want to address
lets consider improving the automatic morphing within GDAL/OGR.
I'm willing to help with this.  In fact, digging in the code there seems
to already be some machinery around doing that.  Lets discuss in
more detail the case where it isn't working for you now.

...

OK, I tried:

gdalsrsinfo
ESRI::'GEOGCS["GCS_European_1950",DATUM["D_European_1950",SPHEROID["International_1924",6378388.0,297.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433],AUTHORITY["EPSG",4230]]'

and I get as output:

PROJ.4 : '+proj=longlat +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +no_defs '

OGC WKT :
GEOGCS["GCS_European_1950",
    DATUM["European_Datum_1950",
        SPHEROID["International_1924",6378388.0,297.0]],
    PRIMEM["Greenwich",0.0],
    UNIT["Degree",0.01745329251994

I'm not really sure where the PROJ.4 string is getting the towgs84
parameters,
but there is no evidence that the ESRI datum name lookup is being used to
get these parameters.  I'm up with fixing this with your support (ie.
testing,
prompting).

I still claim solving the problem widely is not really doable.

Best regards,
Frank



> Sorry for my long message, but I've been overwhelmed with this problem for
> two years, and having you across the line gives me a hope. I'm sure there's
> a solution because many systems work fine.
>
> So thank you again.
> Sincerely yours,
> Jose Antonio.
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.n6.nabble.com/Unable-to-create-OGRSpatialReference-tp5009903p5009971.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20121019/7f9414f6/attachment-0001.html>


More information about the gdal-dev mailing list