Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elevetion files don't have the right resolution #11

Open
ahcorde opened this issue Apr 14, 2020 · 1 comment
Open

Elevetion files don't have the right resolution #11

ahcorde opened this issue Apr 14, 2020 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ahcorde
Copy link
Contributor

ahcorde commented Apr 14, 2020

I have been checking sand_island and mcmillan_airfield worlds. There is an issue with the resolution of the elevation files. For example, sand_island is 62x52 which is wrong according with the documentation. The right resolution is 2^n + 1 x 2^n + 1, for example 129 x 129, 513 x 513, etc.

I have modified this line in the readme.md instrucctions:

gdalwarp -te $WEST $SOUTH $EAST $NORTH $SOURCE_DEM  $OUTPUT_DEM

to

gdalwarp -te $WEST $SOUTH $EAST $NORTH $SOURCE_DEM  $OUTPUT_DEM -ts 129 129

But the elevation file is still wrong.

@ahcorde ahcorde added bug Something isn't working help wanted Extra attention is needed labels Apr 14, 2020
@ahcorde
Copy link
Contributor Author

ahcorde commented Apr 15, 2020

The elevation file (3601x3601) downloaded from https://earthexplorer.usgs.gov/ looks like:

Selección_023

after using the command

gdalwarp -te $WEST $SOUTH $EAST $NORTH $SOURCE_DEM  $OUTPUT_DEM -ts 129 129

Selección_024

NOTE: You should visualize these images with qgis otherwise you will see something like:

sand_island_elevation

This is the metadata generated by gdalwarp:

---- ExifTool ----
ExifTool Version Number         : 10.80
---- System ----
File Name                       : sand_island_elevation.tif
Directory                       : media
File Size                       : 34 kB
File Modification Date/Time     : 2020:04:15 15:16:35+02:00
File Access Date/Time           : 2020:04:15 15:16:39+02:00
File Inode Change Date/Time     : 2020:04:15 15:16:35+02:00
File Permissions                : rw-r--r--
---- File ----
File Type                       : TIFF
File Type Extension             : tif
MIME Type                       : image/tiff
Exif Byte Order                 : Little-endian (Intel, II)
---- IFD0 ----
Image Width                     : 129
Image Height                    : 129
Bits Per Sample                 : 16
Compression                     : Uncompressed
Photometric Interpretation      : BlackIsZero
Strip Offsets                   : 1629 9627 17625 25623 33621
Samples Per Pixel               : 1
Rows Per Strip                  : 31
Strip Byte Counts               : 7998 7998 7998 7998 1290
Planar Configuration            : Chunky
Sample Format                   : Signed
Pixel Scale                     : 8.99224806200556e-05 8.99224806201658e-05 0
Model Tie Point                 : 0 0 0 -157.89455503876 21.3179060387597 0
GDAL Metadata                   : <GDALMetadata>.  <Item name="DTED_CompilationDate">0002</Item>.  <Item name="DTED_DataEdition">02</Item>.  <Item name="DTED_DigitizingSystem">SRTM      </Item>.  <Item name="DTED_HorizontalAccuracy">0009</Item>.  <Item name="DTED_HorizontalDatum">WGS84</Item>.  <Item name="DTED_MaintenanceDate">0000</Item>.  <Item name="DTED_MaintenanceDescription">0000</Item>.  <Item name="DTED_MatchMergeDate">0000</Item>.  <Item name="DTED_MatchMergeVersion">A</Item>.  <Item name="DTED_NimaDesignator">DTED2</Item>.  <Item name="DTED_OriginLatitude">0210000N</Item>.  <Item name="DTED_OriginLongitude">1580000W</Item>.  <Item name="DTED_Producer">USCNIMA </Item>.  <Item name="DTED_RelHorizontalAccuracy">NA  </Item>.  <Item name="DTED_RelVerticalAccuracy">0010</Item>.  <Item name="DTED_SecurityCode_DSI">U</Item>.  <Item name="DTED_SecurityCode_UHL">U  </Item>.  <Item name="DTED_UniqueRef_DSI">J19 065        </Item>.  <Item name="DTED_UniqueRef_UHL">J19 065     </Item>.  <Item name="DTED_VerticalAccuracy_ACC">0008</Item>.  <Item name="DTED_VerticalAccuracy_UHL">0008</Item>.  <Item name="DTED_VerticalDatum">E96</Item>.  <Item name="UNITTYPE" sample="0" role="unittype">m</Item>.</GDALMetadata>.
GDAL No Data                    : -32767
---- GeoTiff ----
Geo Tiff Version                : 1.1.0
GT Model Type                   : Geographic
GT Raster Type                  : Pixel Is Point
Geographic Type                 : WGS 84
Geog Citation                   : WGS 84
Geog Angular Units              : Angular Degree
Geog Semi Major Axis            : 6378137
Geog Inv Flattening             : 298.257223563
---- Composite ----
Image Size                      : 129x129
Megapixels                      : 0.017

Relevant data

Bits Per Sample : 16
Sample Format : Signed

Is this format right for heighmaps?

@tfoote ote and @chapulina do you have some idea about what is going on here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant