I have OSM data stored in PostGIS.
After running the following query:
select st_astext(st_forcepolygonccw(st_transform(geom,32633))), st_geometrytype(geom) from osm_versions.polygon_v1 limit 10
I get this result.
As you may see only 2 out of 10 spatial objects consist of more than 1 node yet all of them have GeometryType ST_Polygon. As a polygon is "a plane figure that is described by a finite number of straight line segments connected to form a closed polygonal chain" (after Wikipedia) I have no use for "polygons" with less than 3 nodes.
My questions are: Is there any command that returns, given a set of geometries, a subset of geometries that consists of more than 2 nodes? How should I proceed in order to filter out "polygons" with less than 3 nodes?
As for the question how come that points are counted as polygons, I have no idea as the data were provided by an external source.