I have an irregularly shaped polygon, and I want to create a 'ring' of fixed width around the polygon. Basically I need a polygon vector which surrounds the given polygon.

Polygons are like this, and have no fixed shape

I am reading in the polygons from an ESRI shapefile. There are >500 features (all polygons) in the shapefile. I need a ring around each of them to do some computation on a raster file.

How can I create the ring in python?

closed as off-topic by PolyGeo Sep 28 '17 at 22:49

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • So you just want a buffer around each feature? Just making sure I understand your question correctly. Either way you will want to make sure to begin with that the shapefile is using the projection that supports the units you need (i.e., UTM for meters, etc). Also are you doing this with an ArcGIS license (arcpy) or open-source? – auslander Sep 28 '17 at 18:03
  • Yes, correct. I need a buffer around each feature. The shapefile is using UTM, and the required buffer size is in meters. I am using open source (OGR, shapely). – RRC Sep 28 '17 at 18:07
  • 1
    I have not done this with open source yet but there is a good example here: toblerity.org/shapely/manual.html#object.buffer – auslander Sep 28 '17 at 18:40
  • Thank you for pointing me in the right direction - I was missing the keyword "buffer" while searching. I got my answer of how to create a buffer using open source as well! Thanks :) – RRC Sep 28 '17 at 18:45

Browse other questions tagged or ask your own question.