[postgis-devel] Issue 145 in postgis: POLYGON( EMPTY) is unparseable

codesite-noreply at google.com codesite-noreply at google.com
Fri Mar 27 23:05:12 PDT 2009


Status: New
Owner: ----

New issue 145 by lr1234567: POLYGON( EMPTY) is unparseable
http://code.google.com/p/postgis/issues/detail?id=145

What steps will reproduce the problem?
1. SELECT
ST_GeomFromText(ST_AsText(ST_Buffer(ST_GeomFromText('LINESTRING(-116.93414544665981
34.16033385105459,-116.87777514700957 34.10831080544884,-116.86972224705954
34.086748622072776,-116.9327074288116 34.08458099517253,-117.00216369088065
34.130329331330216,-117.00216369088065 34.130329331330216)', 4326), 0)))


What is the expected output? It should return some hex binary since
the buffer returns a POLYGON EMPTY

What do you see instead?
a) On 1.3.5 (GEOS 3.0.3 )-- gives error
ERROR:  parse error - invalid geometry
CONTEXT:  SQL function "st_geomfromtext" statement 1

b) On POSTGIS="1.4.0SVN" GEOS="3.1.0-CAPI-1.5.0" PROJ="Rel. 4.6.0, 21 Dec
2007" USE_STATS

gives error
ERROR:  parse error - invalid geometry
HINT:  "POLYGON( EMPTY" <-- parse error at position 14 within geometry

Note that:

SELECT ST_AsText(ST_Buffer(ST_GeomFromText('LINESTRING(-116.93414544665981
34.16033385105459,-116.87777514700957 34.10831080544884,-116.86972224705954
34.086748622072776,-116.9327074288116 34.08458099517253,-117.00216369088065
34.130329331330216,-117.00216369088065 34.130329331330216)', 4326), 0))

Yields: POLYGON( EMPTY)  (whats that space after the first paren for?
thought getting rid of the space doesn't help)

however:

SELECT ST_GeomFromText('POLYGON EMPTY') works fine.


Leo


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings



More information about the postgis-devel mailing list