SINTEF / Geomaker

4 stars 4 forks source link

Feature request: Export in structured mesh format #31

Closed VikingScientist closed 4 years ago

VikingScientist commented 4 years ago

The current version samples the terrain data using triangles. In the case of rectangular coordinate-aligned regions: is it possible to extract the data in a structured manner? That is as a full matrix of z-values. Either export it directly in image format or as a vtkStructuredGrid class

VikingScientist commented 4 years ago

Just so we don't miss it in the heap of closed issues. When or if support for this arrives, a natural extension would be to have tiffas a valid export format which would be in this exact structured format as described in the OP.

TheBB commented 4 years ago

The python library we use for reading GeoTIFFs doesn't support writing them (that is, it doesn't support the special GeoTIFF metadata tags). Turns out the GeoTIFF format specificiation is not exactly minor, but I can probably make it work.

VikingScientist commented 4 years ago

But why do we need to write them using python libraries? Is it not sufficient to simply copy the downloaded files which are cached in $HOME/.local/share/geomaker/DTM10 ?

TheBB commented 4 years ago

We can but they don't necessarily correspond to the polygons you draw on the map. If you don't download a dedicated file the polygon might not even be contained within one file.

TheBB commented 4 years ago

Structured VTK/VTS output landed in https://github.com/TheBB/Geomaker/commit/337d781c3b92f770c8d549c55f946819af3d4c73

VTS files are probably the best option all things considered.

TheBB commented 4 years ago

Tracking GeoTIFF support in #33