[postgis-devel] Can a PolyhedralSurface/TIN be an element of MultiSurface ?

Paul Ramsey pramsey at cleverelephant.ca
Mon Jul 18 06:35:47 PDT 2016


I wouldn't look at our BNFs as anything particularly authoritative, they
were mostly transcribed from the ISO SQL specs, if I recall correctly. And
at the time they were written (maybe) still, those specs didn't have
anything to say about TIN or POLYHEDRALSURFACE. Those types were added
later, and Olivier is the one to comment on where he got the info from on
how to add them to the heirarchy. Since we don't really care much about the
object heirarchy internal to postgis (the only thing we really care about
is "are you a collection or not") any details of child/parent relationships
are not really important to us.

I think you should go w/ what makes sense for you. The argument that a TIN
is a MULTISURFACE makes sense to me, since I see a SURFACE as being a
(unclosed) 2D structure embedded in 3-space, which is consistent w/ a TIN.
A polyhedral surface is a closed 2D structure embedded in 3-space.

ATB
P


On Sun, Jul 17, 2016 at 6:43 AM, Even Rouault <even.rouault at spatialys.com>
wrote:

> Hi,
>
> We've stumbled upon this philosophical question with our GDAL GSoC student
> when trying to convert a shapefile MultiPatch into a OGR Geometry. My idea
> was
> to model a MultiPatch as a MultiSurface whose children could be Polygons
> (for
> parts of type outer ring, inner ring, first ring or ring) or TINs (for
> parts of
> type triangle strip or triangle fan). But it seems that according to
> https://github.com/postgis/postgis/blob/svn-trunk/doc/bnf-wkb.txt or
> https://github.com/postgis/postgis/blob/svn-trunk/doc/bnf-wkt.txt, a
> MultiSurface can only have Polygon or CurvePolygon as elements. And PostGIS
> does enforce that when importing WKT (
> https://github.com/postgis/postgis/blob/svn-
> trunk/liblwgeom/lwin_wkt_parse.y#L260 )
>
> This restriction of MultiSurface to Polygon/CurvePolygon seems to me to be
> contradictory with the "Figure 1: Geometry class hierarchy" of OGC 06-103r4
> Simple feature access  1.2.1 (
> http://portal.opengeospatial.org/files/?artifact_id=25355 ) where a TIN
> derives
> from Surface. And according to ยง6.1.13.1, "A MultiSurface is a
> 2-dimensional
> GeometryCollection whose elements are Surfaces".
>
> Even more confusing, according to bnf-wkt.txt, a polyhedral text or tin
> text
> could be a valid MultiSurface, despite PolyhedralSurface/TIN not being
> modeled
> as a MultiSurface.
>
> So I'm wondering if the restrictions of bnf-wkt.txt and bnf-wkb.txt
> regarding
> the accepted children type of MultiSurface are legitimate ?
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20160718/602c9fea/attachment.html>


More information about the postgis-devel mailing list