tilezen / joerd

Joerd can be used to download, merge and generate tiles from digital elevation data
MIT License
318 stars 49 forks source link

Wrong elevation at high zoom levels #192

Open sameersb opened 3 years ago

sameersb commented 3 years ago

For many places, after certain zoom level, elevation value is wrong. Examples while using terrarium tiles,

Example 1: Latitude: -78.996578, Longitude: 19.218528 Elevation Value 3208m (correct) for zoom level 4 and below. Elevation Value 170m (wrong) for zoom level 5 and above.

Example 2: Latitude: -24.728372, Longitude: 43.810335 Elevation Value -1782m (correct) for zoom level 10 and below. Elevation Value 0m (wrong) for zoom level 11 and above.

Thanks & regards

sameersb commented 3 years ago

One more place, weird data Latitude: 44.483966, Longitude: -86.740183 Elevation Value 177m (correct) for zoom level except 5. Elevation Value -80m (wrong) for zoom level 5.

nvkelso commented 3 years ago

Can you give an example for each with a tile coordinate filename with zoom, x, y please? Above and below can be confusing when talking about zoom levels (and map scale in general).

sameersb commented 3 years ago

Latitude: 44.483966, Longitude: -86.740183 correct: https://s3.amazonaws.com/elevation-tiles-prod/terrarium/6/16/23.png wrong: https://s3.amazonaws.com/elevation-tiles-prod/terrarium/5/8/11.png

Latitude: -78.996578, Longitude: 19.218528 correct: https://s3.amazonaws.com/elevation-tiles-prod/terrarium/4/8/13.png wrong: https://s3.amazonaws.com/elevation-tiles-prod/terrarium/5/17/27.png

Latitude: -24.728372, Longitude: 43.810335 correct: https://s3.amazonaws.com/elevation-tiles-prod/terrarium/10/636/584.png wrong: https://s3.amazonaws.com/elevation-tiles-prod/terrarium/11/1273/1169.png

nvkelso commented 3 years ago

Some comments:

Can you clarify what you mean by "wrong"? The elevation at a given pixel will always have some rounding errors thru the zoom ranges. Are you talking about it going from having a non-zero value to zero? Or infinite heights? Or within ±100m change in value from zoom to zoom?

sameersb commented 3 years ago

Thanks nvkelso for your comments. The second example is from Antarctica. "wrong" means the pixel value itself is far different from zoom to zoom (difference is more than 100m) I can understand rounding errors but I found the errors are more than 100m as follow,

Latitude: 44.483966, Longitude: -86.740183
correct: 177m /6/16/23.png wrong: -80m /5/8/11.png (Except zoom level 5, at all other zoom levels pixel value is correct)

Latitude: -78.996578, Longitude: 19.218528 (Antarctica) correct: 3208m /4/8/13.png wrong: 170m /5/17/27.png (Far difference in pixel value)

Latitude: -24.728372, Longitude: 43.810335 correct: -1782m /10/636/584.png wrong: 0m /11/1273/1169.png (I understand that this is due to coastline merge)

sameersb commented 3 years ago

The tile /12/1135/1743.png in Florida, United State has totally wrong values. Also on zooming in that tile area, the many child tiles also has wrong values. Request to please check the issue.

sameersb commented 3 years ago

The tile https://s3.amazonaws.com/elevation-tiles-prod/terrarium/11/483/850.png near Galveston, Texas, United State also has wrong values. Many nearby tiles also has wrong values.

sameersb commented 3 years ago

The tile https://s3.amazonaws.com/elevation-tiles-prod/terrarium/11/483/850.png near Galveston, Texas, United State also has wrong values. Many nearby tiles also has wrong values.

Simply compare following two images with successive X position, they are completely different https://s3.amazonaws.com/elevation-tiles-prod/terrarium/11/482/850.png https://s3.amazonaws.com/elevation-tiles-prod/terrarium/11/483/850.png

There are many such tiles in the United States

nvkelso commented 3 years ago

Related marblecutter issue: https://github.com/mojodna/marblecutter/issues/73

sameersb commented 2 years ago

Another example, For location with Latitude: 25.511027 Longitude: -97.829837 elevation is 13 at zoom level 10 and at zoom level 11, elevation is 7

nvkelso commented 2 years ago

We've narrowed this down to an issue with how the GeoTIFF overviews are created and passed to GDAL as VRTs. We're testing the fix, and are in discussions with AWS to do a new global build to make the fix available on S3.

sameersb commented 2 years ago

That's really an excellent news... waiting eagerly....

sameersb commented 1 year ago

We've narrowed this down to an issue with how the GeoTIFF overviews are created and passed to GDAL as VRTs. We're testing the fix, and are in discussions with AWS to do a new global build to make the fix available on S3.

Just wanted to know when is it expected to available on AWS? Thanks

sameersb commented 1 year ago

We've narrowed this down to an issue with how the GeoTIFF overviews are created and passed to GDAL as VRTs. We're testing the fix, and are in discussions with AWS to do a new global build to make the fix available on S3.

@nvkelso kind request to make the fix available on S3