Commit Graph
64 Commits
Author SHA1 Message Date
Matthew Perry 66ac9b973d optionally include bbox in geojson, fixes #131 2014-07-15 11:13:15 -07:00
Kelsey Jordahl 3b7afba679 Merge pull request #116 from geopandas/geo_interface
Geo interface
2014-07-13 17:52:30 -05:00
Matthew Perry f2f94c0d27 preliminary geo interface for geodataframes 2014-07-11 14:34:31 -05:00
Kelsey Jordahl d57e9b1010 TST: Update the tests to use SQLalchemy for new pandas and DB API for older pandas versions 2014-07-10 23:08:41 -05:00
Kelsey Jordahl 1be30a86ab TST BUG: Don't hard-wire list of borough names 2014-05-06 12:08:13 -04:00
Kelsey Jordahl c74d537245 BUG: Update to version 14 NYC sample data since v13 is no longer available 2014-05-06 11:58:35 -04:00
Kelsey Jordahl cf2d13c5cc TST: Test for bad na argument to to_json() 2014-04-21 18:34:07 -04:00
Kelsey Jordahl bddfa20bce TST: Skip PostGIS tests for recent pandas master due to SQL API change (GH#98) 2014-04-21 07:40:01 -04:00
Kelsey Jordahl 10722da48e PY3: Use explicit relative imports in tests 2014-04-15 18:12:09 -04:00
Kelsey Jordahl f2867118dc PY3: Use explicit list in test 2014-04-15 17:57:26 -04:00
Jacob Wasserman 02cab384bd BUG: Fix from_features to align properties
This fixes a longstanding bug starting in read_file() that was migrated to
GeoDataFrame.from_features() which wouldn't align features with their
associated rows.
2014-03-26 23:47:12 -04:00
Kelsey Jordahl 11a6992e67 Merge pull request #94 from kjordahl/bug/no-long-type
Always use 'int' in Fiona schema
2014-03-26 20:27:26 -04:00
Kelsey Jordahl f443cc7d78 TEST: Test that checks various numpy int types as columns when writing to file 2014-03-25 22:23:24 -04:00
Jacob Wasserman 04dfaf9a10 BUG: Align index if set_geometry input is Series
If DataFrame's set_geometry() is called with a Series, align
the index.
2014-03-24 00:46:10 -04:00
Jacob Wasserman f0108b922b BUG: Use _geometry_column_name in to_json()
Fixes a bug in to_json() when the geometry column is not named
'geometry'.
2014-03-01 11:45:19 -05:00
Jacob Wasserman 47f25eea93 BUG: Set crs in read_file
Fixes a bug introduced in 72f236.
2014-01-22 11:35:57 -05:00
Jacob Wasserman 72f236d3df Add from_features constructor for GeoDataFrame.
Allows passing a list of features or objects that implement
__geo_interface__ for easier GeoDataFrame construction.
2014-01-17 10:54:20 -05:00
Jacob Wasserman 0f1debae99 Rename equals methods to geom_equals
Renames on GeoPandasBase:
* equals() -> geom_equals()
* almost_equals() -> geom_almost_equals()
* equals_exact() -> geom_equals_exact()
2013-12-27 11:17:46 -05:00
Kelsey Jordahl e45bc1d098 TST: Clean up the rebase and use assertRaises context manager in test 2013-11-18 22:34:33 -06:00
Carson Farmer a19e12ce99 fix typo in test name 2013-11-18 22:31:20 -06:00
Carson Farmer a99b759ba4 fix typo in test name 2013-11-18 22:31:20 -06:00
Carson Farmer bb4b7f68db BUG: Check that set_geometry will set valid geometry column 2013-11-18 22:31:20 -06:00
Jeff Tratner f33d8859a7 TST: Add a few test cases for changing geometries 2013-11-14 06:52:32 -05: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 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 b557e44c3c Fix tests to include crs when comparing GeoSeries 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
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 69aa0364e0 Add assert_geoseries_equal test util 2013-11-04 00:31:36 -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
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
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
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
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