[postgis-devel] isvalid(geom), but st_ashexewkb(geom, 'NDR')::geometry fails
David Fuhry
dfuhry at acm.org
Fri Oct 24 09:11:42 PDT 2008
That makes sense; I guess I've updated from an older postgis on this system.
I do wish that isvalid() would return false for this geometry.
Intuitively, any geometry which cannot be parsed, should not be valid.
db=> select postgis_full_version();
postgis_full_version
----------------------------------------------------------------------------------
POSTGIS="1.3.3" GEOS="3.0.0-CAPI-1.4.1" PROJ="Rel. 4.6.0, 21 Dec 2007"
USE_STATS
(1 row)
Thanks,
Dave
Kevin Neufeld wrote:
> I was going to say that it looks like a bug in the WKB parser, but then
> I noticed that this is fixed in newer PostGIS versions.
>
> In my 1.1.6 version, I can produce the same thing - it's clearly not
> symmetric.
>
> postgis=# select
> astext('0106000020C90E00000100000001030000000100000000000000'::geometry);
> astext
> ------------------------
> MULTIPOLYGON(( EMPTY))
> (1 row)
>
> postgis=# select astext('MULTIPOLYGON(( EMPTY))');
> ERROR: parse error - invalid geometry
>
> -- Kevin
> David,
>
> Well it is all kind of bizarre. Which build exactly are you using. Are
> you using an old 1.3.4 trunk version?
>
> If I do any of the following
>
> SELECT
> ST_AsText('0106000020C90E00000100000001030000000100000000000000');
> SELECT '0106000020C90E00000100000001030000000100000000000000'::geometry;
> SELECT
> ST_IsValid('0106000020C90E00000100000001030000000100000000000000');
>
> I get the below error on my 1.3.3 or 1.3.4SVN (I have to check my
> vintage)
> ERROR: geometry requires more points
>
> ST_IsValid doesn't return anything for me because apparently its so
> bogus that it errors out before it can even attempt to run validity
> checks.
>
> What does your SELECT postgis_full_version(); return
>
> There is not enough info given by postgis_version(); for me to tell what
> you are running.
>
> Thanks,
> Regina
More information about the postgis-devel
mailing list