Two practical uses of ST_Parallel
occur which are not difficult to create. The first is the ability to use the parallel line generated on one side of a line with the original line to create a square buffer on that side. This is done by:
Taking the original linestring (or each linestring in a multiline string in turn) and creating a parallel line to the left or right
If a parallel line is generated on the left, then reverse that line (
SDO_UTIL.Reverse_Linestring
) to ensure the correct vertex rotation of the polygon outer ring that is generatedAppend the reversed parallel line to the original line
To close the polygon ring, add the first vertex of the original line on to the appended line
Changing the
sdo_gtype
of the new geometry to that of a polygonIf no smoothing has occurred, create
SDO_ELEM_INFO_ARRAY
containing 1,1003,1 only; otherwise, prefix the appended linestring'ssdo_elem_info array
that contains circular arcs with 1,1005, n, where...