Geography Reference
In-Depth Information
SQL Server 2008 OGC-compliant SQL
SELECT id,name,geometry.astext() FROM myspatialtable
This minor difference causes all sorts of issues. In particular, it means that any software
using SQL Server 2008 as its backend needs specialized data adapters (usually based
around ODBC) to translate calls to the server in an OGC-compliant way. In fact, most GIS
software has only just recently started to provide built-in support via ODBC.
One positive aspect for .NET developers using SQL Server is direct support in .NET via the
Entity Framework and its Geometry and Spatial classes. If you're working solely on the
.NET platform, there is a strong argument for not needing to use anything other than SQL
Server. If, however, you need access to GIS in general and the underlying SQL to
manipulate it, SQL Server is not the best choice.
The official SQL Server website is www.microsoft.com/sqlserver/en/us/default.aspx .
SQLite and SpatiaLite
SQLite is not strictly a database server, but one of the new generation single-file database
engines designed to be embedded directly into your application. SQLite has amazing
support on a massive number of platforms, and is possibly one of the most cross-platform
kits I've had the pleasure to use.
Compared to the big three already mentioned, SQLite is a relative newcomer to the scene,
but it runs remarkably well and is incredibly efficient, especially on mobile platforms. In fact,
it's so good on mobile platforms that it's been chosen as the database engine of choice on
Android devices and Apple's iOS, as well as featuring full support on Windows Phone
through the use of a fully managed .NET interface.
SpatiaLite, the spatial extension for the SQLite engine, is not so lucky. Its sources are
available, but built binaries are only provided for the Windows platform. For any other
platform you'll need to download the source and then port it to your platform of choice. While
this is not difficult, the sources are all in standard ANSI C and can be a little tricky to get
working, especially if you have very little native C or C++ experience.
There are binary builds available for platforms other than Windows, but these are very
fragmented and often out of date. Bear in mind also that SpatiaLite, like much of the open
source GIS-based software available, depends on Proj.4, GEOS, and other libraries to
provide many of its advanced features. If you have to custom build SpatiaLite for your
platform, you'll likely have to custom build the dependent libraries as well.
Does this put SQLite and SpatiaLite out of the picture? Not really. I have yet to find anything
else that works on so many different mobile platforms with such a consistent API. While
there is some work involved, building for your platform is quite simple in most cases, and
 
Search WWH ::




Custom Search