6

I'm processing ASTER DEM tiles, merging them into larger blocks (to minimize visible tile edges) and importing the contours into a postgis database. Workflow:

gdal_merge.py -of GTiff -o merged.tif tile1.tif tile2.tif
gdal_contour -i 10 -a ele -snodata -9999 merged.tif contours.shp
ogr2ogr -f PostgreSQL -nln srtm4 -append -t_srs 'EPSG:3785' contours.shp

For some reason the resulting "merged" contours have grid-like artifacts:

enter image description here

When I skip the merge step and process the same two GeoTiffs separately, there are no artifacts. I've tried merging with gdalbuildvrt and got the same grid effect. Why is this happening? How can I avoid this? Thanks in advance.

3

Turns out this is a projection issue. Prior to merging, I'm reprojecting the tiles from EPSG:4326 to EPSG:3785. When this is done after the merge no problems occur.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.