id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc
11,intersection - possible Bug,mcayland,,"

Dear PostGis Users,

we are using PostgreSQL / PostGIS very intensively - at the moment in
combination with PG-Routing.
Because we are routing on areas, we create somthing like a network on them
and intersect this netzwork with some area - properties (e.g. vegetation).

While doing this, a very strange behaviour occured: intersection of two
lines created a point, which is relative far away from one line. Here the
simplified sql - statment:

select asText(intersection(b.g, a.g)) as intersection,
distance (a.g, intersection(b.g, a.g)) as distance
from
(select
'01020000000200000050E8303FC2E85141B017CFC05A825541000000E0C0E85141000000205C825541'::geometry
as g) a,
(select 'LINESTRING(4694792.35840419 5638508.89950758,4694793.20840419
5638506.34950758)'::geometry as g) b

-> so the distance of point and first line is 0.88 (meters)

when I use asText for the first Line:

select asText(intersection(b.g, a.g)) as intersection,
distance (a.g, intersection(b.g, a.g)) as distance
from
(select
asText('01020000000200000050E8303FC2E85141B017CFC05A825541000000E0C0E85141000000205C825541'::geometry)
as g) a,
(select 'LINESTRING(4694792.35840419 5638508.89950758,4694793.20840419
5638506.34950758)'::geometry as g) b

-> the distance reduces to a very little value (xe-10) - with this I have
no problem, because I use some little tollerance - but 0.88 is too much in
my case.

As a workaround I use allways asText at the moment.
Our PostGIS fullVerion is
'POSTGIS='1.3.2' GEOS='3.0.0rc4-CAPI-1.3.3' PROJ='Rel. 4.5.0, 22 Oct 2006'
USE_STATS'
on 'PostgreSQL 8.2.4 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)
3.4.2 (mingw-special)'

By the way - the same Statment in
'POSTGIS='1.2.0' GEOS='2.2.3-CAPI-1.1.1' PROJ='Rel. 4.5.0, 22 Oct 2006'
USE_STATS'
on 'PostgreSQL 8.2.0 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)
3.4.2 (mingw-special)'
creates a point with a small distance (but >0) in both cases


Greetings

Thomas and Rene


",defect,closed,medium,,postgis,,wontfix,,
