Martin Geng wrote:
I have a city map in Cassini_Soldner projection with a separate file
containing the Soldner coordinates of the 4 corners.
I want to reproject it to WGS84 in order to render it e.g. with SharpMap and
display some GPS positions.
I have tried it with some different parameter settings of gdalwarp but in
> every case the resulting image is distorted (the size of the generated tif is
decreased to 15141, 6943).
Even if with the parameter -ts 15118 11339 the original size is adjusted
SharpMap or QGis will display it distorted (IrfanView without distortion).
Is there another way to get a non distorted image or what did I wrong?
Martin
..\FWTools2.4.2\bin>gdalinfo pic.tif
Driver: GTiff/GeoTIFF
Files: pic.tif
Size is 15118, 11339
...
gcp mapX mapY pixelX pixelY
------------------------------------------------
upper left 27200 17200 0 0
upper right 30400 17200 15118 0
lower right 30400 14800 15118 -11339
lower left 27200 14800 0 -11339
Gcp mapX mapY pixelX pixelY
-------------------------------------------------------
upper left 13.4370322252183 52.4818154665202 0 0
upper right 13.4841338099227 52.4818815506509 15118 0
lower right 13.4842034283538 52.4603136448411 15118 -11339
lower left 13.4371248633278 52.4602476117909 0 -11339
Martin,
Examining the GCPs in WGS84 space I see:
>>> (13.4841338099227 - 13.4370322252183) / 15118
3.1155962894827404e-06
>>> "%.10f" % ((13.4841338099227 - 13.4370322252183) / 15118)
'0.0000031156'
>>> "%.10f" % ((52.4818154665202 - 52.4602476117909)/ 11339)
'0.0000019021'
Basically, in WGS84 space your source pixels are distinctly
non-square and gdalwarp distorts your image to produce square
pixels in the output projection. If you want to preserve
the original aspect ratio try:
-tr 0.0000031 0.0000019
on the gdalwarp commandline.
But basically WGS84 and Cassini-Soldner have quite different
characteristics in the area of your image, and WGS84 may not
be a good working coordinate system for the image.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev