def shape(self):
"""
Returns a string indicating the feature type. If the feature type is not
a Point, Polygon, or Multipolygon, returns 'Other'.
"""
if isinstance(self.geom, Point):
if self.has_buffer():
return 'Circle'
else:
return 'Point'
elif isinstance(self.geom, Polygon):
if shapes.is_rectangle(self.geom.exterior_ring):
return 'Rectangle'
else:
return 'Polygon'
elif isinstance(self.geom, MultiPolygon):
return 'MultiPolygon'
else:
return 'Other'
评论列表
文章目录