Select to view content in your preferred language

ST_GEOMETRY function to remove M and/or Z values

1212
2
04-14-2022 10:41 AM
Status: Open
Bud
by
Esteemed Contributor

Could a function be added to ST_GEOMETRY to remove the M-dimension from a geometry?

Similar to SDO_GEOMETRY's CONVERT_TO_STD_GEOM function:

SDO_LRS.CONVERT_TO_STD_GEOM
Converts an LRS geometric segment to a standard SDO_GEOMETRY line string by removing measure information.

 

2 Comments
Bud
by

We also need to be able to remove the Z dimension from ST_GEOMETRY.

Related post here: 

I need to remove Z dimension on spatial column (ST_GEOMETRY) with Esri on Oracle using the PL/SQL pa...

Bud
by

For anyone who doesn’t want to wait for this to be implemented, here are some ideas for a temporary workaround:

Convert the ST_GEOMETRY to WKT, manipulate the WKT ordinates, convert back to ST_GEOMETRY.

Note: We might lose some information from the SHAPE if we did that, such as losing true curves, since true curves are only stored in the shape blob, not in the ST_GEOMETRY portion of the SHAPE column. What column is true curve data stored in? (SDE.ST_GEOMETRY for Oracle)
In other words, the ST_GEOMETRY constructor function that we’d use to update the SHAPE would replace the entire SHAPE value, so the shape blob with true curves info would be lost.

Links:

I haven’t had a chance to test those ideas.