Commit graph

9 commits

Author SHA1 Message Date
Alexey Botchkov
bf2deb5ed3 Copyright notices fixed. 2011-10-06 17:41:28 +05:00
Alexey Botchkov
0048f0b1ae Valgrind warning fixed.
Coordinate size limitation removed.

per-file comments:
  mysql-test/r/gis-precise.result
        test result updated.
  sql/gcalc_slicescan.cc
        Check coordinate extent to pick better precidion in the ::set_double()
  sql/gcalc_slicescan.h
        free_list() can lead to valgrind warnig. Fixed
  sql/gcalc_tools.cc
        free_list() call changed.
2011-10-05 14:45:39 +05:00
Alexey Botchkov
0edb291d3a GIS code cleanup.
GCALC_xxx macros fixed for the GCALC_DBUG_OFF case.

per-file comments:
  sql/gcalc_slicescan.h
GIS code cleanup.
2011-10-04 15:29:39 +05:00
Alexey Botchkov
e99850774b GIS library code cleanup.
GCALC_DBUG_OFF and related infrastructure defined so we can enable/disable debugging conveniently.

per-file comments:
  sql/gcalc_slicescan.cc
GIS library code cleanup.
  sql/gcalc_slicescan.h
GIS library code cleanup.
  sql/gcalc_tools.cc
GIS library code cleanup.
  sql/gcalc_tools.h
GIS library code cleanup.
2011-10-04 15:01:21 +05:00
Alexey Botchkov
5123f59ed2 fixed bugs
855485  ST_CROSSES returns different result than PostGIS for overlapping polygons
855487  ST_WITHIN returns wrong result for partially overlapping polygons
855492  ST_WITHIN returns TRUE on point on the edge of a polygon
855497  ST_ENVELOPE of GEOMETRYCOLLECTION EMPTY returns NULL and not GEOMETRYCOLLECTION EMPTY
855503  ST_EQUALS reports TRUE between a POLYGON and a MULTILINESTRING
855505  ST_TOUCHES reports TRUE for intersecting polygon and linestring

        Changed the way weird functions like Crosses or Touches treated.
        Added BORDER handling to the Gcalc_function.

per-file comments:
  mysql-test/r/gis-precise.result
        GIS bugs fixed.
        test result updated.
  mysql-test/t/gis-precise.test
        GIS bugs fixed.
        test cases added.
  sql/gcalc_slicescan.h
        GIS bugs fixed.
  sql/gcalc_tools.cc
        GIS bugs fixed.
  sql/gcalc_tools.h
        GIS bugs fixed.
  sql/item_create.cc
        GIS bugs fixed.
  sql/item_geofunc.cc
        GIS bugs fixed.
  sql/item_geofunc.h
        GIS bugs fixed.
  sql/spatial.cc
        GIS bugs fixed.
2011-09-22 18:53:36 +05:00
Alexey Botchkov
0249413a6a several bugs fixed here.
849789  Second assertion `m_poly_borders->next' failed in Gcalc_operation_reducer::count_slice in maria-5.3-gis
        849791  Fourth assertion `n > 0 && n < SINUSES_CALCULATED*2+1' in get_n_sincos
        849789  Second assertion `m_poly_borders->next' failed in Gcalc_operation_reducer::count_slice in maria-5.3-gis
        848901   Assertion `fabs(cur_isc->x-m_cur_intersection->x) + fabs(cur_isc->y-m_cur_intersection->y) < 0.000000000001' failed in Gcalc_scan_iterator::intersection_scan() in maria-5.3-gis
        
per-file comments:
  mysql-test/r/gis-precise.result
        test result updated.
  mysql-test/r/gis.result
        test result updated.
  sql/gcalc_slicescan.cc
        bugfixes.
  sql/gcalc_slicescan.h
        bugfixes.
  sql/gcalc_tools.cc
        bugfixes.
  sql/gcalc_tools.h
        bugfixes.
  sql/item_geofunc.cc
        bugfixes.
  sql/spatial.cc
        bugfixes.
2011-09-21 00:04:41 +05:00
Alexey Botchkov
3882c5d62c Fix for few similar bugs:
#841622 Assertion `t->rp->type == Gcalc_function::shape_line' failed in Gcalc_operation_reducer::end_line in maria-5.3-gi
  #841625 Assertion `m_poly_borders->next' failed in Gcalc_operation_reducer::count_slice in maria-5.3-gis
  #841638 Assertion `!m_prev || m_prev->x != x || m_prev->y != y' failed in Gcalc_shape_transporter::int_add_point in maria-5.3-gis
  #841662 Third assertion `n > 0 && n < SINUSES_CALCULATED*2+1' in get_n_sincos
  #841745 Assertion `!sp0->is_bottom()' failed in Gcalc_scan_iterator::find_intersections in maria-5.3-gis

  They mostly was caused by inprecision of double arithmetic.
  Fixed by changes in how to handle multiple intersections to keep their order right.

  Also ST_DISTANCE(GEOM, EMPTY_GEOM) was defined as NULL.


per-file comments:
  mysql-test/r/gis-precise.result
   GIS bugfixes.
        test result updated.
  mysql-test/t/gis-precise.test
   GIS bugfixes.
        test cases added.
  sql/gcalc_slicescan.cc
   GIS bugfixes.
        If intersections are close, add order checks to cope with the
        double calcualtions imprecision.
  sql/gcalc_slicescan.h
   GIS bugfixes.
        n_row parameter added to intersection to check their order.
  sql/item_geofunc.cc
   GIS bugfixes.
        ST_DISTANCE(GEOM, EMPTY_GEOM) returns NULL.
2011-09-13 13:59:11 +05:00
Alexey Botchkov
152f3c5e28 PostGIS-style 'same point' handling. 2011-09-01 11:44:56 +05:00
Alexey Botchkov
788043cd0b Precise GIS functions added. 2011-05-04 23:20:17 +05:00