* Refactor geopandas.testing._check_equality
* Use geom_equals or geom_almost_equals consistently
* Reuse repeated code to generate AssertionError
* Only check equality once instead of three times
* Make mask helper functions private
* Add test case
* DOC: fix typo in contributing section
* DOC: make minor changes in 'Updating the Doc' section
* DOC: remove whitespace
Co-authored-by: Andreas Eliasson <andreas.eliasson@geodata.no>
* Add GeoSeries to_wkt and to_wkb methods
* Add hex=False kwarg to existing from_wkb functions
* Add GeoSeries from_wkt and from_wkb methods
* Add wkt, wkb, and wkb_hex kwargs to GeoDataFrame constructor
* Add GeoDataFrame to_wkt and to_wkb methods
* Remove _export_wkb method from arrow in favor of GeoDataFrame to_wkb
* Shorten line lengths to satisfy linter
* Apply black reformatting
* Remove most references to WKB hex. shapely supports it, pygeos does not.
* Remove docstring examples of GeoSeries.to_wkb and GeoSeries.from_wkb, as docstrings interpreted as source code are not allowed to contain null bytes
* Change GeoSeries from_wkb/t from staticmethod to classmethod and return using cls
* Allow GeoSeries.from_wkb/t to accept Series input, and test that
* Remove GeoDataFrame.__init__ wkt and wkb kwargs
* Use GeoSeries.from_wkt in example
* Keep index of Series passed to GeoSeries.from_wkb/t
* Apply suggestions from code review
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
* Add one-liner docstring to _from_wkb_or_wkt and see also to from_wkb and from_wkt
* Reindex instead of raise ValueError when passing index to from_wkb/t with series
* Expose hex and kwargs in to_wkb/t methods
* update example
* Fix lint error
* preserve index of passed series
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
* expanded assert messages. Refactor of duplicated code
* black formatted
* fix forgotten if
* fix forgotten ifs
* reformat code, add indeces to error and full first geometries
* fix typo
* expand tests and check for error message
* truncate string
Co-authored-by: ImanolUr <imanol@live-eo.com>
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
* Make the id property in to_json optional
As discussed in #390, the id property in geojson generated with to_json
may not be all that meaningful (frequently just an arbitrary row number
in a dataframe). The option to disable writing ids without meaning is
given here with a new argument `drop_id`, set to `False` by default.
* Add to_json tests when only geometry column
* Fix linting error
* Improved docstring on drop_id option
* Fix merge conflict leftover
* Set id key first in iterfeatures
* Update geopandas/geodataframe.py
* Update geopandas/geodataframe.py
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
* 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