[postgis-users] ST_UNION - Exception in LWGEOM2GEOS

Paragon Corporation lr at pcorp.us
Mon Oct 26 18:47:02 PDT 2009


Mehmet,
It sounds like your line string might have 0 or 1 points.
 
Use
 
ST_NPoints(linestring) < 2  to find all linestrings with fewer than 2 points
 
Leo

  _____  

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Mehmet
Sirin
Sent: Monday, October 26, 2009 7:24 PM
To: PostGIS Users Discussion
Subject: [postgis-users] ST_UNION - Exception in LWGEOM2GEOS


Hi,

I just tried to create a mutlilinestring out of a set of linestrings via 
SELECT AsText( ST_UNION(linestring) )

FROM ways w, way_tags wt WHERE w.id=wt.way_id 
AND wt.v='Dörnter Weg'


(it lies in Osnabrück, lower saxony)
but I'm getting this strange error: 
HINWEIS: IllegalArgumentException: point array must contain 0 or >1 elements


FEHLER: Exception in LWGEOM2GEOS

********** Fehler **********

FEHLER: Exception in LWGEOM2GEOS
SQL Status:XX000



Replacing wt.v='Dörnter Weg' with wt.v='Some other Streets' it works
properly. 
So it is because of this street 'Dörnter Weg' (i got a few other ones of
this kind in my database). 
Anybody can tell me why these sort of ways leads to a problem?
thank you
kind regards
mehmet sirin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20091026/396a987b/attachment.html>


More information about the postgis-users mailing list