[geos-devel] rounding errors
strk
strk at keybit.net
Tue Nov 30 07:12:29 EST 2004
I've reduced the dataset showing the bug:
id | astext
----+----------------------------------------------------------------
1 | LINESTRING(-236.16352798 88.61382659,-238.34921112 24.5004545)
2 | LINESTRING(-271.41500003 93.5700226,-187.14001279 74.36028286)
These two segments intersect at this point:
id | astext
----+------------------------------------------
3 | POINT(-236.267686750346 85.558502660642)
Inserted into the table w/out textual conversion, so w/ no lost of
information there.
So 1^2 == 3
But 1^3 and 2^3 both return empty geometry.
Attached is xml test, which also fails with JTS.
--strk;
-------------- next part --------------
<run>
<precisionModel type="FLOATING"/>
<case>
<desc>1^2</desc>
<a>LINESTRING(-236.16352798 88.61382659,-238.34921112 24.5004545)</a>
<b>LINESTRING(-271.41500003 93.5700226,-187.14001279 74.36028286)</b>
<test>
<op name="intersection" arg1="A" arg2="B">
POINT(-236.2676867503460869 85.5585026606420342)
</op>
</test>
</case>
<case>
<desc>1^3</desc>
<a>LINESTRING(-236.16352798 88.61382659,-238.34921112 24.5004545)</a>
<b>POINT(-236.2676867503460869 85.5585026606420342)</b>
<test>
<op name="intersection" arg1="A" arg2="B">
POINT(-236.2676867503460869 85.5585026606420342)
</op>
</test>
</case>
<case>
<desc>2^3</desc>
<a>LINESTRING(-271.41500003 93.5700226,-187.14001279 74.36028286)</a>
<b>POINT(-236.2676867503460869 85.5585026606420342)</b>
<test>
<op name="intersection" arg1="A" arg2="B">
POINT(-236.2676867503460869 85.5585026606420342)
</op>
</test>
</case>
</run>
More information about the geos-devel
mailing list