WIP: get parts of a geometry collection or multi* geometries#130
WIP: get parts of a geometry collection or multi* geometries#130brendan-ward wants to merge 2 commits intopygeos:masterfrom brendan-ward:to_parts
Conversation
|
@brendan-ward I think we reached a consensus on the return value in #128 Looking at this draft PR, the work is almost done. What I think needs to be changed (functionally) is:
|
|
Agreed on the use of Personally, I don't like Could we go with I also need to add support for |
|
I agree on "dump" not being a clear name IMO (I know the analogy with PostGIS is generally nice, but here I would personally not follow it) |
|
Also, I personally think we should consider doing functions like |
|
Superseded by #197 |
Closes #127, closes #128
This includes a bit of refactoring to make it easier to reuse our functions and types in C.
vector: types and functions for working with resizable vectorsgeom_op: arbitrary place to put operations on geometries that are not ufuncs and not at the core of creating / converting geometriesThis lifted the
GetGeometryNfromufuncs.ctogeom_op.cfor reusibility in both. There are a few other C functions inufuncsthat could move here as well (to keep the ufunc code focused on ufuncs), but weren't directly related to changes here.We clearly need a better name for this function,
get_partsis just a placeholder for now.This takes as input a geometry or 1d array of geometry, and returns a tuple of indexes and new geometries for the parts.
GeometryCollection is not yet implemented. There are recursive aspects of that which will require a bit more refactoring here.
I did not implement the single geometry case. There might be a better way to handle that in a different function or method.
Key things to focus on here: