[postgis-devel] isvalid(geom), but st_ashexewkb(geom, 'NDR')::geometry fails

David Fuhry dfuhry at acm.org
Thu Oct 23 20:28:44 PDT 2008


I have an empty multipolygon which isvalid(), but which the parser 
throws "ERROR:  geometry requires more points" on.  Is this a bug in 
isvalid(), or in the parser?  Interestingly, st_isempty() returns false.

db=> select geom from tt;
                          geom
------------------------------------------------------
  0106000020C90E00000100000001030000000100000000000000
(1 row)

db=> select st_astext(geom) from tt;
        st_astext
------------------------
  MULTIPOLYGON(( EMPTY))
(1 row)

db=> select isvalid(geom) from tt;
  isvalid
---------
  t
(1 row)

db=> select st_ashexewkb(geom,'NDR')::geometry from tt;
ERROR:  geometry requires more points

db=> select st_isempty(geom) from tt;
  st_isempty
------------
  f
(1 row)

db=> select version(), postgis_version();
                                         version 
                  |            postgis_version
-----------------------------------------------------------------------
-----------------+---------------------------------------
  PostgreSQL 8.3.1 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.2.3 
(Debian 4.2.3-4) | 1.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
(1 row)

Thanks,

Dave



More information about the postgis-devel mailing list