Tip #6: Correcting invalid geometries

In Oracle one can gest for invalid geometries via the SDO_GEOM package’s VALIDATE_GEOMETRY (or VALIDATE_GEOMETRY_WITH_CONTEXT) function. To use it one does the following: Where 0.5 is the minimum distance between two vertices (I have deliberately not described the other overloaded version of this function that uses an DIMINFO structure). In SQL Server, if you executeRead More

The Sad State of SQL Spatial Standards – Take 2

There is a useful exchange going on over on the Microsoft Forums in relation to the paucity of information on geographic objects (as against planar objects) in the OGC SQL standard: this is in the context of SQL Server 2008 “Katmai” Spatial implementation. This exchange occured over Microsoft’s reading of the OGC standards in respectRead More

Tip #5: Where or where has my little column gone

In Oracle I often want to know the name of the columns that are of type SDO_GEOMETRY. Why? Because the Oracle metadata tables exposed to each user via USER_SDO_GEOM_METADATA may not have an entry for a particular table/column pair. The query is relatively easy: In SQL Server one can get the same information via theRead More

Tip #4: What Coordinate System is that?

SQL Server’s spatial reference system is based on EPSG. When using Oracle Spatial I have constant recourse to MDSYS.CS_SRS – the master table that holds all the spatial reference systems Oracle supports – to discover the right SRID to use when constructing Sdo_Geometry objects. For example, if I want to find the SRID for theRead More

Tip #2: Spatial Indexing and Primary Keys

For fast and efficient search and retrieval all columns containing spatial data should have a spatial index created on them. For Oracle an index can be created on any SDO_GEOMETRY column regardless as to whether the table has a primary key or not. This is because Oracle uses an internal, unique, ROWID pseudo-column in itsRead More

Tip #1: SQL Server 2008 “Katmai” – Setting SRIDs

Using FME 2008 Beta I loaded a shapefile containing Local Government Areas in Tasmania into SQL Server 2008 “Katmai”. The shapefile didn’t have a .PRJ and I forgot to set the SRID in FME. So, without reloading the shapefile how can I change the SRID? Firstly, open the Microsoft SQL Server Management Studio, open theRead More

Generating multi-points from single point records in Oracle Spatial

Introduction The background to this blog article comes from some work I did for GeoScience Australia in May-June 2007. This work involved the creation of a ‘distribution’ database from a ‘production’ database using Oracle replication with presentation by UMN MapServer. The ‘production’ database included a single table (containing around 70 million individual point records thatRead More

SQL Server 2008 Katmai

As evidenced on the following Microsoft Press Release I am pleased to be able to offer training and support services to SQL Server Spatial customers. In particular the I offer: Database Benchmarking to improve ROI; Database Building and Configuration Services including: Data Quality & Rules Documentation; Data Conversion; Migration; Loading; Database Design; T-SQL Script Coding;Read More