Commit Graph
897 Commits
Author SHA1 Message Date
Joris Van den Bossche a7c3bafe50 TST: fix the tests for >= python 3.6 (#759) 2018-07-06 23:43:59 -05:00
Christopher Ren 62c39fb8a1 ENH: explode() method for geodataframe (#671) 2018-07-05 16:58:29 +02:00
Rutger Hofste d0c4372498 DOC: clarify MultiIndex of explode() return value (#675) 2018-07-05 05:05:46 +02:00
James McBride fa27b57b7b DOC: remove broken link in projections 2018-06-14 23:11:29 -07:00
Joris Van den Bossche 098a78bb4e DOC: use conda forge for doc dependencies 2018-05-30 22:24:40 +02:00
James McBride 6e0fd9b18e ENH: get SRID from postgis read (#627)
* ENH: get SRID from postgis read

As currently implemented, this is relying on string parsing from the sql
string passed in by the user. An API change could achieve this without
the string parsing. Or something else I'm not seeing?

* Fix polygons -> geometries in comment

* Remove brittle SRID postgis extraction

Change previous test to xfail, add test of "select geom as the_geom".

* Use GEOSGetSRID to return SRID from postgis

Per @jorisvandenbossche suggestion. Also simplifies wkb loading using
the shapely.skb.loads argument hex=True. Add the argument hex_encoded to
read_postgis so that non hex geometries might also be read.

* Un-xfail test for SRID read

With SRID read from geodatabase support, can now set CRS automatically
so that user does not need to.

* Remove check for unique SRID in sql read

Assume the CRS for frame from SRID in first geometry.

* Add test of sqlite database read

* Add type check in sql geometry read

I think this both addresses python2 failures for sqlite and WKBElement
reads.

* Rename read_postgis to read_sql

Create wrappers read_postgis and read_sqlite

* Add read_sqlite to __init__

* Add test to create sqlite database for testing

Rename the function for postgis from create_db to create_postgis. This
permits not shipping the sqlite table as part of the datasets.

* Amend read_sql docs per Joris's comments

* Remove nybb.sqlite dataset

* Clean up sqlite db creation/execution

* Remove explicit sqlite support

* Remove read_sqlite command from __init__ too

* Fix sqlite read tests

* Fix failures in merge conflict resolution
2018-05-17 22:57:21 -07:00
balmandhunter f03781cc02 BUG: fix incorrect parameters in translate (#723) 2018-05-12 21:49:05 -07:00
Joris Van den Bossche 766b9fcda5 DOC: add example to add basemap with contextily (#717)
* DOC: add example to add basemap with contextily

* add contextily to readthedocs environment
2018-05-09 10:34:43 +02:00
Joris Van den Bossche ce8f70c80e TST: more thorough testing of overlay (#343) 2018-04-30 08:55:20 +02:00
Joris Van den Bossche 79706d6989 Add assert_geodataframe_equal function + expose testing functions in geopandas.testing module (#707) 2018-04-29 14:37:26 +02:00
Joris Van den Bossche 8b5bcb4419 TST/DEP: remove support for pandas <0.19 (#708) 2018-04-29 13:58:38 +02:00
Joshua Wilson b0b01ec4f8 ENH: add support for plotting MultiPoints (#683) 2018-03-29 22:53:23 +02:00
Ramiro Gómez d3df5eb950 Adjust the scheme option docs to reflect the source code (#693)
I noticed some differences between the docs and the source code. By default scheme is ``None`` and ``equal_interval`` mustn't end with an s otherwise an exception is raised. I also changed the link because the current URL resolves to a 404 error.
2018-03-19 22:05:07 +01:00
mrahim 63b4279c6a Building a GeoDataFrame from DataFrame (#690) 2018-03-17 23:20:45 +01:00
Joris Van den Bossche ca35666242 BUG: fix GeoSeries construction from scalar on pandas master (#692) 2018-03-17 20:11:57 +01:00
Benjamin Root e98a289149 Explicitly set the dtype for geometry operations (#686)
Not doing so resulted in incorrect dtypes when the
result was empty since numpy could not automatically
determine the dtype. This then had the effect of
indexing dropping columns unexpectedly.
Closes #685
2018-03-17 16:20:38 +01:00
Joris Van den Bossche 8d39811b82 DOC: remove ambiguous 'minimum' in distance docstring (#674) 2018-03-14 21:23:20 -07:00
James McBride 891c5cd73c BLD: remove matplotlib master from 2.7 (#682)
Matplotlib master no longer supports python 2
2018-02-26 09:49:58 +01:00
James McBride 657483a3b3 Update CHANGELOG.md
Add substantive changes from the past few months
2018-02-25 14:10:39 -08:00
Joshua Wilson 97adf46803 ENH: accept bbox of geoseries for filtered read_file (#613)
* Fix for when read_file bbox crs does not match target file crs

* added tests for read_file with GeoSeries/GeoDataFrame boundary

* Group related tests in test_io

* Make adjustment to read_file bounding box doc
2018-02-25 14:00:14 -08:00
Christopher Ren a577b12486 ERR: Better error message for writing empty dataframe to file (#663) 2018-02-08 10:08:14 +01:00
Christopher Ren 2acd8b98f2 TST: test_geocode.py pytest conversion (#659) 2018-02-07 11:24:48 +01:00
James McBride a074f73e97 BUG/CLN: remove unused and broken test utility (#661)
The assert_seq_equal test was not used, and was written in such a
way that it would never fail.
2018-02-04 22:22:06 +01:00
James McBride 7b692fe8b5 BUG: Save z dimension in file writes (#652)
* BUG: Save z dimension in file writes

In so doing, add the has_z attribute to series. The check in determining
the geometry type is pretty simplistic. Given how fiona is thinking
about geometry types now (https://github.com/Toblerity/Fiona/issues/465)
I didn't see a clearly better way.

* Add test for a 3d polygon, too

* TST: Add has_z test

* TST: Mix 2D/3D polygons in file writes

Removed the pandas assert_frame_equal test because it will no longer
pass anywhere due to the 2D/3D handling, which doesn't look like
something there's any way around without changes to fiona (or possibly
GDAL?).
2018-01-30 21:59:04 -08:00
Joris Van den Bossche 36c8bcda34 BUG: read empty files correctly (#653) 2018-01-28 23:35:45 +01:00
Christopher Ren 6a72e7ef73 TST: Fixtures and test clean up for test_dissolve.py (#654) 2018-01-28 11:06:55 +01:00
Christopher Ren d98318948c TST: parametrized test_datasets.py tests (#646) 2018-01-27 10:07:22 +01:00
James McBride de7b657c22 Remove descartes from install requirements (#648)
* Remove descartes from install requirements

The descartes import in plotting is hidden, so it is not a hard
dependency, and should not be required for installation.

* Update install reqs in README.md
2018-01-26 19:59:56 -08:00
James McBride a3810f3170 Raise ValueError using to_file with bool column (#643)
* Raise ValueError using to_file with bool column

Fiona doesn't support writing to files with boolean type. There was some
discussion of converting to int and writing to file anyway, but at a
minimum seems useful to raise a clearer message about the problem.

* Improve warning with to_file on bool column
2018-01-24 19:44:37 -08:00
Joris Van den Bossche 8cad410ebd Update .gitignore (#628) 2018-01-19 20:08:45 +01:00
James McBride a9c9ebaa0f ENH: Set point markersize with column values (#633)
Can optionally set the size of points in a scatter plot of point
geometries to be specified by the value of a column in the frame. Note
that it does not perform any normalization at present, so very small or
very large values in the column specified lead to less than desirable
results. Also no checks on user, so if a user specifies a column with a
non numeric type, it does throw a slightly less than clear error.
2018-01-19 20:06:20 +01:00
Joris Van den Bossche 78e74f2689 DOC: fix readthedocs problems with conda (#641) 2018-01-16 18:27:59 +01:00
James McBride e36f827e33 DOC: Rely on conda for sphinx-gallery 2018-01-14 19:51:32 -08:00
James McBride de878fadf8 TST: Add test of naturalearth spatial join (#638)
Looking to test out issue raised in #637.
2018-01-12 21:05:54 -08:00
François Leblanc 7a7a3c8e1d Add link to JupyterHub's MyBinder, and fix example notebooks (#631)
* fixed nybb

* rearrange chloropleths example

* added badge to MyBinder

* extra formatting on README

* add extra info in chrolopleths.ipynb

* Update choropleths example
2017-12-22 09:25:52 -08:00
Joris Van den Bossche f38c6c1609 DOC/BLD: correct environment.yml file syntax 2017-11-24 09:29:41 +01:00
Filipe f01b951d4a CI: build env in one go (#617) 2017-11-21 13:37:43 +01:00
James McBride 80268d2ed1 DOC: Add minimal geocoding example for docs (#614)
Shows the location of borough centers accessed through Google geocoding
API, along with the boundaries in the shapefile included in geopandas.
2017-11-21 13:32:38 +01:00
Dmitri Lebedev 16ee64f7de PERF: writing mutliple records at once to increase speed in GeoPackage (#605) 2017-11-20 21:25:43 +01:00
Edward Betts 74fa1368a3 Correct spelling mistakes. (#615) 2017-11-20 15:56:48 +01:00
Chris Holdgraf 1da8f6279c DOC: add sphinx gallery for examples (#463) 2017-11-19 23:54:05 +01:00
James McBride 3e26d22b05 TST: Test inplace transform on geodataframe (#593)
Simple test effectively replicating the test on a not-inplace transform.
2017-11-19 14:43:24 -08:00
robochat 18160efc16 BUG: retain index names of input frames to sjoin (#545)
* BUG: sjoin modifies original frame (#525)

Original pandas table's index names are no
longer changed by sjoin() call. Includes
some unit-tests. Fixes issue #525

* New code to fix issue that is compatible with pandas 0.16.2 - 0.20.3

* applied suggested changes to test_sjoin.py
2017-10-22 13:59:27 -07:00
Dani Arribas-Bel 87e7541daf Fix error on plot empty GeoDataFrame (#571) 2017-10-16 23:34:29 +02:00
James McBride cc1a0f535b CLN: Remove try/except for old GEOS bug (#576)
Handling for a bug discussed in
https://github.com/Toblerity/Shapely/issues/47#issuecomment-18506767
seems no likely necessary, given the issue was fixed 4 years ago.
2017-10-16 21:38:41 +02:00
James McBride 714d9a8ea2 TST: Warning for sjoin CRS mismatch, and test (#577) 2017-10-16 21:35:33 +02:00
James McBride 2e9c72b22e Add asv benchmark for to_crs (#578) 2017-10-10 14:49:02 +02:00
James McBride 173e6e4265 COMPAT: Remove deprecated usage if ix (#579)
As of 0.20.0, pandas .ix is deprecated. This switches all such instances
to the label based .loc indexer. (In searching for usage, I also noticed
the CHANGELOG contained an error in describing the introduction of the
.cx indexer.)
2017-10-09 09:14:30 +02:00
James McBride 6daedd6b99 TST: Add test of overlay with non-integer index (#580)
All current overlay tests have indices for which loc/iloc give the same
result. Since ix will be deprecated, add a test to distinguish behavior
between the two.
2017-10-09 09:13:37 +02:00
Chris Holdgraf f053d654ba DOC: update installation instructions in README (#548) 2017-10-01 11:24:53 +02:00