Select to view content in your preferred language

Polyline Square Buffers

2364
5
10-16-2012 12:42 PM
JamesMitchell
Deactivated User
Hello,

I am hoping someone can help me.

I would like to be able to create square buffers along polylines i.e. a polygon any width but with ends that are at right angles to the end of the polylines.

It would be great if anyone can help or provide a code they have already developed.

Many thanks for any help.
Tags (2)
0 Kudos
5 Replies
T__WayneWhitley
Honored Contributor
I believe the Buffer tool will already generate this?
Just specifiy you want 'square' not rounded ends.  Did I understand correctly?


Yes, just checked the tool...you can specify for End Type:  FLAT
(however, the help file states you must have ArcInfo)
0 Kudos
JamesMitchell
Deactivated User
Hello,

Thank you for the reponse.

Unfortunately i do not have ArcInfo so this option is not available.
0 Kudos
MarcinGasior
Frequent Contributor
You can try Flat-end line buffer tool add-in.
Its limitation is that an output is line feature class.
0 Kudos
JamesMitchell
Deactivated User
Thank you.

I could possibly use this if there is a way of using this within a python script and if there is a way to convert polylines to polygons in python.

I am trying to select points or polygons that are parallel to a polyline using python. I thought that a square buffer would be ideal however if anyone has any other ideas it will be greatly appreciated.
0 Kudos
T__WayneWhitley
Honored Contributor
Well, you can convert polylines to polygons and vice versa w/ Python, though last I checked geom methods don't apply to building true curves.  So, aside from handling true curves (maybe your fc doesn't have true curves anyway), then you can read the points making up your lines and, for each poly feature you want to create, load a point array object.  Use the array of point objects to load into a poly geometry object.

A pretty good general overview is here:
http://resources.arcgis.com/en/help/main/10.1/index.html#//002z0000001v000000


A 'better' Code Sample (at the bottom of the page) actually creating a polygon shapefile from a list of coord pairs is here:
http://resources.arcgis.com/en/help/main/10.1/index.html#//018z00000061000000

[Note:  The description summary is in error, stating "Create a polyline feature class from scratch."  - should state 'polygon', not 'polyline'.]
0 Kudos