Geography Reference
In-Depth Information
MySQL
Originally developed as a simple-to-use open source database from the beginning, MySQL
has included basic geometry types since at least v3.23. They may have been present earlier,
but there is no documentation for them prior to 3.23, and no mention of them in the history of
the database.
Version 3.23 documentation clearly states that the database is not fully OGC compliant. In
particular, the geometry_columns metadata table is not supported, and many of the
standard functions are renamed to be prefixed with a G— GLength , for example, so as not to
cause issues with the standard Length function. The level of support for GIS across different
versions of MySQL is questionable.
In more recent versions—I'm reading the version 5.6 documentation as I type this—the core
engine does seem to be more OGC compliant, and I certainly know of people who use it as
the central component in some complex GIS. Given that this is one of the few systems that
ships with support for GIS operations, there's no need to install third-party components to
spatially enable it.
MySQL is a very capable and fast system. It's also incredibly easy to administrate and has
enormous support in the community despite having been recently acquired by Oracle as part
of its buyout of Sun Microsystems. Its future is still a little uncertain, but one thing is sure: it
will remain at the center of most LAMP and WAMP open source web stack installations for
some time to come. You can learn more about MySQL at www.mysql.com .
SQL Server
Since this topic is intended for .NET and Microsoft developers, I'm not going to delve into
SQL Server too much as most readers will know a lot of the capabilities of the system
already.
GIS functionality in the core product is a relatively new thing that was not fully introduced
until SQL Server 2008. Prior to this, there were a few unofficial third party add-ons that
spatially enabled SQL Server 2003 and SQL Server 2005, but these never really delivered. I
remember trying an add-on for SQL Server 2005 that repeatedly crashed the server only
when certain functions were called!
Even though SQL Server 2008 has GIS functionality baked in, it is probably the most non-
OGC compliant OGC compliancy I've seen in any product.
Let me explain: SQL Server 2008 implements all the functionality required in the OGC
specifications, functions such as ST_GeomFromText or ST_Polygonize and so on. But
because SQL Server is a CLR-based assembly, it doesn't allow functions to be accessed in
the same way. I'll discuss the SQL more in-depth later; for now, consider the following:
Standard OGC-compliant SQL
SELECT id,name,ST_AsText(geometry) FROM myspatialtable
 
 
Search WWH ::




Custom Search