1

So I was thinking about a method that would allow me to essentially get the same resolution as a 3 meter DEM but with the size of a 30 meter DEM. As most GIS people know, 3 meter DEMs tend to be rather large and slow to process.

What I want to do is "merge" or "resample" non-contiguous cells that have similar elevations. Say we have a grid that is 10x10 which gives us 100 total cells. If I wanted to cut the resolution in half I would have 50 cells. What I want to do is combine cells with that are not necessarily neighbors but those that have similar elevations. I understand a lot of the common tools used with DEMs would require new algorithms but that would come later. The whole idea is keeping with the resolution more or less the same but with fewer cells. Is there a method that resamples cells by the closest value rather than by the nearest neighbor. Big Data!

2
  • 1
    Please update your post/tags to include the software you are using.
    – Aaron
    Oct 27, 2016 at 5:34
  • I suppose that such merged pixels are not supported by any traditional raster image format which are based on having a fixed grid of rows and columns. There are tools like gdal.org/gdal_polygonize.html which build polygons from raster data and merge pixels just as you described but then you must continue with vector tools. BTW. wouldn't half resolution in your example yield 5x5=25 cells?
    – user30184
    Oct 27, 2016 at 6:36

2 Answers 2

1

What you define looks very similar to the concept of superpixel segmentation: grouping similar contiguous pixels together based on a regular grid (but yielding irregular grid cells). If you are looking for a specific algorithm, I recommend the use of SLIC, which works very well and can be used for big data processing.

2
  • Do you know how to save an image with such clever, irregular cells to some file format?
    – user30184
    Oct 27, 2016 at 6:39
  • Nothing "magic" unfortunately, it depends on your purpose : After computing the mean value inside each superpixels, you can work with one point for each superpixel to run an analysis, or convert it to vector polygons, or keep a raster format at initial resolution (your compression rate will be improved) or at a coarser resolution (due to systematic seeding, it will match well)
    – radouxju
    Oct 27, 2016 at 8:12
1

What comes to my mind is the idea of an unstructured grid or mesh. This is increasingly used in the field of oceanography where various model phenomena are either more variable or more important close to the coast, and less variable and less important in the deep ocean. Thus, for modelling efficiency, it's desirable to have higher resolution in coastal areas than out in the sea. There are several possible types of mesh:

Three types of mesh (or unstructured grids): triangular, quad, and mixed element.

Values are typically assigned at vertices, but could be on the face, or even the edges. It's possible to think about pulling this out into the third dimension as well. This general idea has a foundation in graph theory.

There is an (emerging?) convention for how to represent such meshes in NetCDF datasets: https://ugrid-conventions.github.io/ugrid-conventions/

There is also a Mesh Data Abstraction Library (MDAL): https://github.com/lutraconsulting/MDAL

https://en.wikipedia.org/wiki/Types_of_mesh#/media/File:Example_of_2D_mesh.png

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.