Category Archives: Oracle

Sorting and merging geometries in Oracle Spatial

Consider a requirement where an unsorted set of geometries needs to be merged into a single geometry. Take for instance the following set of geometries where: a Red dot indicates the startpoint The arrow indicates the drawing direction The label “1-50” indicates the order of drawing and an identifier for the geometry Both of these… Read More »


The SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT function fails for 3D Compound line strings geometries as discussed over here. This is illustrated by the following sample: 2d: produces: While the same geometry in 3d is considered invalid: A Quick workaround for this is to convert the geometry to 2d: result: hope this helps, Stephan