GIScience / oshdb

OpenStreetMap History Data Analysis Framework
https://ohsome.org
GNU Lesser General Public License v3.0
110 stars 18 forks source link

Rename geometry-filter "other" to geometrycollection and add more geom-filters #464

Open SlowMo24 opened 2 years ago

SlowMo24 commented 2 years ago

Problem Description

The geometry filter "other" is not well defined (at least not in the docu of the ohsome-api). It remains unclear what it contains, apart from geometry-collections.

Expected Solution

Be explicit on the filters. Add filters for Polygon vs MultiPolygon (vs Polygonal) etc.

Alternative Solutions

Document what 'other'-geometry type is.

~### Additional Context~ ~Add any other context or screenshots about the feature request here.~

Related: #436

Hagellach37 commented 2 years ago

@tyrasd will check if this is still the case.

tyrasd commented 2 years ago

Yes, the documentation is concise, but IMHO sufficient: ”matches anything which has a geometry of the given type (point, line, polygon, or other)” means that other is everything that is not a point, line or polygon.

Polygon vs MultiPolygon (vs Polygonal)

geometry:polygon is implemented to match everything that is polygonal. I used the simpler wording on purpose in the docs, as it is more easily understandable. Also, I think it's not necessary to provide more detailed filters for only MultiPolygon or non-multi polygonal geometries.

SlowMo24 commented 1 year ago

but there is an inconsistency in:

https://github.com/GIScience/oshdb/blob/20bd2c89305faba9720e0c6556a56646ea551064/oshdb-filter/src/main/java/org/heigit/ohsome/oshdb/filter/GeometryTypeFilter.java#L33-L42

because it links to Puntual/Lineal but only considers Points/Lines. MultiPoint or MultiLinestrings are considered GeometryType.OTHER (if they are even recognised?).

I'm sorry for being such a nit-picker but downstream tools require me to be exact on my geometries.