[Gdal-dev] csharp spatialreference normalization.....problem?
Tim Osborn
tosborn at sbcglobal.net
Wed May 16 20:47:07 EDT 2007
I'm programming in Visual Basic 2005 Express using the csharp dll's
distributed with FWTools 1.3.1.
I have a geotiff that produces the following output, in part, from gdalinfo:
PROJCS["NAD83 Arkansas State Planes, Northern Zone, US Foot",
GEOGCS["NAD83",
DATUM["North_American_Datum_1983",
SPHEROID["GRS 1980",6378137,298.2572221010002,
AUTHORITY["EPSG","7019"]],
AUTHORITY["EPSG","6269"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4269"]],
PROJECTION["Lambert_Conformal_Conic_2SP"],
PARAMETER["standard_parallel_1",36.2333333333333],
PARAMETER["standard_parallel_2",34.9333333333333],
PARAMETER["latitude_of_origin",34.3333333333333],
PARAMETER["central_meridian",-92],
PARAMETER["false_easting",1312333.2916615],
PARAMETER["false_northing",0],
UNIT["US survey foot",0.3048006096012192,
AUTHORITY["EPSG","9003"]]]
Origin = (673800.376251435020000,634598.712631960050000)
Pixel Size = (1.000032169999991,-1.000116180000028)
As the gdalinfo output shows, the image is projected in a state plane
coordinate system with
US Survey Feet as the linear units. Also, the geotransform parameters are
also in US Survey Feet.
In Visual Basic, using the csharp dlls, when I obtain a spatial reference to
this same file by invoking
Dim srcSrs As New OSGeo.OGR.SpatialReference(ds.GetProjection())
I get the following prettywkt output:
PROJCS["NAD83 Arkansas State Planes, Northern Zone, US Foot",
GEOGCS["NAD83",
DATUM["North_American_Datum_1983",
SPHEROID["GRS 1980",6378137,298.2572221010002,
AUTHORITY["EPSG","7019"]],
AUTHORITY["EPSG","6269"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4269"]],
PROJECTION["Lambert_Conformal_Conic_2SP"],
PARAMETER["standard_parallel_1",36.2333333333333],
PARAMETER["standard_parallel_2",34.9333333333333],
PARAMETER["latitude_of_origin",34.3333333333333],
PARAMETER["central_meridian",-92],
PARAMETER["false_easting",399999.9872983998],
PARAMETER["false_northing",0],
UNIT["unknown",1]]
Apparently, the spatial refence is getting normalized from US Survey feet to
meters, but the geotransform
parameters I subsequently get from the image remain in US Survey feet. If I
get the LinearUnitsName from
the spatial reference, all it returns is "unknown." So I have a disconnect
between the linear units of the normalized spatial reference and the linear
units of the geotransform.
Am I overlooking something or is this problem in that the csharp procedures
work differently from the C++ counterparts? Is there a way to force the
csharp Get.Projection or spatialreference assignment procedures to not
normalize?
Thanks for your help.
Tim Osborn
--
View this message in context: http://www.nabble.com/csharp-spatialreference-normalization.....problem--tf3769441.html#a10657074
Sent from the GDAL - Dev mailing list archive at Nabble.com.
More information about the Gdal-dev
mailing list