ENH: expose all shapely functions as GeoSeries/GeometryArray methods
See original GitHub issuepygeos
now contains some functions which could be exposed as methods on GeoSeries/GeometryArray levels. Some of them have shapely (1.7) versions, most do not.
I would not mind supporting them only if pygeos is installed and mark them as experimental until shapely 2.0 is out. The implementation of these should be relatively easy and straightforward then.
Probably incomplete list of candidates:
Measurement:
- frechet_distance
- hausdorff_distance
- minimum_bounding_radius
- minimum_clearance
Predicates:
- contains_properly
- is_ccw
- is_closed
- is_prepared
- is_valid_reason
Set operations:
- coverage_union
- coverage_union_all
- intersection_all
- symmetric_difference_all
Constructive:
- build_area
- clip_by_rect (#1928)
- delaunay_triangles
- extract_unique_points
- make_valid (#2539)
- minimum_bounding_circle (#2621)
- minimum_rotated_rectangle (#2541)
- normalize
- offset_curve
- polygonize
- polygonize_full
- reverse
- segmentize
- snap
- voronoi_polygons
Linestring operations:
- line_interpolate_point
- line_locate_point
- line_merge
- shared_paths
- shortest_line
Coordinate ops:
- count_coordinates
- get_coordinates
Geometry properties:
- force_2d
- force_3d
And potentially also creation ops. We now expose points
via points_from_xy
.
- box
- destroy_prepared
- ~empty~
- ~geometrycollections~
- ~linearrings~
- ~linestrings~
- ~multilinestrings~
- ~multipoints~
- ~multipolygons~
- points
- ~polygons~
- prepare
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
geopandas.GeoSeries
A Series object designed to store shapely geometry objects. Parameters. dataarray-like, dict, scalar value. The geometries to store in the GeoSeries.
Read more >Version 2.x — Shapely 2.0.0 documentation - Read the Docs
Shapely 2.0 exposes GEOS operations as vectorized functions that operate on arrays of geometries using a familiar NumPy interface.
Read more >Geopandas Distance
We can check the distance of each geometry of GeoSeries to a singlegeometry: >>> point=Point(-1,0)>>> s. ... All classes and function exposed in...
Read more >Geopandas Distance - Accademia e sartoria le filatrici
Geopandas DistanceGeoPandas (and shapely for theindividual objects) provides a whole lot of basic methods to analyse the geospatial datan (distance,length ...
Read more >How to use the geopandas.array.from_shapely function ... - Snyk
How to use the geopandas.array.from_shapely function in geopandas ... If input is a (Geo)Series, output is a GeoSeries, otherwise output is GeometryArray.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No, given the number and variety of shapely functions not exposed, it will be significantly longer with proper tests and documentation. Some are easy but a lot is not and we’ll need to figure out how to seamlessly implement them here.
We’re usually doing GSoC under the NumFOCUS umbrella so there’s a bit more time for us.
Do you still think this estimate is accurate?
It would be very nice to have all those functions exposed, and if this could be a potential GSoC project, the time to start thinking about that is around now.