From 3fbdcc1d69ded53aa40e18b6de03cfe5e7978e2a Mon Sep 17 00:00:00 2001 From: Kelsey Jordahl Date: Wed, 17 Jul 2013 04:35:55 +0200 Subject: [PATCH] Preserve crs through geometric operations --- geopandas/geoseries.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/geopandas/geoseries.py b/geopandas/geoseries.py index 001a5c2..06bd147 100644 --- a/geopandas/geoseries.py +++ b/geopandas/geoseries.py @@ -67,10 +67,10 @@ class GeoSeries(Series): if isinstance(other, GeoSeries): this, other = self.align(other) return GeoSeries([getattr(s[0], op)(s[1]) for s in zip(this, other)], - index=this.index) + index=this.index, crs=self.crs) else: return GeoSeries([getattr(s, op)(other) for s in self], - index=self.index) + index=self.index, crs=self.crs) # TODO: think about merging with _geo_op def _series_op(self, other, op): @@ -90,7 +90,7 @@ class GeoSeries(Series): Unary operation that returns a GeoSeries """ return GeoSeries([getattr(geom, op) for geom in self], - index=self.index) + index=self.index, crs=self.crs) def _series_unary_op(self, op): """