opengeospatial / geopackage-tiled-gridded-coverage

A GeoPackage extension for tiled, gridded coverage data
Apache License 2.0
5 stars 8 forks source link

Elevation sample points vs areas and resampling methods #27

Closed tseval closed 3 years ago

tseval commented 8 years ago

I can not find anything in the specification on how the elevation samples should be georeferenced, if they should be considered as areas or grid points. I think the most common philosophy here is to consider everything as area pixels, and offset the 2D position by a half pixel to find the actual position of each sample. More background in these two links:

http://trac.osgeo.org/gdal/wiki/rfc33_gtiff_pixelispoint http://www.remotesensing.org/geotiff/spec/geotiff2.5.html#2.5.2.2

If we only support area pixels this will have impact on the resampling methods we can use to generate the LOD (zoom) levels for each tile. This will also introduce a 2D offset that will vary by detail level, since the half pixel offset will vary in size from level to level.

In this case it would also be useful to include information on how the resampling is done. For elevation data it is significant if the zoom levels are made by averaging pixels or by selecting min/max values for example.

If we could support a point pixel grid with 2^n + 1 size, we could resample it by simply picking every second sample, and all the samples will be in their original positions. This is a commonly used resampling method for hierarchical 3D surface models, where you want the samples to move as little as possible from one detail level to the next.

I think the standard should include information on how to interpret the georeferencing of the samples, and what type of resampling has been used in the zoom levels.

jyutzler commented 8 years ago

We haven't really discussed this but my preference would be to not mandate any particular approach. Perhaps this would be a good use of the Metadata extension.

tseval commented 8 years ago

Even if the standard doesn't mandate any particular approach, I think it really should state which approach is in use on a particular dataset, since the horizontal offset of the elevation samples may be quite big, depending on the resolution of the data.

I.e when reading an elevation dataset you haven't produced yourself, you will need to know how to interpret the georeferencing and at this point, I can't get that information from the GeoPackage dataset.

jyutzler commented 8 years ago

I will leave this ticket open until we get someone to write guidance on using the Metadata extension to express this information.

jyutzler commented 3 years ago

Does the grid_cell_encoding not accomplish this? It appears that at most we need some more explanatory text.

ryanfranz commented 3 years ago

@tseval - What do you feel is missing? Is it text to show how to resample the data that is center point vs corner point? Or is it how to geo-reference the point data vs the area data?

I could see adding text to the effect that the georeferencing is based only on the grid, and the location of each value is based on the grid_cell_encoding value for that coverage type. Is that enough or do you feel like there is more needed?

tseval commented 3 years ago

grid_cell_encoding is exactly what I needed. This wasn't available in the old elevation extension when I opened up this issue.

Closing this issue, since it is solved now :-)