Can a PolyhedralSurface/TIN be an element of MultiSurface ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Can a PolyhedralSurface/TIN be an element of MultiSurface ?

Even Rouault-2
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
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|

Re: Can a PolyhedralSurface/TIN be an element of MultiSurface ?

Paul Ramsey
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 <[hidden email]> 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
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-devel


_______________________________________________
postgis-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|

Re: Can a PolyhedralSurface/TIN be an element of MultiSurface ?

Oliver Courtin
Even, Paul,


Summer lag time…


> 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.


And yes, for PostGIS. we took OGC SFS 1.2 as implementation reference.

And so implied that a TIN or PS can’t have interior ring, for instance.
But only one exterior one.

I thought that was the main reason for surface / multi surface hierarchy stuff.


Cheers,

O.



_______________________________________________
postgis-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-devel