← Back to team overview

ourdelta-developers team mailing list archive

[Bug 300259] [NEW] New OpenGIS functions in 5.1 (and possibly 5.0)

 

Public bug reported:

While MySQL already provides some functionality to store and operate on
geospatial data, the functionality leaves quite a lot to be desired and
is far from providing full OpenGIS compatibility. Most notably is that
all functions that query spatial data only operate on MBRs (minimum
bounding rectangles), to simplify the operations.

Thanks to MySQL Developer Alexey "Holyfoot" Botchkov from Izhevsk,
Russia, some of the spatial relation functions like INTERSECTS and
WITHIN now work in the way they are described by OpenGIS and not by
using MBR's as it used to be. He has been working on improving the GIS
functionality as a side project and the work has now reached a level at
which he is ready to give it public testing and solicit feedback about
it.

Currently these new features have not been slated for inclusion in any
upcoming MySQL major release. But the more feedback and testing this
code receives, the faster it will reach a maturity level that makes it a
potential feature candidate for new versions of MySQL.

In addition to improving already existing functionality, Holyfoot also
implemented some new precise geospatial functions - the following
functions are available now and use precise operations instead of MBRs.

- BUFFER(g1 geometry, d numeric) returns a Geometry defined by buffering a distance d around g1 where d is the distance units for the Spatial Reference of g1
- DIFFERENCE(g1 geometry, g2 geometry) returns a Geometry that is the closure of the set difference of g1 and g2
- DISTANCE(g1 geometry, g2 geometry) returns distance between g1 and g2
- INTERSECTION(g1 geometry, g2 geometry) returns a Geometry that is the set intersection of g1 and g2
- SYMDIFFERENCE(g1 geometry, g2 geometry) returns a Geometry that is the closure of the set symmetric difference of g1 and g2 (logical XOR of space)
- UNION(g1 geometry, g2 geometry) returns a Geometry that is the set union of g1 and g2

Note: The previous existing functions have been prefixed with MBR, to
indicate the difference in operation. For example, the original
Intersects() function is now called MBRIntersects()

See http://forge.mysql.com/wiki/GIS_Functions

** Affects: ourdelta
     Importance: Wishlist
         Status: New

** Changed in: ourdelta
   Importance: Undecided => Wishlist

-- 
New OpenGIS functions in 5.1 (and possibly 5.0)
https://bugs.launchpad.net/bugs/300259
You received this bug notification because you are a member of OurDelta-
developers, which is the registrant for OurDelta.

Status in OurDelta - Builds for MySQL: New

Bug description:
While MySQL already provides some functionality to store and operate on geospatial data, the functionality leaves quite a lot to be desired and is far from providing full OpenGIS compatibility. Most notably is that all functions that query spatial data only operate on MBRs (minimum bounding rectangles), to simplify the operations.

Thanks to MySQL Developer Alexey "Holyfoot" Botchkov from Izhevsk, Russia, some of the spatial relation functions like INTERSECTS and WITHIN now work in the way they are described by OpenGIS and not by using MBR's as it used to be. He has been working on improving the GIS functionality as a side project and the work has now reached a level at which he is ready to give it public testing and solicit feedback about it.

Currently these new features have not been slated for inclusion in any upcoming MySQL major release. But the more feedback and testing this code receives, the faster it will reach a maturity level that makes it a potential feature candidate for new versions of MySQL.

In addition to improving already existing functionality, Holyfoot also implemented some new precise geospatial functions - the following functions are available now and use precise operations instead of MBRs.

- BUFFER(g1 geometry, d numeric) returns a Geometry defined by buffering a distance d around g1 where d is the distance units for the Spatial Reference of g1
- DIFFERENCE(g1 geometry, g2 geometry) returns a Geometry that is the closure of the set difference of g1 and g2
- DISTANCE(g1 geometry, g2 geometry) returns distance between g1 and g2
- INTERSECTION(g1 geometry, g2 geometry) returns a Geometry that is the set intersection of g1 and g2
- SYMDIFFERENCE(g1 geometry, g2 geometry) returns a Geometry that is the closure of the set symmetric difference of g1 and g2 (logical XOR of space)
- UNION(g1 geometry, g2 geometry) returns a Geometry that is the set union of g1 and g2

Note: The previous existing functions have been prefixed with MBR, to indicate the difference in operation. For example, the original Intersects() function is now called MBRIntersects()

See http://forge.mysql.com/wiki/GIS_Functions



Follow ups

References