Basically I have a polygon layer and I need to create a view which extracts about 100 different columns from about 10 tables with polygon, line and point geometry, that intersect with the said polygon.

The problem is that after creating the view, when I try to run it, I keep getting this unknown geometry type and it doesn't tell me where the error is located

ERROR: Unknown geometry type: 11 - MultiCurve

I've tried using st_isvalid(r.geom) = true on every single table as a where condition because one of the layers definitely had some invalid geometries, but I keep running into this error.

  • 2
    It's unclear if your view is pure SQL or being consumed by a GIS app (which is less likely to tolerate different geometry classes in a single view). If your view utilizes a UNION ALL, you can make singleton views to identify the table, and/or just select for GeometryType(geomcol) with an ID column. – Vince Feb 20 at 12:40
  • thanks a lot Vince! I used the geometrytype(geometry) where geometrytype(geometry) != 'LINESTRING' to search for the multicurves! – Luffydude Feb 20 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.