[postgis-users] Problem with MultiLineString

Michael Smedberg Michael.Smedberg at redfin.com
Wed Dec 3 12:46:31 PST 2008


It looks to me like maybe

(491215.9577 532660.8051,491215.9577 532660.8051)

is an invalid line because both points are identical, while

(491215.957 532660.8051,491215.9577 532660.8051)

is valid because the points aren't identical?  Just a guess...

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Ken
Southerland
Sent: Wednesday, December 03, 2008 12:22 PM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Problem with MultiLineString

This problem occurs on versions...
POSTGIS="1.3.1" GEOS="3.0.0rc4-CAPI-1.3.3" PROJ="Rel. 4.5.0, 22 Oct
2006"
POSTGIS="1.3.2" GEOS="3.0.0-CAPI-1.4.1" PROJ="Rel. 4.6.0, 21 Dec 2007"


The first query gives...

select st_isvalid( st_GeomFromText('MULTILINESTRING((491181.9816 
532686.6037,491209.6059 532664.6521),(491215.9577 
532660.8051,491215.9577 532660.8051))'));

NOTICE:  IllegalArgumentException: Number of points must be 0 or >3
  st_isvalid
------------
  f

... while the second gives...

select st_isvalid( st_GeomFromText('MULTILINESTRING((491181.9816 
532686.6037,491209.6059 532664.6521),(491215.957 532660.8051,491215.9577

532660.8051))'));

  st_isvalid
------------
  t

...and the only difference between the two is that the first point of 
the second line has an x value of 491215.9577 in the first query and 
491215.957 in the second.  In other words, the last seven is just 
stripped and it works.

What gives here?!  Any ideas?

Ken Southerland
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list