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

Create Polygons and Linestrings From Bearings And Distances (COGO)

UPDATE The original functions have been modified and deployed via my Oracle Object code. They original code is no longer available. My COordinate GeOmetry (COGO) package has been around for a long time. What I had not done was use the power of this package to construct polygons (2003) or linestrings (2002) from a startingRead 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

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

Finding centre and radius of a circular geometry

Here is a method for finding the centre of a circle and its radius from a polygon (x003) sdo_geometry. Some examples: The SDO_UTIL.CIRCLE_POLYGON function is trickier because it generates 8307 longitude/latitude data. So the above function, based as it is on projected data, can only give us a basic approximation. The returned radius is goingRead More

COGO: Convert DMS String to decimal degrees floating point number.

In my article on DD2DMS I outlined how to convert a latitude or longitude as a decimal degrees value to a formatted string. This article describes a function, DMS2DD that reverses those values back to a single decimal degree value. Note that I have a schema call cogo in which I create functions like this.Read More