[FWTools] shift in contours lines gdal vs. grass gis

Rengifo Ortega rengifoo at yahoo.de
Thu Sep 8 08:27:49 EST 2011


Dear Chaitanya ,
I checked the contours generation function and it was indeed of a lot of help. First all, I realised that the mistake was located in the bounding box of the SRTM file, also called region in GRASS GIS software. I realised that,  the SRTM file had been previously clipped  and it cointain large NODATA areas, which for a reason not still clear to me, generated a displacement of GDAL generated contours in relation to the GRASS GIS generated contours. After correcting the Region extent in GRASS GIS, before exporting it, I was able to correct the relative error from +/- 35 meters to 2.5 cm, which is insignificant considering that I am working with a SRTM90 meters.
Thanks a lot  for your hint !

regards
Rengifo



________________________________
Von: Chaitanya kumar CH <chaitanya.ch at gmail.com>
An: Rengifo Ortega <rengifoo at yahoo.de>
Cc: "FWTools at lists.maptools.org" <FWTools at lists.maptools.org>
Gesendet: 15:59 Mittwoch, 31.August 2011 
Betreff: Re: [FWTools] shift in contours lines gdal vs. grass gis


Rengifo,

Can you compare the two contours with the pixel values? Which contours are shifted?
FYI, you can read the algorithm rules in the docs of GDALContourGenerate() function[1].

[1]: http://www.gdal.org/gdal__alg_8h.html#ceaf98ad40f159cbfb626988c054c085


On Wed, Aug 31, 2011 at 6:42 PM, Rengifo Ortega <rengifoo at yahoo.de> wrote:

Dear gdal
users
> 
>I hope you
can help me with a question that is puzzling me, since a couple of days. So let
me explain my problem.
> 2 years ago,
I downloaded a SRTM 90m .asc file into GRASS GIS. 
>A week ago, I
decided to generate some contours lines using gdal_contour command (version FWTools2.4.7)
and compare the contours lines with contours already produced in GRASS GIS. I was quite
disturbed when in fact, I found a horizontal shift of the contours lines to the
south of about -/+35m or to north (unknown distance), with respect to the grass gis- generated contours
>
> 
>Technical aspect of my hardware
>
> 
>I amin Grass GIS  MS Windows environment (native using MinGW)
combined with QGIS for visualisation purposes
>Using FWtools
2.4.7
> 
>So, here are
the steps I followed
> 
>Part I
> 
>-Produced 90m contours lines in GRASS
GIS out of the SRTM DEM 90 by using the r.contour command
>-Visualised the contours lines in QGIS
and saved them as shp format
> 
> 
>Part II
>1)   -Export SRTM 90 rasterfile as  an ESRI ASCII GRID fomat and converted it to .tif
format using FWTools2.4.7
>2)       Using gdal_contours utility I generated 90
meters contour lines
> 
> Results 1
>
>Comparison
between the GRASS-generated and the GDAL- generated contours lines exhibited a horizontal
shift of -/+ 35m to the south in relation to GRASS GIS generated contours
> 
>Part III
>1--Export the raster file SRTM90m from
GRASS GIS; as a Geotiff using gdal
>
>-Generate 90m contours using gdal
>
>
> 
>Result 2 
> 
>Comparing the GRASS GIS contours with the geotiff- generated contours a
displacement to the north was observed, no distance measured.
>
>
>I hope you can give some hints..
>best regards 
>Rengifo
>
>
>
>_______________________________________________
>FWTools mailing list
>FWTools at lists.maptools.org
>http://lists.maptools.org/mailman/listinfo/fwtools
>http://fwtools.maptools.org/
>
>


-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20110908/103137be/attachment.htm 


More information about the FWTools mailing list