[gdal-dev] GDAL and Sentinel2

nguler at jlab.org nguler at jlab.org
Wed Jan 13 10:32:43 PST 2016


Dear GDAL users,

I am trying to extract some map information from geotiff files. I need to
access this information to generate an ENVI file header.

I use
hDS->GetGeoTransform(adfGeoTransform);
coo_system_str = hDS->GetGCPProjection();
to get some information I need. But still missing few things and I don't know
how to get those. What I get from GetGCPprojection() looks like this:

PROJCS["unnamed",PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]]]

When I open the tif file in ENVI, I see many more information as listed below.
How can I access this information missing from the above commands,
specifically looking for the "Coordinate System String" printed below. Also
why do I get (ROJCS["unnamed",...) while (PROJCS["UTM_Zone_19N",...) is given
when I open the file with ENVI..?

I appreciate your help and suggestions.

---- Map Info Properties ----
Type = Projected
Pixel Tie Point X = 0.5
Pixel Tie Point Y = 0.5
Map Tie Point X = 145200.0
Map Tie Point Y = 2189700.0
Pixel Size X = 30.0
Pixel Size Y = 30.0
Units = Meters
Rotation = 0.0

---- Coordinate System Properties ----
Projcs = "UTM_Zone_19N"
Geogcs = "GCS_WGS_1984"
Datum = "D_WGS_1984"
Spheroid = "WGS_1984",6378137.0,298.257223563
Prime Meridian = "Greenwich",0.0
Unit = "Degree",0.0174532925199433
Projection = "Transverse_Mercator"
False Easting = 500000.0
False Northing = 0.0
Central Meridian = -69.0
Scale Factor = 0.9996
Latitude of Origin = 0.0
Unit = "Meter",1.0
Coordinate System String
 =
PROJCS["UTM_Zone_19N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-69.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

---- Extents Properties ----
Extent Left = 145185.0
Extent Top = 2189715.0
Extent Right = 372315.0
Extent Bottom = 1967385.0
Units = Meters


Best regards,
- Nevzat

P.S. Is there any language preference for UNIT["metre"...] ? From ENVI I get
UNIT["Meter"...]



More information about the gdal-dev mailing list