[postgis-devel] Canonical Text Rep for empty Geometry Collections
strk at refractions.net
strk at refractions.net
Mon Jan 17 04:08:51 PST 2005
Added support for GEOMETRYCOLLECTION(EMPTY):
--- wktparse.y 10 Jan 2005 09:47:14 -0000 1.5
+++ wktparse.y 17 Jan 2005 12:15:13 -0000
@@ -119,5 +119,5 @@
point_4d : VALUE VALUE VALUE VALUE {alloc_point_4d($1,$2,$3,$4); };
-empty : EMPTY {alloc_empty(); } ;
+empty : EMPTY {alloc_empty(); } | LPAREN EMPTY RPAREN {alloc_empty(); } ;
%%
--strk;
On Mon, Jan 17, 2005 at 12:55:30PM +0100, strk at refractions.net wrote:
> On Mon, Jan 17, 2005 at 12:49:36PM +0100, Markus Schaber wrote:
> > Hi,
> >
> > What is the correct Canonical Text Representation for empty Geometry
> > Collections?
>
> 'GEOMETRYCOLLECTION EMPTY'
>
> (actually '<anytype> EMPTY' works)
>
>
> > With old PostGIS 0.8, the following worked:
> >
> > logigis=# select 'GEOMETRYCOLLECTION(EMPTY)'::geometry;
> > geometry
> > -----------------------------------
> > SRID=-1;GEOMETRYCOLLECTION(EMPTY)
> > (1 Zeile)
> >
> > But with new PostGIS 1.0 CVS, it does not work any more:
> >
> > lwgeom=# select 'GEOMETRYCOLLECTION(EMPTY)'::geometry;
> > ERROR: parse error - invalid geometry
> > lwgeom=# select 'SRID=-1;GEOMETRYCOLLECTION(EMPTY)'::geometry;
> > ERROR: parse error - invalid geometry
> >
> > This makes me believe that we currently cannot restore old dumps that
> > contain empty collections.
>
> Yes, this is an issue. I'll try at making the new parser
> accept that as well.
>
> --strk;
>
> >
> > HTH,
> > Markus
>
>
>
> > _______________________________________________
> > postgis-devel mailing list
> > postgis-devel at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
>
> --
>
> For standing up against patentability of software,
>
> Thank You, Poland!
>
> Read the intervention: http://kwiki.ffii.org/ConsPolon041221En
> Send your thanks: thankyoupoland.info
> Read/do more: http://www.noepatents.org/
--
For standing up against patentability of software,
Thank You, Poland!
Read the intervention: http://kwiki.ffii.org/ConsPolon041221En
Send your thanks: thankyoupoland.info
Read/do more: http://www.noepatents.org/
More information about the postgis-devel
mailing list