No need to use a geoseries

This commit is contained in:
Matthew Perry
2014-07-21 09:30:30 -07:00
parent 7a52349382
commit 99e44fc0b4
2 changed files with 1 additions and 5 deletions
-5
View File
@@ -166,11 +166,6 @@ def overlay(df1, df2, how, use_sindex=True):
# Create a geoseries and add it to the collection
out_series['geometry'] = newpoly
# FIXME is there a more idomatic way to append a geometry to a Series
# and get a GeoSeries back?
out_series.__class__ = GeoSeries
out_series._geometry_column_name = 'geometry'
collection.append(out_series)
# Return geodataframe with new indicies
+1
View File
@@ -38,6 +38,7 @@ class TestDataFrame(unittest.TestCase):
def test_union(self):
df = overlay(self.polydf, self.polydf2, how="union")
self.assertTrue(type(df) is GeoDataFrame)
self.assertEquals(df.shape, self.union_shape)
self.assertTrue('value1' in df.columns and 'Shape_Area' in df.columns)