[gdal-dev] Dataset setProjection() method sets PROJCS to "unnamed"
Rebo Ghecin
demolar at gmail.com
Tue Feb 10 03:10:14 PST 2015
Hi,
I want to change my Dataset's projection but I have a trouble with it.
I have custom projection like below:
PROJCS["UTM3 Degree ITRF96 DOM39",
GEOGCS["GCS_ITRF_1996",
DATUM["D_ITRF_1996",
SPHEROID["GRS_1980", 6378137.0, 298.257222101]],
PRIMEM["Greenwich", 0.0],
UNIT["degree", 0.017453292519943295],
AXIS["Longitude", EAST],
AXIS["Latitude", NORTH]],
PROJECTION["Transverse_Mercator"],
PARAMETER["central_meridian", 39.0],
PARAMETER["latitude_of_origin", 0.0],
PARAMETER["scale_factor", 1.0],
PARAMETER["false_easting", 500000.0],
PARAMETER["false_northing", 0.0],
UNIT["m", 1.0],
AXIS["x", EAST],
AXIS["y", NORTH],
AUTHORITY["EPSG","10103390"]]
and this is how I changed it:
String test = "PROJCS[\"UTM3 Degree ITRF96 DOM39\",
GEOGCS[\"GCS_ITRF_1996\", DATUM[\"D_ITRF_1996\",
SPHEROID[\"GRS_1980\", 6378137.0, 298.257222101]],
PRIMEM[\"Greenwich\", 0.0], UNIT[\"degree\", 0.017453292519943295],
AXIS[\"Longitude\", EAST], AXIS[\"Latitude\", NORTH]],
PROJECTION[\"Transverse_Mercator\"], PARAMETER[\"central_meridian\",
39.0], PARAMETER[\"latitude_of_origin\", 0.0],
PARAMETER[\"scale_factor\", 1.0], PARAMETER[\"false_easting\", 500000.0],
PARAMETER[\"false_northing\", 0.0], UNIT[\"m\", 1.0], AXIS[\"x\", EAST],
AXIS[\"y\", NORTH], AUTHORITY[\"EPSG\",\"10103390\"]]";
SpatialReference oSRS = new SpatialReference();
oSRS.ImportFromWkt(test);
inputDataset.SetProjection(oSRS.ExportToWkt());
and it returns
PROJCS["unnamed",
GEOGCS["GCS Name = GCS_ITRF_1996",
DATUM["Datum = D_ITRF_1996",
SPHEROID["Ellipsoid = GRS_1980", 6378137.0, 298.257222101]],
PRIMEM["Greenwich", 0.0],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH]],
PROJECTION["Transverse_Mercator"],
PARAMETER["central_meridian", 39.0],
PARAMETER["latitude_of_origin", 0.0],
PARAMETER["scale_factor", 1.0],
PARAMETER["false_easting", 500000.0],
PARAMETER["false_northing", 0.0],
UNIT["m", 1.0],
AXIS["Easting", EAST],
AXIS["Northing", NORTH]]
I have created custom.wkt file and include it in epsg.wkt at "gdal_data"
folder but this is also not working for me.
custom.wkt content:
10103390,PROJCS["UTM3 Derece ITRF96
DOM39",GEOGCS["GCS_ITRF_1996",DATUM["D_ITRF_1996",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",39.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0],
AUTHORITY["EPSG","10103390"]]
Also I tried to set PROJCS like this
oSRS.SetProjCS("My Proj"); but didn't work.
Any idea with this?
Thanks
Rebo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150210/702dbfb5/attachment-0001.html>
More information about the gdal-dev
mailing list