[Gdal-dev] OGR Error on State Plane transform

Garvan Keeley garvank at optech.on.ca
Fri May 30 14:09:02 EDT 2003


Hi Frank,
the version of GDAL is from CVS, the last update was March 24. I'll pull the
latest and rebuild.

I am using Windows, Visual C++.

The code:

	OGRSpatialReference source;
	OGRSpatialReference destination;
	OGRCoordinateTransformation* transform;

	source.SetWellKnownGeogCS("NAD83");
	destination.SetWellKnownGeogCS("NAD83"); 
	destination.SetStatePlane(101, true);

	transform = OGRCreateCoordinateTransformation(&source,
&destination);
	if (transform != NULL) {
		double x = -87.0, y = 30.5;
		OGRErr err = transform->Transform(1, &x, &y, NULL);
		if (err != OGRERR_NONE)
			TRACE("%s\n", CPLGetLastErrorMsg());
		
		TRACE("Transform Result: %f %f  \n", x, y);
		delete transform;    
	}




> Garvan,
> 
> What version of GDAL are you using?  Note that GDAL now 
> (since the EPSG 6.2.2 upgrade a couple of months ago) uses 
> more csv files than those distributed with libgeotiff, so it 
> is necessary for GDAL to find the files in the gdal/data 
> directory.  These include a file listing state plane zones 
> and "concatenated" information about files projected and 
> geographic coordinate systems.
> 
> However, the message you are getting about horiz_cs.csv is 
> odd.  The horiz_cs.csv doesn't exist anymore.  It seems 
> likely you are either using old software, or there is a part 
> of GDAL (or libgeotiff) that hasn't been updated to the new 
> scheme properly.  To track that down I need details of the 
> version of GDAL, command and projections involved.
> 
> 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 
> Programmer for Rent
> 
> 
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at remotesensing.org 
> http://remotesensing.org/mailman/listinfo/gdal-> dev
> 



More information about the Gdal-dev mailing list