Opened 16 years ago

Last modified 16 years ago

#145 closed defect

POLYGON( EMPTY) is unparseable — at Initial Version

Reported by: lr1234567 Owned by:
Priority: medium Milestone: PostGIS 1.4.0
Component: postgis Version: 1.4
Keywords: Cc:

Description

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

Change History (0)

Note: See TracTickets for help on using tickets.