Hi Even,
Thanks for the reply.

I guess GDAL chose Mercator_1SP because that's the one that's explicitly 
defined in the projection text.


I've had a quick look at the two files using listgeo, and highlighted the 
different lines with **** prefix below (it seems GDAL removes 6 tags, and adds 
one).


The before:
   Keyed_Information:
      GTModelTypeGeoKey (Short,1): ModelTypeProjected
      GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
      GTCitationGeoKey (Ascii,9): "Mercator"
      GeographicTypeGeoKey (Short,1): GCS_WGS_84
      GeogCitationGeoKey (Ascii,7): "WGS 84"
  ****GeogGeodeticDatumGeoKey (Short,1): Datum_WGS84
  ****GeogLinearUnitsGeoKey (Short,1): Linear_Meter 
      GeogAngularUnitsGeoKey (Short,1): Angular_Degree
  ****GeogEllipsoidGeoKey (Short,1): Ellipse_WGS_84
      GeogSemiMajorAxisGeoKey (Double,1): 6378137
  ****GeogSemiMinorAxisGeoKey (Double,1): 6356752.31424518
      GeogInvFlatteningGeoKey (Double,1): 298.257223563
      ProjectedCSTypeGeoKey (Short,1): User-Defined
  ****PCSCitationGeoKey (Ascii,9): "Mercator"
      ProjectionGeoKey (Short,1): User-Defined
      ProjCoordTransGeoKey (Short,1): CT_Mercator
      ProjLinearUnitsGeoKey (Short,1): Linear_Meter
  ****ProjStdParallel1GeoKey (Double,1): 60
      ProjNatOriginLongGeoKey (Double,1): 0
      ProjNatOriginLatGeoKey (Double,1): 0
      ProjFalseEastingGeoKey (Double,1): 0
      ProjFalseNorthingGeoKey (Double,1): 0
      End_Of_Keys.
   
------------
The after:
   Keyed_Information:
      GTModelTypeGeoKey (Short,1): ModelTypeProjected
      GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
      GTCitationGeoKey (Ascii,9): "Mercator"
      GeographicTypeGeoKey (Short,1): GCS_WGS_84
      GeogCitationGeoKey (Ascii,7): "WGS 84"
      GeogAngularUnitsGeoKey (Short,1): Angular_Degree
      GeogSemiMajorAxisGeoKey (Double,1): 6378137
      GeogInvFlatteningGeoKey (Double,1): 298.257223563
      ProjectedCSTypeGeoKey (Short,1): User-Defined
      ProjectionGeoKey (Short,1): User-Defined
      ProjCoordTransGeoKey (Short,1): CT_Mercator
      ProjLinearUnitsGeoKey (Short,1): Linear_Meter
      ProjNatOriginLongGeoKey (Double,1): 0
      ProjNatOriginLatGeoKey (Double,1): 0
      ProjFalseEastingGeoKey (Double,1): 0
      ProjFalseNorthingGeoKey (Double,1): 0
  ****ProjScaleAtNatOriginGeoKey (Double,1): 1
      End_Of_Keys.
   End_Of_Geotiff.
   


I'm not clear on why the things that changed were changed, but I can see that 
GDAL removed the ProjStdParallel1GeoKey and value. Should not that have been 
displayed by GDALSRSInfo for the Before file, even if it was wrongly set for 
this given projection?


Thanks,
Jonathan


---- On Tue, 17 Nov 2015 09:18:49 -0800 Even 
Rouault<even.roua...@spatialys.com> wrote ---- 

Le mardi 17 novembre 2015 17:55:15, Jonathan Moules a écrit : 
> Hi List, 
> I have a Geotiff which includes this projection: 
> 
> PROJ.4 : '+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m 
> +no_defs ' 
> 
> 
> OGC WKT : 
> PROJCS["Mercator", 
> GEOGCS["WGS 84", 
> DATUM["WGS_1984", 
> SPHEROID["WGS 84",6378137,298.257223563, 
> AUTHORITY["EPSG","7030"]], 
> AUTHORITY["EPSG","6326"]], 
> PRIMEM["Greenwich",0], 
> UNIT["degree",0.0174532925199433], 
> AUTHORITY["EPSG","4326"]], 
> PROJECTION["Mercator_1SP"], 
> PARAMETER["central_meridian",0], 
> PARAMETER["scale_factor",1], 
> PARAMETER["false_easting",0], 
> PARAMETER["false_northing",0], 
> UNIT["metre",1, 
> AUTHORITY["EPSG","9001"]]] 
> 
> 
> 
> 
> If I load this raster into ArcGIS, it displays in the wrong place (a few 
> thousand kilometres North). 
> 
> 
> I then run it through gdal_translate (GDAL 1.11.1), with no flags: 
> * gdal_trainslate input.tif output.tif 
> 
> For output.tif, GDALSRSInfo shows that the projection is identical, but 
now 
> the file loads correctly in ArcGIS. The same file works fine in QGIS both 
> before and after the "translation". 
> 
> 
> Looking at the projection info in ArcGIS, it displays one difference: 
> Before (not working): 
> Standard_parallel_1 = 60 
> 
> 
> After (working): 
> Standard_parallel_1 = 0 
> 
> 
> But I don't see anything about those in either of the GDALSRSInfo outputs. 
> 
> 
> So my questions: 
> - What is gdal_translate doing to the file to "fix" it? 
> - If it is something to do with Standard Parallel 1 - why isn't this 
> component of the projection exposed by GDAL? 
 
Yes, in Mercator_1SP, there's no Standard Parallel 1, this is for 
Mercator_2SP. 
 
See 
http://www.remotesensing.org/geotiff/proj_list/mercator_1sp.html 
http://www.remotesensing.org/geotiff/proj_list/mercator_2sp.html 
 
I guess your original geotiff file has some unusual formulation which is 
detected as Mercator_1SP by GDAL, and probably Mercator_2SP by ArCGIS. 
 
You could try with the listgeo utility that comes with libgeotiff to display 
the geotiff keys. 
 
> 
> Thoughts welcome. 
> Thanks, 
> Jonathan 
 
-- 
Spatialys - Geospatial professional services 
http://www.spatialys.com 





_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to