Kelsey Jordahl
40b32dbe5d
Merge pull request #70 from jwass/singlegeomfix
...
BUG: Fix GeoSeries constructor for multi geoms
2013-11-13 05:21:43 -08:00
Kelsey Jordahl
b1ced78b16
BUG: Put back crs arguments that my merge had overwritten
2013-11-12 23:09:58 -05:00
Kelsey Jordahl
159d69e1e0
TST: Explicitly use relative imports and clean up tests
2013-11-12 22:58:31 -05:00
Kelsey Jordahl
85365657d7
TST: Use local unittest for python 2.6 compatability in test_types
2013-11-12 22:56:18 -05:00
Kelsey Jordahl
2008b33074
Revert "TST: unittest2 didn't like skipIf"
...
This reverts commit e70ea78321749b8229fdfd1b359b050af1c25a34.
2013-11-12 22:56:18 -05:00
Kelsey Jordahl
eb4e198e81
TST: Use local unittest for python 2.6 compatability in test_geocode
2013-11-12 22:56:17 -05:00
Kelsey Jordahl
266f30f222
TST: unittest2 didn't like skipIf
2013-11-12 22:56:17 -05:00
Kelsey Jordahl
30576cf090
BUG: format statements need a position in python 2.6
2013-11-12 22:56:17 -05:00
Kelsey Jordahl
249380ee69
TST: Clean up tests with assertRaises context manager.
2013-11-12 22:56:17 -05:00
Kelsey Jordahl
17d933c04a
TST: Attempt to import unittest2 if running python 2.6
2013-11-12 22:56:17 -05:00
Jacob Wasserman
bb58ce7c35
TST: Test GeoSeries constructor with index
...
Make sure that when a single geometry is passed in and the index contains
multiple elements, the geometry is replicated in the GeoSeries.
As suggested by @jtratner in Issue #70 .
2013-11-12 22:17:44 -05:00
Jacob Wasserman
1cacbf5f70
BUG: Fix GeoSeries constructor for multi geoms
...
Because Multi* geometries are iterable, they get expanded when passed into
np.array(). Protect against this by passing in all base geometries as a
single element list. They will not be expanded into their individual
parts.
Switch on older versions of pandas when Series overrode __new__ instead
of __init__.
2013-11-12 22:17:33 -05:00
Jacob Wasserman
b557e44c3c
Fix tests to include crs when comparing GeoSeries
2013-11-11 19:21:13 -05:00
Jacob Wasserman
37377cf9ea
TST: Add check_crs flag to assert_geoseries_equal
2013-11-11 19:21:13 -05:00
Jeff Tratner
ec15621c1e
CLN: crs set order: passed in, passed Series, DataFrame.
2013-11-06 20:18:10 -05:00
Jeff Tratner
9a35c2e5c6
ENH: Add set_dataframe method to DataFrame
2013-11-05 22:55:25 -05:00
Jeff Tratner
c51add2456
Allow setting of crs in set_geometry
2013-11-05 22:37:11 -05:00
Jeff Tratner
799f6a2eb7
Only define name 'geometry' in one place
2013-11-05 22:34:41 -05:00
Jeff Tratner
6eb617b9dd
Changeup tests to reflect drop=False default
2013-11-05 22:28:03 -05:00
Jeff Tratner
b014e4f0ff
ENH: Allow more flexibility with geometries
2013-11-05 22:11:24 -05:00
Kelsey Jordahl
6c816f0fff
Merge pull request #59 from jtratner/skip-and-guard-geopy
...
TST/CLN: Guard geopy import and add skip tests if no geopy.
2013-11-05 18:44:42 -08:00
Kelsey Jordahl
b4f772d638
Merge pull request #58 from kjordahl/bug/cached_total_bounds
...
BUG: cached total_bounds don't reset if values are changed
2013-11-05 18:38:38 -08:00
Jeff Tratner
4b4d93f9a5
TST: Fix setattr issue with geometry property and more edge case tests
2013-11-05 07:08:39 -05:00
Jeff Tratner
b759222241
TST/CLN: Guard geopy import and add skip tests if no geopy.
2013-11-04 23:36:32 -05:00
Jeff Tratner
69aa0364e0
Add assert_geoseries_equal test util
2013-11-04 00:31:36 -05:00
Jeff Tratner
f96fd89557
TST: Move geom_equals and geom_almost_equals to tests/util and use them
2013-11-04 00:31:28 -05:00
Jeff Tratner
7df6db234f
ENH: Allow geometry property to be set.
...
* Allows for clearer errors when a GeoDataFrame is created but has no
geometry.
* TST: Add test util for comparing sequence (b/c assert_almost_equal seems
to not work with shapely.
2013-11-04 00:31:12 -05:00
Kelsey Jordahl
20b0d62056
TST: Test for total_bounds proprty if values in series change
2013-11-03 21:45:59 -05:00
Kelsey Jordahl
120828c6a0
Merge pull request #49 from kjordahl/feature/update_pandas_api
...
Update GeoPandas objects to new pandas API
2013-11-02 11:03:53 -07:00
Jacob Wasserman
0e671667b0
ENH: Introduce method to handle NaNs in to_json()
...
This adds an 'na' option specifying how NaN values should be handled in
GeoDataFrame's to_json(). The default is 'null' which outputs JSON null.
The other options are 'drop' which removes any missing property, and 'keep'
which will output them as NaN.
2013-11-01 12:58:47 -04:00
Kelsey Jordahl
b1dd61a569
TST: Skip groupby test in pandas 0.12; add fillna test asserts
2013-11-01 08:43:57 -04:00
Jacob Wasserman
72153f4c3b
Add omitna option to GeoDataFrame.to_json
...
When omitna is true, any properties that are NaN will not be written out.
This means that different features can have different numbers of properties,
which is okay for GeoJSON. Writing out NaN values is not valid JSON and causes
problems for some parsers.
2013-11-01 02:29:18 -04:00
Kelsey Jordahl
885cabdf79
TST: Enable groupby test
2013-10-30 23:21:19 -04:00
Kelsey Jordahl
0ff85f3f63
TST: fillna needs argument now, and takes method argument
2013-10-30 22:31:15 -04:00
Kelsey Jordahl
1b77106b0d
TST: re-enable skipped tests
2013-10-30 20:53:03 -04:00
Kelsey Jordahl
5ca153c582
Merge pull request #43 from kjordahl/feature/plot_testing
...
Plot testing
2013-10-30 06:21:18 -07:00
Kelsey Jordahl
cccf936d78
Merge pull request #47 from jwass/set_geometry
...
ENH: Add geometry property to GeoDataFrame
2013-10-30 05:31:32 -07:00
Jacob Wasserman
ae27e9775a
Skip the type tests for head and tail
...
Pandas commit c6d07a8 uses iloc for head and tail, which cause these
tests to fail. Skip them. The test for iloc is already being skipped.
2013-10-30 02:28:21 -04:00
Jacob Wasserman
43616470e7
ENH: Add geometry property to GeoDataFrame
...
Adds a geometry property and set_geometry() method to GeoDataFrame. This was
suggested in Issue #45 . The implementation mimics that of DataFrame's
set_index in that it returns a copy of the GeoDataFrame by default with the
new geometry. You can specify a column or give a list/ndarray of geometries.
2013-10-30 02:17:27 -04:00
Kelsey Jordahl
d52cfe05df
TST: Add baseline images
2013-10-29 19:35:02 -04:00
Kelsey Jordahl
152055a011
TST: Better aspect ratio for lines plot
2013-10-29 19:34:24 -04:00
Kelsey Jordahl
ee9a89d9ca
TST: Add tests for plotting points and lines
2013-10-29 19:31:41 -04:00
Kelsey Jordahl
78e9935458
TST: Refactor plot test to put repetitive code in helper methods
2013-10-29 19:17:29 -04:00
Kelsey Jordahl
197215cf9c
TST: Add baseline image for polygon plot image test
2013-10-28 22:55:31 -04:00
Kelsey Jordahl
e6b6e458c4
TST: Use compare_images rather than decorator and switch back to unittest.TestCase
2013-10-28 22:54:52 -04:00
Kelsey Jordahl
0873030813
TST: Use matplotlib image_comparison to actually compare plot output
2013-10-23 17:48:27 -04:00
Kelsey Jordahl
b2e7ec1e0a
TST: Initial simple plotting test
2013-10-23 08:57:50 -04:00
Kelsey Jordahl
c0d7b45b12
Merge pull request #37 from cfarmer/bounds
...
changing the way 'bounds' is implemented to match shapely
2013-10-21 19:55:46 -07:00
Jacob Wasserman
2b02fc3dff
Catch geocoding erros and fill with empty rows
...
Catch GeocoderResultError and ValueError. Fill the resulting GeoDataFrame
with an empty row.
2013-10-20 20:47:22 -04:00
Jacob Wasserman
01cea97dad
Change assertIn to assert_ for python 2.6 support
2013-10-20 19:27:50 -04:00