[postgis-users] Unknown geometry type: 12 - MultiSurface

James Klassen klassen.js at gmail.com
Fri Apr 21 11:59:00 PDT 2017


I have been getting "ERROR: Unknown geometry type: 12 - MultiSurface" on
some operations since importing a File GeoDatabase containing curved
geometries into PostGIS using a recent OGR (2.2.0dev trunk at 37918).  Using
ST_CurveToLine(geom) instead or the original curved geometry is a work
around, but it would be desirable to directly use the original geometry if
possible.  Is this the expected behavior?

I am running PostgreSQL 9.5.5/PostGIS 2.2.2 from
http://apt.postgresql.org/pub/repos/apt/ on Ubuntu 12.04.

It is unclear to me from the documentation if Curved geometries are
generally supported or only with a few specific functions.  I have found
some references to "Unknown geometry type" errors from long ago that
reference closed tickets against PostGIS 1.x and a Stack Exchange question
"Smallworld > FME > PostGIS > QGIS" that seems similar but different.

Steps to reproduce:

SELECT version();

version
-------------------------------------------------------------------------------------------------------
 PostgreSQL 9.5.5 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu/Linaro
4.6.3-1ubuntu5) 4.6.3, 64-bit
(1 row)

SELECT postgis_full_version();

postgis_full_version

--------------------------------------------------------------------------------------------------------------------------------------------------------------------
 POSTGIS="2.2.2 r14797" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.7.1, 23
September 2009" GDAL="GDAL 1.9.0, released 2011/12/29" LIBXML="2.7.8"
LIBJSON="UNKNOWN" RASTER
(1 row)

-- Operations fail with MultiSurface
select ST_IsValid(
 ST_GeomFromEWKT(
  'MULTISURFACE(((563145 151701,563144 151530,
                  563106 151523,563107 151701,
                  563145 151701)))'
 )
);
psql:postgis-multisurface.sql:12: ERROR:  Unknown geometry type: 12 -
MultiSurface



select ST_Intersects(
 ST_GeomFromEWKT(
  'MULTISURFACE(((563145 151701,563144 151530,
                  563106 151523,563107 151701,
                  563145 151701)))'
 ),
 ST_GeomFromEWKT(
   'POLYGON((0 0, 600000 180000, 600000 0, 0 0))'
 )
);
psql:postgis-multisurface.sql:23: ERROR:  Unknown geometry type: 12 -
MultiSurface
CONTEXT:  SQL function "st_intersects" statement 1



-- It works with ST_CurveToLine
select ST_IsValid(
 ST_CurveToLine(ST_GeomFromEWKT(
  'MULTISURFACE(((563145 151701,563144 151530,
                  563106 151523,563107 151701,
                  563145 151701)))'
 ))
);
 st_isvalid
------------
 t
(1 row)


select ST_Intersects(
 ST_CurveToLine(ST_GeomFromEWKT(
  'MULTISURFACE(((563145 151701,563144 151530,
                  563106 151523,563107 151701,
                  563145 151701)))'
 )),
 ST_GeomFromEWKT(
   'POLYGON((0 0, 600000 180000, 600000 0, 0 0))'
 )
);
 st_intersects
---------------
 t
(1 row)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20170421/fd561b98/attachment.html>


More information about the postgis-users mailing list