[postgis-devel] GML for empty geometries ?

Paul Ramsey pramsey at opengeo.org
Wed Dec 14 09:18:09 PST 2011


Based on 30 seconds of research I'd say go with NULL as the return for
empty geometries.
Yes, 'POINT EMPTY' (and all the other typological variants) is legal
in WKT. (But the concept of EMPTY appears completely ignored in all
discussions of WKB.) (Standards rule.)

P.


On Wed, Dec 14, 2011 at 8:37 AM, Sandro Santilli <strk at keybit.net> wrote:
> On Wed, Dec 14, 2011 at 07:33:30AM -0800, Paul Ramsey wrote:
>> On 2011-12-14, at 6:59 AM, Sandro Santilli <strk at keybit.net> wrote:
>>
>> > What should GML be for empty geometries ?
>> > Would this work:
>> >
>> >  <gml:Point/>
>> >  <gml:LineString/>
>> >  <gml:Polygon/>
>> >  <gml:MultiPolygon/>
>> >  <gml:MultiLineString/>
>> >  <gml:MultiGeometry/>
>>
>> Anyone have the gml scheme handy? If it is legal then yes, otherwise we have to go with null.
>
> I'm afraid it's not legal, as gml:Point is documented to contain:
>  <sequence><gml:pos></sequence>.
>
> I'm not fond of XML Schemas so don't really know what I'm talking about.
> Is 'POINT EMPTY' legal WKT ?
>
> Meanwhile I committed a fix for the representation above.
> It fixed a segfault in the polygon case, and made somewhat nicer
> the previous representation (obtained by luck).
>
> --strk;
>
>  ,------o-.
>  |   __/  |    Thank you for PostGIS-2.0 Topology !
>  |  / 2.0 |    http://www.pledgebank.com/postgistopology
>  `-o------'
>
> _______________________________________________
> 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