Creating a Grid of Geographic Tiles

Over the years I have made available functions that generate the tiles of a grid given user input. These have been made available in Oracle, PostGIS and SQL Server Spatial (geometry). Here are the type signatures of these functions: Oracle Object Oracle Package PostGIS SQL Server Geometry Requirement A customer has the requirement to generationRead More

Loading and Processing GPX 1.1 files using Oracle XMLDB

Note This is an article I wrote some years back which I have ported to my new website. Introduction There are a large number of geospatial data storage, delivery and interchange formats around nowadays. Including (I limit this discussion to vector data formats only): Geography Markup Language (GML) Keyhole Markup Language GPS eXchange Format (GPX)Read More

Using SQL Server XML and Spatial to import VicMap seed/Incremental Update Format (IUF) data (Part 1)

The VicMap Incremental Update Format file is an XML document that is used to publish whole datasets (e.g. every Local Government Area in Victoria) or changes to one or more individual records within a whole dataset.

The IUF encodes its geometry objects in its own unique way. While tools such as Safe Software’s Feature Manipulation Engine can process IUF documents, it is a good dataset to demonstrate the use of SQL Server XML and Spatial processing to import the data.

This article introduces the structure of the IUF XML data and shows how to process it to create polygons with exterior and interior rings, and attributes.

Migrating Tables with Geometry Columns from Oracle to SQL Server Spatial

A colleague asked me the other day how he could move data from a table in an Oracle database with a geometry column to SQL server. Of course I thought of this as a straight forward data migration exercise using standard database tools, in this case SQL Developer and SQL Server Management Studio (SSMS), whereRead More

STMulti

STMulti — Function that returns @p_geometry as a MULTI* geometry Function Specification Description In situations where a geometry column is constrained to hold only the multi version of a base geometry, storage of a single geometry eg LineString requires that geometry to be wrapped as a multi geometry eg MultiLineString. ALTER TABLE [dbo].[Colony] WITH CHECKRead More

STRound

STRound — Function which rounds the ordinates of the supplied geometry. Function Specification Description The result of many geoprocessing operations in any spatial type can be geometries whose ordinates (X, Y etc) have far more decimal digits of precision than the initial geometry. Additionally, some input GIS formats, such as shapefiles (which has no associatedRead More

Snap Point to SQL Server Spatial geometry using TSQL

This function uses the SQL Server Spatial ShortestLineTo function to compute a point on the boundary of the supplied geometry nearest to the supplied point. If the snap distance is < the user supplied @p_snap_within distance, the computed point is returned. However, if the distance is > the user supplied @p_snap_within distance the original point is returned.