<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
unfortunately this did not solve the problem. I try to better
describe the problem.<br>
In order to decide if map and dem data files are compatible,
QLandkarteGT evaluate two strings from such files according to the
following procedure<br>
<br>
...
<br>
char str[1024];
<br>
strncpy(str,dataset->GetProjectionRef(),sizeof(str));
<br>
char * ptr = str;
<br>
OGRSpatialReference oSRS;
<br>
oSRS.importFromWkt(&ptr);
<br>
oSRS.exportToProj4(&ptr);
<br>
strOrigProj = strProj = ptr;
<br>
...
<br>
<br>
if the two strings coincides the two files are considered congruent.
<br>
In the case of the two files I'm managing, the following two strings
are obtained<br>
<br>
Map: +proj=utm +zone=32 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m
+no_defs
<br>
DEM: +proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps=WGS84
+towgs84=0,0,0<br>
<br>
As a consequence, nevertheless the two files are compatible the two
strings are different, so that dem data are rejected.<br>
<br>
The question is: is this the only way to check compatibility between
maps and dem data or there is a better and more robust solution?<br>
<br>
Corrado<br>
<br>
<blockquote type="cite">
<pre>Corrado,
I see that the two projections are essentially the same. You may not need
gdalwarp after all. Try the gdal_translate utility with the -a_srs option to
specify the Coordinate System of the output file.
Tell us how it goes.
On Sat, Jun 4, 2011 at 3:30 PM, Corrado Guarino Lo Bianco <
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">guarino at ce.unipr.it</a>> wrote:
><i> Hi all,
</i>><i> I'm a QLandkarteGT user (QLandkarteGT is based on GDAL) and I'm having a
</i>><i> problem related to map formats. I use ecw maps in conjunction with DEM data
</i>><i> stored in geotiff files. In the past I was using GDAL 1.7.2 and I had no
</i>><i> problems. Recently I switched to GDAL 1.8.0 and now QLandkarteGT says that
</i>><i> there is no matching between the projection used for the maps and that used
</i>><i> for DEM data, nevertheless I'm still adopting the same files. By means of
</i>><i> gdalwarp, I have made several unsuccessful attempts to convert DEM data into
</i>><i> a format suitable to be used in conjunction with ecw maps.
</i>><i> Can someone help me?
</i>><i> These are the outputs I get from the ecw and the tiff files when I run
</i>><i> gdalinfo:
</i>><i>
</i>><i> Driver: ECW/ERDAS Compressed Wavelets (SDK 3.x)
</i>><i> Files: /media/IGM 25000/IGM 25.000 - Emilia Romagna.ecw
</i>><i> Size is 96000, 64000
</i>><i> Coordinate System is:
</i>><i> PROJCS["NUTM32",
</i>><i> GEOGCS["WGS 84",
</i>><i> DATUM["WGS_1984",
</i>><i> SPHEROID["WGS 84",6378137,298.257223563,
</i>><i> AUTHORITY["EPSG","7030"]],
</i>><i> TOWGS84[0,0,0,0,0,0,0],
</i>><i> AUTHORITY["EPSG","6326"]],
</i>><i> PRIMEM["Greenwich",0,
</i>><i> AUTHORITY["EPSG","8901"]],
</i>><i> UNIT["degree",0.0174532925199433,
</i>><i> AUTHORITY["EPSG","9108"]],
</i>><i> AXIS["Lat",NORTH],
</i>><i> AXIS["Long",EAST],
</i>><i> AUTHORITY["EPSG","4326"]],
</i>><i> PROJECTION["Transverse_Mercator"],
</i>><i> PARAMETER["latitude_of_origin",0],
</i>><i> PARAMETER["central_meridian",9],
</i>><i> PARAMETER["scale_factor",0.9996],
</i>><i> PARAMETER["false_easting",500000],
</i>><i> PARAMETER["false_northing",0],
</i>><i> UNIT["Meter",1]]
</i>><i> Origin = (510000.000000000000000,5000000.000000000000000)
</i>><i> Pixel Size = (2.500000000000000,-2.500000000000000)
</i>><i> Corner Coordinates:
</i>><i> Upper Left ( 510000.000, 5000000.000) ( 9d 7'37.99"E, 45d 9'12.26"N)
</i>><i> Lower Left ( 510000.000, 4840000.000) ( 9d 7'26.87"E, 43d42'46.65"N)
</i>><i> Upper Right ( 750000.000, 5000000.000) ( 12d10'40.88"E, 45d 6'33.26"N)
</i>><i> Lower Right ( 750000.000, 4840000.000) ( 12d 6' 3.79"E, 43d40'15.39"N)
</i>><i> Center ( 630000.000, 4920000.000) ( 10d37'59.07"E, 44d25'17.84"N)
</i>><i> Band 1 Block=96000x1 Type=Byte, ColorInterp=Red
</i>><i> Overviews: 48000x32000, 24000x16000, 12000x8000, 6000x4000, 3000x2000,
</i>><i> 1500x1000, 750x500, 375x250
</i>><i> Band 2 Block=96000x1 Type=Byte, ColorInterp=Green
</i>><i> Overviews: 48000x32000, 24000x16000, 12000x8000, 6000x4000, 3000x2000,
</i>><i> 1500x1000, 750x500, 375x250
</i>><i> Band 3 Block=96000x1 Type=Byte, ColorInterp=Blue
</i>><i> Overviews: 48000x32000, 24000x16000, 12000x8000, 6000x4000, 3000x2000,
</i>><i> 1500x1000, 750x500, 375x250
</i>><i>
</i>><i>
</i>><i>
</i>><i> Driver: GTiff/GeoTIFF
</i>><i> Files: /media/Dati/Documenti/gps tuner/Altimetrie Italia/Emilia
</i>><i> Romagna/Emilia_Romagna.tif
</i>><i> Size is 4074, 4262
</i>><i> Coordinate System is:
</i>><i> PROJCS["WGS 84 / UTM zone 32N",
</i>><i> GEOGCS["WGS 84",
</i>><i> DATUM["WGS_1984",
</i>><i> SPHEROID["WGS 84",6378137,298.257223563,
</i>><i> AUTHORITY["EPSG","7030"]],
</i>><i> AUTHORITY["EPSG","6326"]],
</i>><i> PRIMEM["Greenwich",0],
</i>><i> UNIT["degree",0.0174532925199433],
</i>><i> AUTHORITY["EPSG","4326"]],
</i>><i> PROJECTION["Transverse_Mercator"],
</i>><i> PARAMETER["latitude_of_origin",0],
</i>><i> PARAMETER["central_meridian",9],
</i>><i> PARAMETER["scale_factor",0.9996],
</i>><i> PARAMETER["false_easting",500000],
</i>><i> PARAMETER["false_northing",0],
</i>><i> UNIT["metre",1,
</i>><i> AUTHORITY["EPSG","9001"]],
</i>><i> AUTHORITY["EPSG","32632"]]
</i>><i> Origin = (499966.037957447464578,5101878.644408876076341)
</i>><i> Pixel Size = (80.031641738007920,-80.031641738007920)
</i>><i> Metadata:
</i>><i> AREA_OR_POINT=Area
</i>><i> Image Structure Metadata:
</i>><i> COMPRESSION=DEFLATE
</i>><i> INTERLEAVE=BAND
</i>><i> Corner Coordinates:
</i>><i> Upper Left ( 499966.038, 5101878.644) ( 8d59'58.42"E, 46d 4'13.74"N)
</i>><i> Lower Left ( 499966.038, 4760783.787) ( 8d59'58.50"E, 42d59'58.99"N)
</i>><i> Upper Right ( 826014.946, 5101878.644) ( 13d12'35.68"E, 45d59'34.36"N)
</i>><i> Lower Right ( 826014.946, 4760783.787) ( 12d59'42.00"E, 42d55'47.82"N)
</i>><i> Center ( 662990.492, 4931331.216) ( 11d 3' 3.01"E, 44d31' 0.81"N)
</i>><i> Band 1 Block=256x256 Type=Int16, ColorInterp=Gray
</i>><i>
</i>><i>
</i>><i> Thank you for your help,
</i>><i> Corrado
</i>><i>
</i>><i> _______________________________________________
</i>><i> gdal-dev mailing list
</i>><i> <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">gdal-dev at lists.osgeo.org</a>
</i>><i> <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</i>><i>
</i>
--
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <a href="http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110604/0ddf02fe/attachment-0001.html">http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110604/0ddf02fe/attachment-0001.html</a></pre>
</blockquote>
<br>
</body>
</html>