Pseudo Array Implementation for SQL Server Spatial (Part 2)

Introduction Data Structure + Base Function Accessors and Setters Four functions are declared for processing geometry or geography data within the array. These are “wrappers” over _STArray. Examples Declare @array xml select ‘Empty Array’ as test, [dbo].[STNumArray](@array) as arraySize; test arraySize Empty Array 0 Set @array = [dbo].[_STArray](@array,1,’insert’,geometry::Point(1,2,0).STAsBinary(),0); select ‘Insert into Empty ‘ as test,Read More

STCogo2Line: Creating (Multi)LineStrings geometries from COGO XML instructions

Previously I wrote about a function that converted the segments of a (Multi)LineString into a COGO XML document that contains all the instructions (bearing, distances, move deltaZ etc) to create a (Multi)LineString. Today I present a function that does the reverse: takes the COGO XML and creates the (Multi)LineString. The instructions are provided to theRead More

STLine2Cogo: Converting LineStrings to COGO XML

I have just written a useful function for my new package of TSQL functions for SQL Server Spatial called STLine2Cogo which converts (exports) a (Multi)LineString into a set of instructions (bearing, distances etc) that can be shared with other COGO functions. The function’s documentation can be seen at this STLine2Cogo Here are some examples: TheRead More

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

This is the 3rd and last blog post about processing VicMap IUF XML data. (The 6 month delay is because I lost a draft of this article, and have been doing other things.) While much in this and the previous articles are about an Australian XML data format, the principles outlined remain the same. ThisRead More

Loading and Processing GPX 1.1 files using Oracle XMLDB

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) Vector Markup Language (VML) Scalable Vector Graphics (SVG) Victorian Government’s (Aust) Incremental Update Format (IUF) New South Wales Government’sRead 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.