[oshdb-filter] add more geometry filters
- Dominant language
- Java
- Stars
- 131
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
More advanced geometry-aware filters would be possible and perhaps useful to implement. Some examples:
* quantitative geometry filters
* [x] `length` & `area` (already implemented)
* [ ] `perimeter` → #436
* geometry structure
* [ ] `vertices` (number of vertices of a line/polygon) → #436
* [ ] number of outer rings of a multipolygon → #436
* [ ] number of inner rings of a (multi)polygon → #436
* shape dependent filters
* [ ] polygon squareness of angles (possible syntax examples: `squareness:0.9` or `shape:square(..0.9)`)
todo: what definition of squareness should this be based on? :arrow_right: [A Rectilinearity Measurement for Polygons ](https://www.researchgate.net/publication/221304067_A_Rectilinearity_Measurement_for_Polygons)?
* [ ] roundness of polygons :arrow_right: [Polsby–Popper test](https://en.wikipedia.org/wiki/Polsby%E2%80%93Popper_test)
* [ ] straightness of lines (see "curvature") below
* …
* other geometric properties
* [ ] curvature / [tortuosity](https://en.wikipedia.org/wiki/Tortuosity) of lines
* [ ] geometric complexity (think something like the number of vertices per length/perimeter; the [iOSMAnalyzer](https://github.com/GIScience/iOSMAnalyzer/blob/6dd9c48/scripts/c6_equidistance.py) has something called _eqidistance_ which should go into this direction)
* [ ] number of vertices of a line or polygon, number of holes in a (multi)polygon, number of outer rings of a multipolygon, number of geometries of a geometrycollection, etc.
* …
* error detection
* [ ] self-intersections
* [ ] duplicate vertices
* [ ] _valid_ geometries (simple feature standard)
* …
* …?
Some of the above are just ideas and would need to be discussed individually in detail: how are they defined? what comparison values / threshold can be applied?
Ideally, we would come up with a syntax what syntax which can be used somewhat universally for all/most of these.
> This issue was originally posted at https://gitlab.gistools.geog.uni-heidelberg.de/giscience/big-data/ohsome/libs/ohsome-filter/-/issues/6
Contributor guide
Assessment
This issue has not been assessed yet.