I have a shapefile containing streets that have to be counted.
But these streets in each case consist of several polylines.
Maybe I should buffer these polylines and union the generated polygons that have the same name as well as they overlap.
Is there a tool or do I have to write a VBA script or something?
Best Answer
You don't need to worry about buffers or Polygons.
I think the tool you are looking for is called "Dissolve" in the Data Management/Generalization Toolbox. You have to decide whether to use the parameter DISSOLVE_LINE or UNSPLIT_LINES - the latter will only create a single line for contiguous features - i.e. lines that share an endpoint.
Dissolve and its usage, in Arcpy, is thus:
Dissolve Data Management
It effectively aggregates your geographies on specified attributes i.e. in your case, it's name.
I should add that it is very simple to use, either as a standalone script, or as a command in the python window in 10.
EDIT: You might want to have a look at the answer here if you're prepared to use another software package. From what you've told us it looks like arc may not be the best tool to work with your particular dataset.