Commit Graph
1322 Commits
Author SHA1 Message Date
Martin FleischmannandFlavin 79aeefacd7 DOC: documentation improvements (#1750)
* docstring changes

* cx

* notes

* ci fix

* skip check

* updates based on the review

* Update geopandas/base.py

Co-authored-by: Flavin <flavinj@gmail.com>

* typo

Co-authored-by: Flavin <flavinj@gmail.com>
2021-01-30 11:00:00 +00:00
Will Schlitzer cfc732e610 DOC: Update copyright year (#1806) 2021-01-28 20:27:06 +00:00
Brendan Ward 5759f0c4ec ENH: integrate pygeos.get_parts for faster explode() (#1693) 2021-01-28 09:44:56 +01:00
Joris Van den Bossche 6bdb001ed6 Fix compatilibilty with numpy 1.20.0 (#1729) 2021-01-26 21:35:39 +01:00
Joris Van den Bossche 27d07dd15a CI: remove pygeos from builds using defaults channel (not compatible with pygeos 0.9) (#1794) 2021-01-26 08:14:33 +01:00
Joris Van den Bossche 407ed72339 GHA: ensure to upload sdist to GitHub release (#1797) 2021-01-26 08:14:13 +01:00
Martin FleischmannandJoris Van den Bossche b3db3be001 GHA: Automatic release to GitHub and PyPI (#1578)
also create github release (thanks to pysal)

Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
2021-01-25 21:15:39 +01:00
Joris Van den Bossche c07ae3c50b DEP: lazily import fiona only when used (to make it possible to not have it installed) (#1775)
* DEP: lazily import fiona only when used (to make it possible to not have it installed)

* fix test
2021-01-24 22:01:37 +00:00
Martin Fleischmann 77f0119c16 TST: skip pandas EA test (pandas #38733) (#1790) 2021-01-24 20:43:12 +01:00
Jacob Hayes eabe4049dd ENH: support for sqlalchemy connections in to_postgis to support external transactions (#1638) 2021-01-14 15:20:03 +01:00
Giacomo Caria 630f13bacb TST: Fix plotting tests (#1766) 2021-01-14 14:34:32 +01:00
Martin Fleischmann 1a6bb4204d TST: skip test_argreduce_series (#1767) 2021-01-10 20:18:03 +01:00
Alan D. Snow f53d77c950 DOC: Update rtree wheel information in installation instructions (#1770) 2021-01-05 09:03:13 +00:00
Adam J. Stewart 36521787c3 DOC: italics can't be nested in links (#1762) 2020-12-31 19:47:46 +00:00
Martin FleischmannandJoris Van den Bossche d1b71c4bfd BUG: implement custom __contains__ for GeometryArray (#1753)
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
2020-12-28 22:22:20 +01:00
sangarshanan 8383e17a83 ENH: Overload from_dict to accept crs and geometry (#1619) 2020-12-28 14:57:28 +01:00
Tim Gates 7d3136b834 DOC: fix simple typo, recommenend -> recommend (#1755) 2020-12-28 08:44:14 +01:00
4a84f0b8eb BUG: Expand values as colors only once when plotting MultPoints (#1694)
* Expand values as colors only once. Fixes #1679

* Fix test_multipoints when using values as colors

* Add comment about expansion of values

Co-authored-by: Giacomo Caria <gcaria@loholt1.ipsl.polytechnique.fr>
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
2020-12-27 14:30:35 +00:00
7a6fcbbb0b DOC: another batch of docstring examples (#1733)
* docstring examples

* fix buffer

* Apply suggestions from code review

Co-authored-by: Flavin <flavinj@gmail.com>

* Update geopandas/base.py

Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>

* use matplotlib plot directive

Co-authored-by: Flavin <flavinj@gmail.com>
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
2020-12-27 14:04:18 +00:00
Martin Fleischmann 387e3fd68e REGR: fix pickle issues (#1747)
* fix shapely pickling

* test

* fix 1746

* explain

* fix tests

* try with fixture

* fix tests on windows
2020-12-27 13:54:55 +00:00
Isaac BoatesandMartin Fleischmann bdbca79d91 ENH: fallback to DataFrame.explode() when the specified column is not the geometry column (#1720)
* 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>
2020-12-27 11:25:04 +00:00
Joris Van den Bossche 1ef924270e DEP: No longer rely on descartes, use own version of PolygonPatch (#1677) 2020-12-20 16:48:02 +01:00
Jake Clarke e506de5900 DOC: Fixing a typo in "South America" (#1725) 2020-12-07 09:34:03 +00:00
Martijn Visser 5096498fcd DOC: remove misplaced curly bracket from projection.rst (#1721) 2020-12-03 22:58:38 +00:00
Martin Fleischmann c325570e86 CI: add Python3.9 to CI matrix (#1703) 2020-11-27 11:30:23 +01:00
Alan D. SnowandMartin Fleischmann a0edbee7d2 ENH: Add estimate_utm_crs method to GeoSeries and GeoDataFrame (#1646)
* 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>
2020-11-27 10:15:26 +00:00
Giacomo CariaandGiacomo Caria c085944630 REG: Do not attempt to plot empty geometries (#1702)
* 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>
2020-11-25 22:15:36 +00:00
Martin Fleischmann 5856332704 ENH: allow GeoDataFrame.dissolve(by=None) (#1568)
* ENH: dissolve(by=None)

* use array
2020-11-24 12:01:02 +00:00
Flavin cdb9c37590 REF: Add geometry and crs to GDF.__init__ signature (#1714) 2020-11-23 21:53:42 +01:00
Giacomo CariaandGiacomo Caria 59d3b2b726 Suppress warning when calling repr of empty GeoSeries (#1673)
Co-authored-by: Giacomo Caria <gcaria@loholt1.ipsl.polytechnique.fr>
2020-11-22 22:02:29 +00:00
James McBrideandMartin Fleischmann 55d72a1010 BUG: Keep geoms within geometry collections after overlay (#1582)
* 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>
2020-11-18 22:23:39 +00:00
Martin Fleischmann cdb42821ab CI: fix conda setup (#1706)
* CI: fix conda setup

* fix env variables

* another attempt

* fix echo
2020-11-16 22:45:19 +00:00
Adrian Garcia Badaracco 57262a8821 ENH/MAINT: Let wrappers handle valid predicates (#1698)
* 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
2020-11-16 21:18:19 +00:00
Joris Van den Bossche aa68766279 TST/ENH: support array-like alpha + fix plotting tests for matplotlib dev version (#1676) 2020-11-10 21:31:42 +01:00
Adrian Garcia BadaraccoandMartin Fleischmann f33c483a33 ENH: add public has_sindex method (#1627)
* add public sindex_generated method to GeoDataFrame, GeoSeries and GeometryArray

* add docstring

* doc suggestions

* PR feedback

* revert docstring

* geometry -> geom

* edit docstring

* Update geopandas/array.py

Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>

* formatting

* PR feedback

* Update base.py

* add to api docs

Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
2020-11-10 19:11:16 +00:00
Martin Fleischmann c823893cde GH: link geopandas-feedstock for conda-forge issue (#1685)
* GH: link geopandas-feedstock for conda-forge issue

* the
2020-11-10 18:54:06 +00:00
Adrian Garcia Badaracco a6d45c90de TST/MAINT: Deprecation of has_sindex (#1690)
* Hacky deletion of has_sindex

* remove unused imports
2020-11-09 20:52:26 +00:00
Nick HandandNick Hand ca101aae93 BUG: categories passed as a series are not properly sorted (#1670)
* 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>
2020-11-07 21:22:47 -08:00
Joris Van den Bossche 9fdeb14741 Compatibility with Shapely 1.8 deprecation warnings (array interface, asShape) (#1662) 2020-10-28 09:19:17 +01:00
Joris Van den Bossche 924cdf65c7 ENH: support pandas' new .attrs functionality (#1658) 2020-10-16 15:08:59 +02:00
Joris Van den Bossche 998375c8b0 Compatibility with Shapely 1.8 deprecation warnings (iteration) (#1659) 2020-10-16 11:22:17 +02:00
Martin Fleischmann 7044aa479d REGR: CRS lost in GeoSeries.explode() 2020-10-13 13:19:58 +01:00
Martin Fleischmann 7e595d08a5 DOC/CI: remove Travis from docs and paths (#1632)
* DOC/CI: remove Travis from docs and paths

* use envs

* fix

* typo

* how to trigger check
2020-10-10 20:03:25 +01:00
Martin Fleischmann 63de9bd182 DOC/CI: enable doctest (#1651)
* inital doctest work

* doctest

* skip from_file

* test docstring with postgis only

* use doctest-plus

* c-f

* conditional imports

* revert

* revert conda

* fixture to conftest.py

* minimise changes, verbose output

* remove blank line

* revert pandas doc
2020-10-10 18:44:11 +01:00
Martin Fleischmann aa9f9c1ed8 DOC: add sphinx-toggleprompt to red environment (#1650) 2020-10-08 19:16:00 +01:00
Martin Fleischmann 330ed11dc1 DOC: Docstring examples (#1617)
* GeoSeries examples

* GeoSeries examples

* GeoDataFrame examples

* missed one

* base examples

* review changes

* toggleprompt

* brendan's comments

* further comments
2020-10-08 18:32:19 +01:00
Martin Fleischmann 1e975abc59 BUG: fix pygeos geom types mapping (#1644) 2020-10-04 07:05:26 +02:00
Martin Fleischmann ab96b6a7a2 BUG: fix geom types codes for pygeos (#1641) 2020-09-28 09:33:33 +01:00
Martin Fleischmann d1d4b46673 CI: keep pygeos master in dev environment only (#1639) 2020-09-28 08:53:15 +02:00
sangarshanan 63615be8b0 ENH: Check for duplicate column name in rename_geometry (#1602)
* check for duplicate column name in rename_geometry

* use fstring instead of %s
2020-09-27 09:40:07 +01:00