[gdal-dev] Require Help Transforming into Equirectangular

Vincent Schut schut at sarvision.nl
Wed Dec 1 04:30:34 EST 2010


On 11/30/2010 10:21 PM, ssobieraj wrote:
>
> Hello,
>
> I'm trying to use FWTools to transform from an arbitrary Datum/Projection
> pair in an arbitrary format into a Geographic (lat/lon) projection with the
> WGS84 ellipsoid in GeoTiff format.
>
> To do this, I've tried the following:
>
> gdalwarp -s_srs Input.prj -t_srs Output.prj Input.xyz Output.tif
>
> Where Input.prj is formatted in Well-Known-Text format and contains
> information specifically for the Input.xyz file.
> Output.prj is also in WKT format but contains the following:
>
> GEOGCS["Geographic Coordinate
> System",DATUM["WGS84",SPHEROID["WGS84",6378137,298.257223560493]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]
>
> ***
> I've been successful in using this set-up for transforming from UTM
> projection in WGS84 datum, but I am having trouble transforming from
> Sinusoidal projection in RT90 datum.  The output file is no longer skewed in
> the Sinusoidal projection, but I cannot seem to get the datum information to
> coincide, resulting in a 10+ km discrepancy.
>
> A copy of the WKT-formatted PRJ file is seen below:
>
> PROJCS["Sinusoidal",GEOGCS["Geographic Coordinate
> System",DATUM["RT90",SPHEROID["Bessel
> 1841",6377397.155,299.1528131060786]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Sinusoidal"],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]
>
> Any ideas as to why I would be experiencing this offset?
>
>
>
> Regards,
> Scott
>
>
Scott,

it is not exactly what you ask, but it might help you in the right 
direction: to convert modis sinusoidal rasters with a custom sphere to 
wgs84 latlon, I use the following line (in a bash script):

gdalwarp -s_srs '+proj=sinu +R=6371007.181 +nadgrids=@null +wktext' 
-t_srs EPSG:4326 -srcnodata 0 -dstnodata 0 -r cubic -co "TILED=YES" -co 
"TFW=YES"  ${INFILE} ${OUTFILE}

(Note that I use proj notation instead of wkt formatting, I would not 
know how to translate this into wkt).

Best,
Vincent.


More information about the gdal-dev mailing list