petern48 opened a new issue, #170:
URL: https://github.com/apache/sedona-db/issues/170

   This [PR](https://github.com/apache/sedona-db/pull/90) introduced a new 
`WkbBytesExecutor` that was used to optimize the implementation of 
`st_geometrytype`. It allowed us to extract what we needed without parsing the 
entire buffer, saving a lot of time. I had the bright idea of leveraging this 
for the dimension calculation, so we can implement functions like `st_hasz` and 
`st_hasm` without parsing the entire geometry. The logic turns out to be more 
complicated than I originally expected (due to edge cases relating to inferring 
the dimensionality), but I still think this is doable.
   
   To properly get the dimensionality, we need to OR all of the following 
(short circuiting permitted of course):
   - the dimensionality of the geometry type (the obvious one)
     - e.g `POINT Z EMPTY`
   - the dimensionality of the first nested geometry (if it's some sort of 
collection)
     - e.g `GEOMETRYCOLLECTION (POINT Z (0 0 0))` -> xyz
   - the dimensionality of the first coordinate
     - e.g `POINT (0 0 0)` -> xyz, `POINT (0 0 0 0)` -> xyzm
   
   
   All of those examples are (apparently) valid.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to