[postgis-devel] Re: NULL geometries

strk strk at keybit.net
Mon Jun 7 10:25:24 PDT 2004


On Mon, Jun 07, 2004 at 10:15:19AM -0700, David Blasby wrote:
> I'm not sure why people are having problems (crashes) with geometries 
> like 'POINT()' - there are tests in the regression files that test 
> inputs like this.  I didnt have any crashes.
> 
> This is probably a problem with people's FLEX/BISON.  Thats why I put 
> the actual output file in CVS so everyone would have a common source in 
> stead of relying on everyones different version of flex/bison to work.

lwgparse.c:lwg_parse_yyerror() called an undefined error() function
instead of the registered error_func().
I dunno how did it work for you...  I've fixed this now, can you
check if you have problems now ?

> 
> Its a bit ambigeous if the SFSQL spec supports things like "POINT()" or 
> "POINT(EMPTY)":
> 
> 2.1.3 Point
> A Point is a 0-dimensional geometry and represents a single location in 
> coordinate space. A Point has a xcoordinate
> value and a y-coordinate value.
> The boundary of a Point is the empty set.
> 2.1.3.1 Methods
> X( ):Double —The x-coordinate value for this Point.
> Y( ):Double —The y-coordinate value for this Point.
> 
> 
> 
> PostGIS supports empty geometries like:
> 
> lwgeom_reg=# select 'GEOMETRYCOLLECTION(EMPTY)'::geometry;
>              geometry
> -----------------------------------
>  SRID=-1;GEOMETRYCOLLECTION(EMPTY)
> (1 row)
> 
> lwgeom_reg=# select 'MULTIPOINT(EMPTY)'::geometry;
>          geometry
> ---------------------------
>  SRID=-1;MULTIPOINT(EMPTY)
> (1 row)
> 
> PostGIS does NOT support geometries "POINT(EMPTY)" - only 
> GEOMETRYCOLLECTION and MULTI* geometries.  The actual representation is, 
> say, a MULTIPOINT with 0 geometries in it.
> 
> Currently, LWGEOM isnt supporting this - its should be simple addition 
> to handle it.
> 
> Things like "POINT(EMPTY)" maybe valid WKT, but I dont think they are 
> actually valid geometries.  NOTE: there is no WKB representation for 
> "POINT(EMPTY)".
> 
> dave

By 'postgis supports' I meant it parses that WKT.
Internally it converts to GEOMETRYCOLLECTION(EMPTY) but accepts
ANYTYPE (EMPTY).

--strk;

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