Scheduling the Export of Spatial Data in Oracle to a Shapefile each night

While there is always a need for software like Safe Software’s Awesome FME to automate import and export tasks from your database, the ability to do so just using Oracle can also be enormously useful. I have implemented the approach described below many times over the years, in different customer sites. At one customer site,Read More

ST_Densify for Object PLSQL

The Java Topology Suite (JTS) has a linestring densifier function that is available in my Spatial Companion for Oracle (SC4O) solution. See here for documentation. For those who aren’t able to install SC4O (some DBAs don’t like it), there was a PL/SQL function in my the old GEOM Package implemetation on this website that allowsRead More

PLSQL ST_AsEWKT and ST_FromWKT Functions For Oracle (any version)

Previously I created the following Java stored procedures to enable the import/export of ZM aware WKT. ST_GeomFromText ST_GeomFromEWKT ST_AsText ST_AsEWKT These functions are necessary if one wishes to exchange geometry data with users of other databases that support WKT functions for 2D, 3D or 4D (ZM). For example, PostGIS supports the EWKT format and providesRead More

STFlipVectors: Normalize direction of linestring vectors

In the past I have found use for the ability to “flip” vectors in a polygon in order to provide an independent check on the topological integrity of planar enforced polygons. What I mean by topological integrity is that there are no gaps or overlaps between adjacent polygons. A simple method for doing this reliesRead More

STConvertToLineString: Extract LineStrings in GeometryCollection to create LineString

I had need today to create a function that extracts all linestring elements from a GeometryCollection and returns a LineString or a MultiLineString. The function is called STConvertToLineString as is described as follows: Its documentation can be seen see here. Here are some examples of how to use it: I hope this function is ofRead 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