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.

TESSELATE and CENTROID package updates

Today (25th February 2015) I uploaded the following changes to the following packages: 1. TESSELATE Reduce complexity of package interface. Removed all Quad_Tree Initialise procedures (Quad_Tree functions internally initialise). All SPACE_KEY functions removed: package now only supports morton key generation. Added new ST_TileGeometry functions that provide greater options for tiling (or generating a regular gridRead More

Generating a Grid (fishnet) of points or polygons for PostGIS

I wrote an article on Gridding a PostGIS Geometry object a while back. I had cause, recently, to use a variation on this for the generation of an array of point objects for a geometry polygon, so I wrote a version that also allows for the generation of a grid of polygons or points dependingRead More

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

Gridding a sdo_geometry line/polygon object (Oracle)

A common question that comes up in the various database forums (PostGIS, SQL Server, Oracle) is how to “grid” a linear or polygonal object. By “grid” one means work out the square pixels (rectangular polygons) that cover or define a vector geometry. Here is some SQL for doing this for Oracle Locator. Single Geometry HereRead More

Gridding a geometry object (PostGIS)

A common question that comes up in the various database forums (PostGIS, SQL Server, Oracle) is how to “grid” a linear or polygonal object. By “grid” one means work out the square pixels (rectangular polygons) that cover or define a vector geometry. Here is some SQL for doing this for PostGIS. Single Geometry The followingRead More

Gridding a geometry or geography object (SQL Server Denali)

A common question that comes up in the various database forums (PostGIS, SQL Server, Oracle) is how to “grid” a linear or polygonal object. By “grid” one means work out the square pixels (rectangular polygons) that cover or define a vector geometry. Here is some SQL for doing this for SQL Server 2008 Denali. DenaliRead 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