1

I would imagine that running GETNUMELEM against a MultiPoint would return the number of points in the MultiPoint, but it seems to always return 1. I'm comparing it with ST_NumGeometries in other databases. I'm sure I could hack it with a call to SDO_UTIL.GETNUMVERTICES and a case statement but this seems like a bug to me. Surely the intention of GETNUMELEM on a MultiPoint can't be to always return 1?

2
  • Could you add the SDO geometry as text? Or check yourself if you really have MultiPoint and not Point cluster gis.stackexchange.com/questions/206659/….
    – user30184
    Commented Aug 23, 2023 at 15:32
  • You are right!!! The library I was using was incorrectly creating a point cluster vs. a MultiPoint. My bad. If you want to put that as the answer I can mark it as answered. THANK YOU!!! Commented Aug 28, 2023 at 18:35

1 Answer 1

1

Multiple points can be stored into a sdo_geometry either as a MultiPoint or as a PointCluster. MultiPoint contains points as elements, which means by the same that the sdo_elem_info_array has as many triplets as there are point elements in the MultiPoint. For example

sdo_geometry (2005, null, null,
sdo_elem_info_array (1,1,1, 3,1,1, 5,1,1), 
sdo_ordinate_array (65,5, 70,7, 75,5)))

In a point cluster the points make a one entity and they cannot be split into elements. As a difference to MultiPoint the sdo_elem_info_array contains only one triplet. For example

sdo_geometry (2005, null, null,
sdo_elem_info_array (1,1,3), 
sdo_ordinate_array (50,5, 55,7, 60,5)))

The sdo_geometry examples taken from https://gis.stackexchange.com/a/233958/30184

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.