Ticket #1245 (closed feature: fixed)
intersects code suffers due to floating point errors
| Reported by: | crschmidt | Owned by: | tschaub |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.6 Release |
| Component: | Geometry | Version: | 2.5 |
| Keywords: | Cc: | ||
| State: | Complete |
Description
This code breaks:
features = wkt.read("POLYGON((-8239529.462853361 4980952.065110421,-8224242.057199065 4980952.065110421,-8224242.057199065 4988844.188279452,-8239529.462853361 4988844.188279452,-8239529.462853361 4980952.065110421))");
point = new OpenLayers.Geometry.Point(-8225445.94039435, 4982695.78481786);
features.geometry.intersects(point)
19:05:36 < tschaub> yeah, -8224242.057199557 != -8224242.057199065
19:06:00 < tschaub> guess the coordinates aren't big enough in the test cases
to run in to floating point issues
19:06:19 < tschaub> the code is good - the floating point math is bad

