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

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

COGO: Converting Decimal Degrees to Degrees Minutes and Seconds – and back again (PostGIS)

It is useful to have functions for converting from individual degrees, minutes and seconds to a single decimal degree value and back again. Here are some useful plPgSql functions. DMS2DD Firstly, a function to convert individual degrees, minutes and seconds values to a single decimal degree value. Now for some examples…. Result: dms2dd -44.1805555555556 Result:Read More

COGO: Finding centre and radius of a curve defined by three points (PostGIS)

Recently I had need to convert a PL/SQL Oracle Spatial function I created years ago called FindCircle to SQL Server 2008 for use in another project. That function was original work already released to the public domain as part of my free COGO package for Oracle. Here is that function for SQL Server. Note thatRead More

STExtract: Extract elements of a geometry object

Of the functions I have written for Oracle, those that allow me to extract (sub)elements of compound (objects consisting of linestrings and circular arcs) and multipart geometries have found use time and time again in such activities as: Filtering Rings of Polygons; Extracting homogeneous objects (eg point, line or polygon) from geometry collections. This articleRead More