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
3062dc9638
TST: Tests for coordinate slices
2013-11-03 16:08:41 -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
Carson Farmer
4e5639f5a4
return to original bounds name and create total_bounds property
2013-10-18 16:32:52 -04:00
Jacob Wasserman
7c389a625f
Initial commit of geocoding functionality
...
Geocode a Series or list of strings and get back a GeoDataFrame with the
Point objects and a full geocoded address.
2013-10-16 00:31:03 -04:00
Carson Farmer
28b90bc6e8
changing the way 'bounds' is implemented to match shapely
2013-10-15 11:28:34 -04:00
Jacob Wasserman
4df3679546
Add tests for io functions.
...
Adds tests for the read_postgis methods. A tests/util.py is introduced
containing some of the common code for downloading the NYC boroughs file,
managing the existence of psycopg2, and connecting to a database.
2013-10-12 12:14:59 -04:00
Jacob Wasserman
c404f83d14
Rename read_postgis() to from_postgis()
2013-10-08 20:38:21 -04:00
Jacob Wasserman
97947b8957
Add documentation to explain database creation
2013-10-08 20:35:40 -04:00
Jacob Wasserman
11b46b15bc
Open database connection within a context manager
2013-10-08 20:35:27 -04:00
Jacob Wasserman
82232ac07b
Create the NYC borough database in setUp()
...
Also removes the nybb table creation in the travis script
2013-10-05 18:55:34 -04:00
Jacob Wasserman
bae2914136
Skip database tests if psycopg2 or db missing
...
Check if psycopg2 is installed. In setUp() check to see if we can connect
to the test_geopandas database. Skip the read_postgis tests if either
fails.
2013-10-05 16:34:07 -04:00
Jacob Wasserman
0a7508f111
Add testing for read_postgis function
...
It also installs postgis and creates a simple database filled with the borough
data. A new requirements.test.txt file is created so that not everybody
installing geopandas is required to install the packages for testing, psycopg2
in this case.
2013-10-05 02:39:33 -04:00
Kelsey Jordahl
266a70a610
TST: Test for transforming GeoDataFrame
2013-09-29 22:31:51 -05:00
Kelsey Jordahl
e92ce6d183
BUG: Fix copy method for GeoSeries and GeoDataFrame
2013-09-29 22:06:43 -05:00
Kelsey Jordahl
268fd2a974
TST: Check that we are prevented from writing mixed types to file
2013-09-29 21:27:18 -05:00
Kelsey Jordahl
8e147af6eb
TST: Assertions for expected exceptions
2013-09-28 11:50:11 -04:00
Kelsey Jordahl
d30dd24b45
TST: Explicit skips of not yet implemented tests
2013-09-28 11:41:21 -04:00
Kelsey Jordahl
f573b541c2
TST: add missing assertions
2013-09-28 11:37:58 -04:00
Kelsey Jordahl
27d6ce4d98
TST: Use unittest assertion methods
2013-09-28 11:36:38 -04:00
Kelsey Jordahl
e47c3bd9ca
TST: Add tests for 'not in' GeoSeries
2013-09-28 11:34:06 -04:00
Kelsey Jordahl
5c51dea584
TST: Add a test for GeoSeries to/from file
2013-09-28 11:33:31 -04:00
Kelsey Jordahl
7fd9d756ac
CLN: Remove useless test
2013-09-27 13:45:40 +02:00
Kelsey Jordahl
9db47e8f7a
Merge pull request #29 from cfarmer/transform
...
Adds various transformation functions - shift, rotate, scale, skew
2013-09-08 19:57:20 -07:00
Carson Farmer
fd58437ea3
adds various transformation functions - shift, rotate, scale, skew, and a few other minor adjustments/fixes
2013-09-08 21:33:25 -04:00
Kelsey Jordahl
4eccd048a3
TST: Add a type test to test_area to make sure it returns a Series.
2013-09-06 18:29:02 -04:00
Kelsey Jordahl
c770a5cc42
Merge pull request #24 from kjordahl/bug/df-init-crs
...
BUG: crs was ignored in creation of GeoDataFrame
2013-08-22 20:44:44 -07:00
Jake Wasserman
f544fd846f
Add type tests for slicing/fancy indexing.
...
Add one check to output type of fancy index test
2013-08-22 22:57:27 -04:00