[postgis-devel] WKB types: polyhedral surface, tin, triangle

Paul Ramsey pramsey at opengeo.org
Wed Oct 6 12:34:37 PDT 2010


On Tue, Oct 5, 2010 at 11:59 PM, Olivier Courtin
<olivier.courtin at oslandia.com> wrote:
>
> On Oct 6, 2010, at 12:20 AM, Paul Ramsey wrote:
>
> Paul,
>
>> I'm working on the new WKB parser/emitters and wondering where I can find
>> the official type numbers for the polyhedral surface, tin, and triangle
>> types? I see you have stubbed them into liblwgeom.h as 13, 14 and 15, but
>> I'd like to see the appropriate specification document on how they are
>> supposed to be structured.
>
> I use 13,14 and 15 as only internal PostGIS number availables,

Right, but because the old WKB emitter uses the internal numbers as
outputs, they come out with the wrong numbers. I just actually
confirmed this with a little polyhedral geometry test on the new
output functions, in cu_wkb_out.c. The old code uses a type number of
13 while the new code uses a type number of 15.

So... once the code is flipped over, we should have valid ISO-standard
type numbers in the WKB.

P.


>
> Standards values:
>
> ISO SQL/MM draft 2009 (5.1.58 p178):
>
> POLYEHDRALSURFACE               15
> TIN:                                                    16
> TRIANGLE                                        17
>
> POLYHEDRALSURFACEZ:     1015
> TINZ:                                           1016
> TRIANGLEZ:                                      1017
>
> POLYHEDRALSURFACEM:     2015
> TINM:                                           2016
> TRIANGLEM:                              2017
>
> POLYHEDRALSURFACEZM     3015
> TINZM                                           3016
> TRIANGLEZM                              3017
>
>
> It's also consistent with OGC SFS 1.2 (06-103r3)
> 8.2.8 p67
>
> --
> Olivier
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>



More information about the postgis-devel mailing list