* Add warning if keep_geom_type drops geometries during overlay
* Expand keep_geom_type warning message
* Add test for keep_geom_type dropping geoms
* Set keep_geom_type=None by default
With True, no warning raised. With None, will drop geoms of other types,
but warn the user.
* Update geopandas/tests/test_overlay.py
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
* TST: fix tests with matplotlib master
* also fix legend height test + more robust method to get specific axes object
* fix robust helper method for old matplotlib
* typo
* WIP: Added check to GeoDataFrame.explode() to see if it should fall back to the default pandas method of the same name
* Will geometrically explode if the column dtype is geometry, and defaults to active geometry column if left as None
* changed type check to isinstance
* moved explode() definition from GeoPandasBase to GeoSeries
* Removed ignore_index from explode() args
* cleanup
* black
* skipif
* skipif pandas 024
* added test for epxlode pandas fallback when column param is provided as arg instead of kwarg
* Using assert_geodataframe_equal instead of assert_frame equal and test column param supplied as arg or kwarg in both cases per function (ignore_index=True or False)
* blacken + docs
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
* ENH: Add estimate_tum_crs method to GeoSeries and GeoDataFrame
* Add examples & expect release in 0.9
* undo changes in CI
* Update geopandas/geoseries.py
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
* pytest.mark.skipif
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
* Update geopandas/geodataframe.py
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
* more skipif
* use pyproj to transform bounds
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
* Do not attempt to plot empty geometries. Fixes#1657
* Add test for plotting of empty geometry
* Add warning when plotting GeoSeries with only empty geometries
* Add test for plotting GeoSeries with only empty geometry
Co-authored-by: Giacomo Caria <gcaria@loholt1.ipsl.polytechnique.fr>
* BUG: Keep geoms within geometry collections after overlay
The approach here is to apply an explode operation after the result of
the overlay, then filter by geom types, and apply a dissolve based on
the level of the index from the explode representing the original
geometry groupings.
* Add test for geom collection from overlay
Overlays with complex geometries could produce geometry collections that
would be dropped with keep_geom_type=True. This tests that such cases
return the geometries that correspond to geom_type with
keep_geom_type=True.
* Update geopandas/tools/overlay.py
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
* Let wrappers handle valid predicates
* Check for error in tests
* Allow None for pygeos
* set syntax duuuhh
* replace query bulk predicate check
* Remove error handling changes
* Add tests; make valid_preds a class method
* make things just a property
* add regression test
* reindex if column is a Series when plotting
* remove unnecessary import
* add test for pd.Series colors w/o index too
Co-authored-by: Nick Hand <nicholas.adam.hand@gmail.com>