[postgis-users] intersection - possible Bug
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Fri Mar 28 12:11:43 PDT 2008
> 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
Hi Thomas and Rene,
I've added this to the PostGIS bug tracker at
http://code.google.com/p/postgis/issues/list along with an additional
comment that I can't reproduce it on my Linux setup. Can you follow this
up using the Google Bug Tracker?
Many thanks,
Mark.
--
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063
More information about the postgis-users
mailing list