Useful Package of Wrapper Functions for Sdo_Util.AffineTransforms

—————————————————————————————- UPDATE (21 Mar 2018): Wrapper functions have been added to the AFFINE package to provide easier access to the SDO_UTIL.AFFINETRANSFORMS function. The AFFINE package now supports three different implementations of most of its functions: Original PL/SQL functions ST_AFFINE based on SYS.UTL_NLA_ARRAY_DBL SDO_UTIL.AFFINETRANSFORMS Improved testing of the AFFINE functions has also been implemented. The AFFINERead More

National Broadband Network, Spatial Data & Processing

As a spatial practitioner familiar with many aspects of spatial data capture and processing, I have been watching the responses to the opportunity that the National Broadband Network (NBN) offers the people of Australia and its federal, state, local and private spatial practitioners. One hears very little from NBN Co about what it is doingRead More

Compute Location from known Lat/Long point using delta easting and northing in miles

Over on the Oracle Spatial Forum at the Technology Network, Wojciech asked the following question: My problem looks that way: lets say we have a point: I want to get a location of a point 50 miles east and 30 miles north from the point presented here. Do you know how to achieve this? ThereRead 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

R based Delaunay Triangulation Function for PostGIS using the deldir package

Recently I had need of a function in PostgreSQL/PostGIS that generated a set of delaunay triangles from a set of XYZ points. I happened upon Regina Obe’s voronoi implementation that is based on deldir. Taking this as a basis I installed R and PL/R, and then used Mike Leahy’s original voronoi function (see PostGIS usersRead More

Rounding Coordinates or Ordinates in SDO_GEOMETRY

Often Oracle Locator/Spatial users want to know how to round the individual ordinates of the coordinates of an sdo_geometry. This article shows how this can be done. Background Oracle imposes no precision limit on the NUMBER that records an ordinate of a coordinate except that imposed by the NUMBER datatype itself. Also, while one associatesRead More

STScale: Function to Scale a geometry object

Here is a simple scaling function for use with SQL Server Spatial’s geometry data type. Now some tests. Results sType geomWKT Scaled2D LINESTRING (0.5 1.5 3, 0.5 0.75 1) Original LINESTRING (1 2 3, 1 1 1) Results sType geomWKT Scaled3D LINESTRING (0.5 1.5 2.4, 0.5 0.75 0.8) Original LINESTRING (1 2 3, 1 1Read More

STGeometry2MBR/STGeography2MBR: Compute and return MBR ordinates

SQL Server Spatial’s STEnvelope() function returns the minimum bounding rectangle of a geometry object but as a 5 vertex polygon. To access the lower left and upper right XY ordinates requires use of the STPointN() and STX/STY methods against the relevant vertices of the polygon as follows: Which is long winded, indirect and error prone.Read More

Creating linestrings from points

UPDATED: Fix in Order By and addition of second example. Here are some examples of how to construct linestrings from points stored in tables in two different formats. XYZ Values in SDO_POINT of SDO_GEOMETRY object The following example creates SDO_GEOMETRY point objects (2D) and stores them in a table linepoints. These points described individual featuresRead More