Gridded export of an Elevation File
PeterDrexel
Global Mapper UserTrusted User
Mike
in GM 13.2 and 14.1 if I export a .img-Elevation-Modell to Arc Ascii Tiles using Gridding based on a Shapefile containing rectangles (10000x10000 m) I get asciifiles like this one (which is perfect):
ncols 10000
nrows 10000
xllcorner -45000
yllcorner 275000
cellsize 0.0
nodata_value -9999.0
-9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0
....
if I want the Files to Overlap say 1% I choose Oberlap Grid Cells by 1 % (100m in all directions) then I get the following result:
ncols 10200
nrows 10200
xllcorner -45049.995
yllcorner 274950.005
cellsize 0.499999019512
nodata_value -9999.0
-9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0
...
the xllcorner / yllcorner - Values are both of by 5mm and the Cellsize is also wrong.
It must look this way:
ncols 10200
nrows 10200
xllcorner -45050
yllcorner 274950
cellsize 0.5
nodata_value -9999.0
-9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0
....
I need the exact kkordinates, because later in the process-chain I recombine buffered (overlapping) Grids with non-overlapping Grids and get wrong results!
Thanks
Peter
in GM 13.2 and 14.1 if I export a .img-Elevation-Modell to Arc Ascii Tiles using Gridding based on a Shapefile containing rectangles (10000x10000 m) I get asciifiles like this one (which is perfect):
ncols 10000
nrows 10000
xllcorner -45000
yllcorner 275000
cellsize 0.0
nodata_value -9999.0
-9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0
....
if I want the Files to Overlap say 1% I choose Oberlap Grid Cells by 1 % (100m in all directions) then I get the following result:
ncols 10200
nrows 10200
xllcorner -45049.995
yllcorner 274950.005
cellsize 0.499999019512
nodata_value -9999.0
-9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0
...
the xllcorner / yllcorner - Values are both of by 5mm and the Cellsize is also wrong.
It must look this way:
ncols 10200
nrows 10200
xllcorner -45050
yllcorner 274950
cellsize 0.5
nodata_value -9999.0
-9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0
....
I need the exact kkordinates, because later in the process-chain I recombine buffered (overlapping) Grids with non-overlapping Grids and get wrong results!
Thanks
Peter
Comments
-
Peter,
I took a look and discovered that the overlap when doing an elevation export wasn't calculating the X and Y spacing correctly. I have fixed that now. I have placed a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper14.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v14.xx installation folder to give it a try. If you are using the 64-bit v14 version there is a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper14_64bit.zip .
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/ -
Mike,
I habe updated the Programm, but it seems it still does not work correctly...
Without overlapping I get
ncols 10000
nrows 10000
xllcorner -45000.000
yllcorner 275000.000
cellsize 0.5
nodata_value -9999.0
-9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 ...
with overlapping 1 pix (50cm)I get
ncols 10002
nrows 10002
xllcorner -45001.000
yllcorner 274999.500
cellsize 0.500049995
nodata_value -9999.0
-9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 ...
...xllcorner and cellsize are wrong, should be -45000.500 / 0.5
with overlapping 100 pixel (50m) I get
ncols 10200
nrows 10200
xllcorner -45050.500
yllcorner 274950.000
cellsize 0.500049024414
nodata_value -9999.0
-9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0
...xllcorner and cellsize are again wrong, should be -45050.000 / 0.5.
Thanks
Peter -
Peter,
Do you perhaps have the option checked to maintain export bounds over spacing in the Advanced section of the General tab of the Configuration dialog? That could cause what you are seeing. In my tests the adjustment is correct without that option checked.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/ -
Mike,
still the same Isue:
I dit upload you my Sampledata here:
ftp://ftp_lvauser:!ftpdownload@ftp.vorarlberg.at/Peter/gm.zip
so I hope you can now reproduce the isue:
What i dit:
I did run GM 14.1 64 bit Build jan 30 2013
I dit update with the provided .zip - (some of the provided Files in the zip were older then the already installed Build jan 30 2013-Files ie QuickPDFDLL.DLL etc.).
I dit restore to the Default Settings in the General-Tab of the Configuration.
The Archive contains
5000er.shp: The Boundry-Shape auf the "Big" Elevation Grid I want to clip (gt_5m12255000.asc)
1000er.shp: The Boundry-Shape auf the "Smal" Elevation Grid I want to create.
gt_5m_exact_1225092.asc: The Grid I get when I just Export Elevation Grid Format ArcAscii - Gridding - Use Selected Area Features - no Overlap - Select Grid Cell Naming "V1_NR_TXT" - Crop = NO.
-> Perfect Result:
GM Metadata:
FILENAME=D:\gm\gt_5m_exact_1225092.asc
DESCRIPTION=gt_5m_exact_1225092.asc
UPPER LEFT X=-39372.500 (is the Center of the Pixel)
UPPER LEFT Y=248997.500 (is the Center of the Pixel)
LOWER RIGHT X=-38752.500 (is the Center of the Pixel)
LOWER RIGHT Y=248502.500 (is the Center of the Pixel)
WEST LONGITUDE=9° 48' 42.8103" E
NORTH LATITUDE=47° 22' 45.1199" N
EAST LONGITUDE=9° 49' 12.5248" E
SOUTH LATITUDE=47° 22' 28.9570" N
PROJ_DESC=Austrian Grid / AUSTRIA / meters
PROJ_DATUM=MGI AUSTRIA
PROJ_UNITS=meters
EPSG_CODE=31254
COVERED AREA=0.3069 sq km
NUM COLUMNS=125
NUM ROWS=100
PIXEL WIDTH=5 meters
PIXEL HEIGHT=5 meters
MIN ELEVATION=1078.56 meters
MAX ELEVATION=1269.34 meters
ELEVATION UNITS=meters
BIT_DEPTH=24
-> Extent is 625x500m ranging from -39375/249000 to -38750/248500
-> Lower Right x - Upper Left x = 620 (perfect)
-> Upper Left Y - Lower Right y = 495 (perfect)
ASCII-File:
ncols 125
nrows 100
xllcorner -39375.000
yllcorner 248500.000
cellsize 5
nodata_value -9999.0
1078.6 1079.62 1080.33 1081.48 1082.82 1086.45 1086.53 1088.95 1090.78 1093.34 1094.65 1096.23 1097.63 1099.92 ...
______________________________________
gt_5m_1pix_default_1225092.asc: The Grid I get when I use Export Elevation Grid Format ArcAscii - Gridding - Use Selected Area Features - 1 pix Overlapp - Select Grid Cell Naming "V1_NR_TXT" - Crop = NO.
-> Result:
GM Metadata:
FILENAME=D:\gm\gt_5m_1pix_default_1225092.asc
DESCRIPTION=gt_5m_1pix_default_1225092.asc
UPPER LEFT X=-39382.500
UPPER LEFT Y=249007.500
LOWER RIGHT X=-38747.500
LOWER RIGHT Y=248497.500
WEST LONGITUDE=9° 48' 42.3304" E
NORTH LATITUDE=47° 22' 45.4448" N
EAST LONGITUDE=9° 49' 12.7647" E
SOUTH LATITUDE=47° 22' 28.7929" N
PROJ_DESC=Austrian Grid / AUSTRIA / meters
PROJ_DATUM=MGI AUSTRIA
PROJ_UNITS=meters
EPSG_CODE=31254
COVERED AREA=0.3239 sq km
NUM COLUMNS=127
NUM ROWS=102
PIXEL WIDTH=5.04 meters
PIXEL HEIGHT=5.05 meters
MIN ELEVATION=1076.25 meters
MAX ELEVATION=1271.2 meters
ELEVATION UNITS=meters
BIT_DEPTH=24
-> Extent should now be 635x510m ranging from -39380/248995 to -38745/248505 (Overlapp is 1pix in all directions)
-> Lower Right x - Upper Left x = 635 (should be 630 as the coodinates are of Pixel-Center)
-> Upper Left Y - Lower Right y = 510 (should be 505 as the coodinates are of Pixel-Center)
ASCII-File:
ncols 127
nrows 102
xllcorner -39385.020
yllcorner 248494.975
xdim 5.039682539683
ydim 5.049504950495
nodata_value -9999.0
1076.25 1077.25 1078.44 1080.44 1081.57 1082.58 1083.86 1086.77 1087.15 1089.4 1090.73 1093.37 ...
the
xllcorner should be -39380 (is the ll of the pixel and not the center)
yllcorner should be 248495 (is the ll of the pixel and not the center)
the xdim and the ydim both should be 5
When I multiply the (nrows-1) with ydim I get 510
When I multiply the (ncols-1) with xdim I get 635
The resulting overlapping grid is 5m to wide and 5m to high,
The Overlapp in the Lower Right Corner is fine, but in the Upper Left Corner it is 10/10m.
Thanks
Peter -
Peter,
Ah ok I see now, it was the gridding to a selected area with overlap where the mis-calculation was and I wasn't doing that step. It was treating the bounds as display vs. grid cell center bounds when doing the overlap for that particular case. I have fixed that now and seem to get the same results you are after. I have placed a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper14.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v14.xx installation folder to give it a try. If you are using the 64-bit v14 version there is a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper14_64bit.zip .
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/ -
Mike,
works now, good job!
Thanks
Peter
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 627 GM Script Language
- 52 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