Opened 17 years ago

Last modified 16 years ago

#12 closed defect

precision problem in ST_Intersection — at Initial Version

Reported by: christiangda Owned by:
Priority: medium Milestone:
Component: postgis Version:
Keywords: Cc:

Description

What steps will reproduce the problem?

  1. SELECT ST_AsText(ST_Intersection('LINESTRING(-66.8592

10.4907,-66.8588928796312 10.4906674142301)','LINESTRING(-66.8590087637651 10.4910388060935,-66.8590911623889 10.4902621942468,-66.8591038797479 10.4901559438629)'));

  1. SELECT (ST_Intersects('POINT(-66.8590464398156

10.490683707115)','LINESTRING(-66.8592 10.4907,-66.8588928796312 10.4906674142301)'));

  1. SELECT (ST_Intersects('POINT(-66.8590464398156

10.490683707115)','LINESTRING(-66.8590087637651 10.4910388060935,-66.8590911623889 10.4902621942468,-66.8591038797479 10.4901559438629)'));

What is the expected output? What do you see instead? step 1: one point (correct) →'POINT(-66.8590464398156 10.490683707115)' step 2: true value (incorrect) → false step 3: true value (incorrect) → false

I have detected a problem with the function ST_Intersection(geometry, geometry), it return a bad value when you use it with two LINESTRING object, the return POINT is incorrect.

In step 2 and 3, i try to check it, but i got bad return value (false)

Then I veryfied it in OpenJump tools (http://openjump.org/wiki/show/HomePage), see attachment image file. You can see the problem!.

What version of the product are you using? On what operating system?

SELECT postgis_full_version(): 'POSTGIS='1.3.2' GEOS='3.0.0-CAPI-1.4.1' PROJ='Rel. 4.5.0, 22 Oct 2006' USE_STATS'

SELECT version(): 'PostgreSQL 8.2.6 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)'

Please provide any additional information below.

I think if you use float8 in your postgis-geos-postgresql wrapper function, maybe it could be resolved.

Change History (0)

Note: See TracTickets for help on using tickets.