Erdas Img Elev Export
PeterDrexel
Global Mapper UserTrusted User
Mike,
(GM13.2)
I try to resample a 1m-Raster-Evation-Modell stored as a 32bit-img-File to a 10m-img-File.
Find the Files here:
ftp://ftp_lvauser:!ftpdownload@ftp.vorarlberg.at/Peter/gm.zip
If I open the 1m.img-file and export it to a 10m-img-file_from_1m-img.img the Elvation-modell gets "tiled",
if I export the 1m.img-file to a 1m-elevation-tif and then export the 1m-Tif to a 10m-img-file_from_1m-tif.img the Elvation-modell gets fine.
If I calculte the differences between the models they are 0 for the 1m.img compared to the 1m.tif, but quite big for the 10m-imgs from the different sources.
Any Ideas?
Thanks
Peter
(GM13.2)
I try to resample a 1m-Raster-Evation-Modell stored as a 32bit-img-File to a 10m-img-File.
Find the Files here:
ftp://ftp_lvauser:!ftpdownload@ftp.vorarlberg.at/Peter/gm.zip
If I open the 1m.img-file and export it to a 10m-img-file_from_1m-img.img the Elvation-modell gets "tiled",
if I export the 1m.img-file to a 1m-elevation-tif and then export the 1m-Tif to a 10m-img-file_from_1m-tif.img the Elvation-modell gets fine.
If I calculte the differences between the models they are 0 for the 1m.img compared to the 1m.tif, but quite big for the 10m-imgs from the different sources.
Any Ideas?
Thanks
Peter
Comments
-
Peter,
What do you mean by "tiled"? By default the sub-sample export will switch to a box maximizer to elevation exports so long as you haven't disabled automatic interpolation during export. I wouldn't expect a 0 difference when comparing a sub-sampled 10m DEM to the original 1m DEM as the pixels are different sizes. If a box maximizer was used each 10m cell would have the maximum of cells around the 1m sample and not just the elevation at the center.
Once other thing that might be affecting this is a clamp to whole number elevation values. Many integer elevation formats snap values to the nearest whole number elevation value, is that the "tiling" you are referring to? The floating point formats would be fine though.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com -
Mike,
in the zip-file you can find 4 different Elevation Models:
1m.tif: a 32bit 1m-raster-elevation modell
1m.img: the same modell stored as 32bit img-file
These 2 files a identical (in terms of the elevations), if you calculate a differencd-modell it is 0 everywhere.
10m-img-file_from_1m-img.img: a 32bit 10m elevation-modell I crated from the the 1m.img-File
10m-img-file_from_1m-tif.img: a 32bit 10m elevation-modell I crated from the the 1m.tif-File
these 2 10m-elevation-modells are NOT identical!
The 2 different sources (the 1m-img and the 1m-tif) are identical and i use the same process to get to the 10m-elevation-grids the results are different...
Thanks
Peter -
Peter,
Ah this was a tricky one to track down. The Erdas Imagine image has overview layers, so when you do a sub-sampled export from the .img file the data is pulled from the overview layer that best matches the export resolution rather than the full detail layer like the TIFF is, so you get different results. A full sampled export is of course the same as the overview layers don't come into play there.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com -
Mike,
thanks for your quick answer!
But the results I get are not satisfying because it seams that there is a systematic error added to the data.
I have placed an other example here ftp://ftp_lvauser:!ftpdownload@ftp.vorarlberg.at/Peter/gm2.zip.
If you calculate the difference between the 2 10m-Grids you can see a regular pattern of the residuals!
You can even see this if you just look on the 10m_raster_From_1m-img.img-File, what is definitely not good as I then have this pattern in all the hillshades etc...
Thanks
Peter -
Peter,
If you don't create your .img files with overview layers then you wouldn't see this issue. It is only happening because it is exporting from the already sub-sampled overview layer to speed up the export that you are seeing the differences. If the input files don't have the overview layers then everything will come from the most detailed layer. There is probably some pattern caused by the sub-sampling of the already sub-sampled area, but if you are going from 1m to 10m you are going to get some significant losses anyway.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com -
Mike,
so it seems that I am loosing more quality then necessary. Everything works fine if I start the resampling from a Globalmapper Rastercatalog (500 2500x2500m large Tiles with 1m Resolution as img), but it takes quite a long time.
My plan was to switch to one big (25 GB) 1m-Raster-Img as source to produce al the other Producs (different Resolutions, Hillshades etc.).
So I am stuck to my Catalog now... although it is still strange that I can see a pattern in the resampled result. It seems that Globalmapper / Gdal uses the wrong pyramid-level to do the export, because if the resolution of the used level would be higher then the export-resolution I shoud not end up with a ground noise pattern in the export-Data. And it is this pattern what make the Results useless for me because the Hillshades etc. look really ugly and are not useable as background-layer in mit Topomap.
Thanks
Peter -
Peter,
The issue is one of speed vs. quality. To get the best quality you would want the sub-sampled export to not use the pre-existing overview layers on export and instead resample from the full detail layer. However that is likely going to be several times slower than resampling from the overview layer.
What you might try (and what I am going to make the code automatically do for files with overview layers) is to go to the Advanced Section of the General tab of the Configuration dialog and check the option to Disable Automatic Interpolation of Resampled Exports, then try it. That should prevent the box averaging of the already resampled overview layer so you will just directly sample that overview layer and get whatever is in that. However if that overview layer isn't pretty then you will see that. The overview layers were only meant for zoomed out views so you aren't supposed to see them all zoomed in anyway.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website