On Fri, Oct 19, 2012 at 7:41 AM, jcurru <jcu...@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, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Software Developer
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev