oshdb icon indicating copy to clipboard operation
oshdb copied to clipboard

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

Open SlowMo24 opened this issue 1 year ago • 3 comments

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

SlowMo24 avatar Aug 08 '22 08:08 SlowMo24

@tyrasd will check if this is still the case.

Hagellach37 avatar Oct 20 '22 14:10 Hagellach37

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.

tyrasd avatar Oct 20 '22 15:10 tyrasd

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.

SlowMo24 avatar Nov 29 '22 13:11 SlowMo24