Space Filling Curve Functions For TSQL

Introduction Warning: This article is long mainly because it includes the source code of the Hilbert, Morton and Peano key/curves. I would assert that space filling curves have always been overlooked in their use within GIS. Their existence was/is rarely taught at Universities, though at least in my day. Perhaps today it is different (butRead More

Bing Maps Tile System Functions for TSQL

This blog presents functions for Bing Maps Tile System for TSQL. This support includes converting Latitude/Longitude pairs to Bing Maps QuadKeys. The source for the functions is over at the Mircosoft site – an article by James Schwartz. They are donated to the public domain. Some tests include: I hope this is of use toRead More

Geocoding Points Against a Grid of Cells/Tiles With/out Spatial Operators

This article shows how to geocode points objects against grid cells without using spatial operators. The article also shows how to use space curve values such as generated by a Morton key algorithm as grid cell ids and thus geocodes.

Sorting SDO_GEOMETRY data using the ORDER BY clause of a SELECT statement

It is often observed that you cannot use an sdo_geometry object in an ORDER BY clause of a SELECT statement. This is demonstrated below. Test Data Now, if we try and sort this data we get: If you look at the SDO_GEOMETRY type you will see that it does not have a MAP or ORDERRead More

STMorton: Creating a Morton Number Space Key Value for Grid Cells

Introduction NOTE: This article is a copy of the original first written in 2010 from my old website. Space curves are imaginary lines that systematically cover all tiles in an indexed space. The most well known in GIS is the Morton key. The utility of such a number can be seen though its implementing aRead More

Spatial Sorting of Data via Morton Key For Oracle Spatial/Locator

I have often advocated the use of a spatial sort when loading static spatial data into Oracle (See 1. Spatially sort read-only data. in my article on performance tips). The idea here is to try and place spatial data that is close together in space (called spatial autocorrelation), close together on disk. Then, when theRead More

Geomatics Degrees, Space Curves and Oracle Spatial

One of the things that should be taught to GIS students at Uni but isn’t in a lot of courses is the notion of space keys or space-filling curves. The mathematics behind these keys was done before computing by mathematicians like: Giuseppe Peano David Hilbert The one that most GIS people are introduced to isRead More

Geomatics Degrees, Space Curves and Oracle Spatial

One of the things that should be taught to GIS students at Uni but isn’t in a lot of courses is the notion of space keys or space-filling curves. The mathematics behind these keys was done before computing by mathematicians like: Giuseppe Peano David Hilbert The one that most GIS people are introduced to isRead More