[Proj] gdalwarp EPSG:32662 problem

Stephen Woodbridge woodbri at swoodbridge.com
Sat Feb 8 09:44:29 EST 2014


Hi Janne, Antti,

I gues a better question is using gdalwarp, what is the correct way to 
project this image so it aligns. given the behavior has changed between 
the two versions of proj4 that I listed below.

Reading the links people have posted explains the difference, but it is 
not clear to me if changing the epsg file or the command line and how is 
the right thing to do here.

Thanks,
   -Steve

My gdalwarp command is:

gdalwarp -rcs -ts 8800 6600 -s_srs EPSG:32662 -t_srs EPSG:4326 
$temptiff1 $target

The gdalinfo on the image is:

root at u17269306:/maps/images.tmp# gdalinfo 
MODIS.2014038.193758.fullpass.seadas_sst.hdf
Driver: HDF4/Hierarchical Data Format Release 4
Files: MODIS.2014038.193758.fullpass.seadas_sst.hdf
Size is 512, 512
Coordinate System is `'
Metadata:
   Collection Location=USF Institute for Marine Remote Sensing
   Data Source Type=Direct Broadcast
   Input File(s)=/tmp/s4p_run_map_modis_2.3_WSthzYwz/A2014038193749.GEO, 
/tmp/s4p_run_map_modis_2.3_WSthzYwz/A2014038193749.L2_LAC_SST, 
/tmp/s4p_run_map_modis_2.3_WSthzYwz/A2014038194019.GEO, 
/tmp/s4p_run_map_modis_2.3_WSthzYwz/A2014038194019.L2_LAC_SST, 
/tmp/s4p_run_map_modis_2.3_WSthzYwz/A2014038194249.GEO, 
/tmp/s4p_run_map_modis_2.3_WSthzYwz/A2014038194249.L2_LAC_SST, 
/tmp/s4p_run_map_modis_2.3_WSthzYwz/A2014038194519.GEO, 
/tmp/s4p_run_map_modis_2.3_WSthzYwz/A2014038194519.L2_LAC_SST, 
/tmp/s4p_run_map_modis_2.3_WSthzYwz/A2014038194749.GEO, 
/tmp/s4p_run_map_modis_2.3_WSthzYwz/A2014038194749.L2_LAC_SST
   L3 Software Name=/usr/bin/map_modis.pl
   L3 Software Version=4.2
   Map Limit=-5, -125, 55, -45
   Map Projection Category=Proj 4.4.7
   Map Projection Name=eqc
   Processing Status=intermediate
   Proj Projection Parameters=#Equidistant Cylindrical (Plate Caree)
#       Cyl, Sph
#       lat_ts=
# +proj=eqc +ellps=WGS84
   Satellite=aqua
   Spatial Resolution=1km
   Temporal Resolution=pass
Subdatasets:
 
SUBDATASET_1_NAME=HDF4_SDS:UNKNOWN:"MODIS.2014038.193758.fullpass.seadas_sst.hdf":0
   SUBDATASET_1_DESC=[6600x8800] seadas_sst (16-bit integer)
 
SUBDATASET_2_NAME=HDF4_SDS:UNKNOWN:"MODIS.2014038.193758.fullpass.seadas_sst.hdf":1
   SUBDATASET_2_DESC=[6600x8800] l2_flags (32-bit integer)
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  512.0)
Upper Right (  512.0,    0.0)
Lower Right (  512.0,  512.0)
Center      (  256.0,  256.0)

On 2/8/2014 8:23 AM, support.mn at elisanet.fi wrote:
> Hello,
>
> the new version of proj.4 does not make any datum or ellipsoidal
> shift if not both source and destination datums are defined.. the older
> version did some other assumptions.. this is the most often reason
> for some shifts between versions.
>
> see also:
> http://comments.gmane.org/gmane.comp.gis.proj-4.devel/6045
>
> Regards: Janne.
>
> ---------------------------------------------------------------------------------------
>
>
> Stephen Woodbridge [woodbri at swoodbridge.com] kirjoitti:
>> Hi,
>>
>> Sorry for cross posting. This seems like a proj4 issue but might be gdal
>> related.
>>
>> I've run into a problem that I think is related to a change in the EPSG
>> definition for EPSG:32662
>>
>> The symptom is that the image after gdalwarp reprojection is about 20km
>> south of where it should be.
>>
>> old system is correctly aligned:
>>
>> GDAL 1.4.2.0, released 2007/06/27
>> proj Rel. 4.5.0, 22 Oct 2006
>>
>> # WGS 84 / Plate Carree
>> <32662> +proj=eqc +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84
>> +datum=WGS84 +units=m +no_defs  <>
>>
>> new system is shifted about 20km south:
>>
>> GDAL 1.9.2, released 2012/10/08
>> proj Rel. 4.8.0, 6 March 2012
>>
>> # WGS 84 / Plate Carree (deprecated)
>> <32662> +proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84
>> +units=m +no_defs  <>
>>
>>
>> http://spatialreference.org/ref/epsg/32662/
>> This indicates that the definition in proj 4.8.0 is wrong. Would the
>> +ellps=WGS84 account for this shift?
>>
>> Any thoughts on this?
>>
>> Thanks,
>>     -Steve
>> _______________________________________________
>> Proj mailing list
>> Proj at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/proj
>>
>
>
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj
>



More information about the Proj mailing list