[gdal-dev] Unable to create OGRSpatialReference
Frank Warmerdam
warmerdam at pobox.com
Fri Oct 19 12:17:16 PDT 2012
On Fri, Oct 19, 2012 at 7:41 AM, jcurru <jcurru at yahoo.es> wrote:
> Hello!
>
> I have an old problem with TOWGS84 and OGRSpatialReference. Most likely
> it's
> because I'm no expert in GDAL. It is important for my project, and limits
> many of its capabilities. The fact is that, for unknown reasons (to me),
> proj4 does not do well conversions between coordinate system if there are
> not a TOWGS84 nodes inside the OGRSpatialReference(s).
>
> First of all: is this so? Do I really need that node? If not properly
> added,
> clearly some conversions fail.
>
JCurru,
PROJ.4 should still handle reprojection for coordinate systems without
a TOWGS84 or other datum relationship to WGS84 *but* it will ignore
datum shifting if the source and destination coordinate system do not
have well defined relationships to WGS84. So the results will (often)
be somewhat inaccurate. How big an issue this is will depend on your
application and the typical coordinate systems you work with.
> I continue: Imagine getting an OGRSpatialReference a shapefile or a TIF. To
> assign the node TOWGS84, what I do is look into the file "EPSG", found in
> many sites related to GDAL, that contains a list of EPSGs with
> corresponding
> parameters. Knowing the EPSG, I can generate the TOWGS84 node smoothly.
>
> The problem comes when I do not know the OGRSpatialReference’s EPSG,
> something very common: AutoIdentifyEPSG () gets nothing most of the time,
> at
> least with the systems in which I work.
>
> So what to do then? I need the TOWGS84 node but, with my knowledge, I can
> only get it from the EPSG.
>
If you want to handle a datum shift properly and you don't know how
the datum of your coordinate system relates to WGS84 then you are
essentially out of luck.
Best regards,
--
---------------------------------------+--------------------------------------
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/74c299d6/attachment.html>
More information about the gdal-dev
mailing list