COGO: Compute number of vertices required to stroke circle or circular arc

In working with circles or arc segments one needs to be able to do more than just calculate chordlengths, arclengths or arc2chord separations. For example, in order to be able to convert circles and arcs to vertex-stroked polygons and vice versa one needs to be able to compute the number of vertices to place betweenRead More

COGO: Compute arc length subtended by angle centre of circle

In working with circles (and circular arcs) in spatial data one must be able to compute the length of an arc defined by an angle subtended at the centre of a circle. In particular this is important for converting circles to vertex-stroked polygons and vice versa. Here is an encoding of the calculation of theRead More

COGO: Compute chord length of segment of a circle (arc)

In working with circles one must be able to compute the arc2chord separation, the length of an arc and the length of the chord subtended by an angle subtended at the centre of a circle. In particular this is important for converting circles to vertex-stroked polygons and vice versa. Here is an encoding of theRead More

COGO: Computing Arc To Chord (Arc2Chord) Separation

Computing the arc to chord (Arc2Chord) separation between an arc on the circumference of a circle and the chord subtended by that arc is considered to be a vital measure for determining how well a vertex defined polygon matches its related circle (or arc in a circular arc). In cadastral applications, an arc to chordRead More

COGO: Creating a stroked polygon from a circle’s centre x,y and radius

The relevant standards covering spatial data types within databases provide functionality at many levels (and miss some that is required by pratitioners like myself) from object definition through to API specification. One area within those standards that has limited support within commercial GIS software and database implementations is the case of circular arcs (line andRead More

COGO: Finding centre and radius of a curve defined by three points: FindCircle function

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 that IRead More

Generating random point data for SQL Server 2008 Spatial

There is often a need for all sorts of reasons, for the generation of spatial data within a database like SQL Server 2008. I have blogged on this before for Oracle Locator/Spatial but the tricks to doing this in SQL Server 2008 are very much different from what is achievable in Oracle. This is toRead More

New Presentation on Active (Searchable) Spatial Metadata for SQL Server 2008 Spatial and FreeText

I gave a presentation on some work I did last year for a customer on providing a sophisticated spatial/textual search capability against over 700 tables of spatial data stored in SQL Server 2008 Spatial. The searching combined Spatial and Free Text index based searching. The basic idea is that the main thing in static spatialRead More

STisGeo: Checking if a column in a table or a view is of type geometry or geography

Sometimes things are simple and prosaic rather than clever and complicated. Building solutions in TSQL requires one to build a prior collection of handy functions before one can be really productive. Here is a function I use called isGeo which if provided the name of a table/view and a column name returns 1 (true) ifRead More