Geography Reference
In-Depth Information
Figure 7.1: Polygons with overlapping MBRs
The standard is more fully implemented in PostgreSQL/PostGIS than
MySQL. In fact, the PostGIS implementation has been certified by the
OGC as compliant with version 1.1 of the standard. What does this
mean to you? It means that PostGIS provides a complete and robust
implementation of the standard, along with additional features not in
the specification. Since PostGIS has been around longer than the My-
SQL spatial implementation, more desktop and web mapping clients/
servers support it.
As we said before, MySQL doesn't fully implement the OGC specifica-
tion, especially when it comes to spatial functions. This means that
although you can use a function, the result will be less than accu-
rate. For example, if you want to determine whether two polygons over-
lap, MySQL uses a simple bounding box comparison. Depending on the
shape of the polygons, they may or may not overlap even though their
bounding boxes do.
In Figure 7.1 , you can see two polygons that do not overlap. For the
sake of example, let's assume they are lakes. In the figure you can
easily see that polygon P1 and polygon P2 are spatially distinct. The
dashed rectangle around each polygon is the minimum bounding rect-
angle (MBR). 4 Note that the MBRs do overlap. Since MySQL does only
MBR comparisons, it would say that P1 and P2 overlap.
4. You'll see MBR also referred to as extent, bounding box, or BBOX. Some software
prefers one term over another. We use MBR here because it is the term used in the
MySQL documentation.
 
 
 
Search WWH ::




Custom Search