Appendix

(to be available on the Internet, not in the journal)

 

Annotated Instructions for Creation of Polygon Buffers

 

Filename Conventions

 

All file names begin with the prefix CITY.  Since the Light Rail Case Study involved examination of nine cities, CITY was replaced with an abbreviation (maximum of 4 letters) for each particular city.  However, the commands will work perfectly well without modification if your service areas are being created for only one geographical extent.

 

Filenames

 

Coverages:

CITY_lrs: Light rail stations.  Derived from a shapefile using shapearc.

CITY_sts: Street network.  Derived from a shapefile using shapearc.

 

Grids:

CITY_sts_g: 50 foot grid with positive numeric values for all street cells and zero values for all non-street cells.  Derived from CITY_sts using linegrid.

CITY_source: Also knows as the Source Grid.  This grid has positive numeric values for all light rail station cells and nodata values for all other cells.  Derived from CITY_lrs using pointgrid.

CITY_mult: Grid with positive values for all station cells that are also street cells, zero values for all station cells that are not street cells and nodata values for all other cells.  Derived by multiplying CITY_sts_g and CITY_source together.

CITY_check: Grid with positive values for all station cells that are also street cells, zero values for all station cells that are not street cells and nodata values for all other cells.  Derived by running a con() command on CITY_mult.

CITY_cost: Also known as the Network Impedance Grid.  This grid has an impedance value for all street cells (use ‘1’ for distance based buffers) and an arbitrarily high value for all for all other cells.  Derived by running a con() command on city_sts_g

CITY_dist: Also known as the Raw Travel Cost Grid.  This grid contains the distance to the nearest station for all network cells and exaggerated values for all off-network cells.

CITY_alloc: Also known as the Allocation to Source Node grid.  This grid contains the number of the nearest station for all cells.

CITY_dist_nd: Grid with the distance to the nearest station for all network cells and nodata for all off-network cells.

CITY_dist_int: Grid with the integer distance to the nearest station for all street cells.

CITY_flatgrid: Also known as the Off-Network Impedance Grid.  This is a grid with the same value in every cell.  For distance based service areas, the value should be ‘1’, for service areas based on travel time, the value should be equivalent to the impedance assigned to network cells.  Derived by running a con() command on CITY_sts_g.

CITY_2rd_dist: Grid with the distance to the nearest street cell in all cells.

CITY_rd_dist: Grid with the distance from the nearest road cell to the nearest station for all cells.

CITY_sumdist: grid with the total distance between each cell and the nearest station cell.

CITY_mask: Grid with a value of 1 for all cells within a network distance of 2651 feet of a station cell and a value of zero for all other cells.

CITY_finaloc: Grid with the number of the nearest station for all cells.

CITY_fin_buff: Grid with the number of the nearest station for all cells within 2651 feet of a station and a value of zero for all other cells.

 

Font Conventions

 

All text in fixed width typewriter style font is a literal rendition of ArcInfo commands.  Text in variable width font represents general instructions.  Text in bold italics is general commentary, explaining the broad strokes of the algorithim and giving the reasoning behind each step.  Text in regular italics is commentary on each particular command, explaining what that command does.

 

Step 1: Initialization

 

In ArcView or other GIS Software

Ensure that the projection has units measured in feet.

If the street network is composed of different files, merge them together into a single unit.

Clip the street network to eliminate extraneous area.  The time required for the cost distance command varies according to the size of the grid, so try to clip just beyond the maximum radius of the service areas.

Edit the street network to ensure that all source nodes lie on the network.

Save.

 

In ArcInfo

Arc: &workspace  [type directory]

Arc: &stat 9999

 

The shapefiles containing the street network and source node locations must be converted to ArcInfo coverages.

 

Arc: shapearc [station shp name] CITY_lrs]

Creates a coverage of the light rail stations.

**Arc: shapearc [street shp name]  CITY_sts

Creates a coverage of the streets.

 

Now these coverages must be converted to grids.

 

Arc: linegrid CITY_sts CITY_sts_g

Cell Size: 50

Convert the Entire Coverage (Y/N): Y

Background Value: ZERO

Creates a 50 foot grid with positive numeric values for all street cells and zero values for all non-street cells.

 

Arc: grid

 

Grid: setcell 50

Sets the cell size to 50 so the pointgrid will match the linegrid.

Grid: CITY_source = pointgrid(CITY_lrs,  CITY_lrs#) 

Creates a 50 foot grid with positive numeric values for all light rail station cells and nodata values for all other cells.

 

A grid containing the proper off-network impedance for all cells will be required later.  For this example, the service area will be distance bounded, so the off-network impedance should be the same as the network impedance.

 

Grid: CITY_flatgrid = con(CITY_sts_g gt –1, 1, 1)

Creates a grid of all 1’s.

 

The costdistance() command requires that all source nodes must lie on the network.  The following steps will ensure that all source nodes do.

 

Grid: CITY_mult = CITY_source * CITY_sts_g

Creates a grid with positive values for all station cells that are also street cells, zero values for all station cells that are not street cells and nodata values for all other cells.

Grid: CITY_check = con(CITY_mult gt 0, 1, 0)

Converts the CITY_mult grid so that all station cells that are on the network have a value of one and all station cells that are not on the network are zero.  Nodata cells remain nodata.

Check in ArcView using Spatial Analyst Extension

            Add CITY_check theme (grid data source)

            Check theme table

If there are any cells with a value of 0, some stations are not on the network

            If some stations are 0, quit Grid command (i.e. Arc: q)

Arc: gridpoint CITY_check CITY_check_p check

            Option: change color to find exact stations

            For those stations, DRAW line from station to a street (save edits)

            Go back to  ** and redo the checklist

 

In order for the costdistance() command to produce the correct results, the street network data must have the proper impedance values for all network cells and very high values for all off-network cells.  For the purposes of this example, a distance bounded service area is being created, so all network cells will have an impedance value of ‘1’ and off-network cells will have an value of 100,000.

 

Grid: CITY_cost = con(CITY_sts_g gt 0, 1, 100000)

Converts CITY_sts_g to a format suitable for using as a cost file in for the costdistance command.  Creates a grid with ‘1’ values for all street cells and ‘100000’ values for all other cells.

 

Step 2: Calculate the Lowest Network Travel Cost

 

Grid: CITY_dist = costdistance(CITY_source, CITY_cost, #, CITY_alloc)

Finds the distance from each cell to the nearest station.  The CITY_dist output is a grid with the distance to the nearest station for all network cells and exaggerated values for all off-network cells.  The CITY_alloc output is a grid with the number of the nearest station for all cells.  Note that this command can be exceedingly time consuming, especially with large grids.

 

Step 3: Create a New Set of Source Cells Consisting of All Network Cells.

 

In Step 4, the costdistance() command will be run again to calculate the distance from each off-network cell to the nearest network cell.  Doing this will require transforming the CITY_dist grid into a form suitable for use as a source grid for costdistance.

 

Grid: CITY_dist_nd = con(CITY_dist gt 10000, setnull(0 gt 1), CITY_dist)

Reclassifies all of the off-network cells (which have very high values thanks to the artificially high off network impedance) as no data and leaves the values of all network cells the same.  The cut off point should be greater than the maximum radius of the service area and less than half the off-network impedance used to make the CITY_cost grid.  In this example a value of 10000 is chosen because it is higher than the maximum service area radius (2651) but less than half the artificial off-network impedance (50000).

Grid: CITY_dist_int = int(CITY_dist_nd)

Converts the values in the CITY_dist file to integers so they can be used as sources in a costdistance calculation.

 

Step 4: Calculate the Off-Network Travel Costs

 

Grid: CITY_2rd_dist = costdistance( CITY_dist_int, CITY_flatgrid, #, CITY_rd_dist)

Finds the distance from every non-street cell to the closest street cell.  The CITY_2rd_dist output is a grid with the distance to the nearest street cell in all cells.  The CITY_rd_dist output is a grid with the distance from the nearest road cell to the nearest station for all cells.  As with the first costdistance command, this can take quite a while to run.

 

Step 5: Calculate the Total Travel Cost

 

Grid: CITY_sumdist = CITY_2rd_dist + CITY_rd_dist

Creates a grid with the total distance between each cell and the nearest station cell.

 

Step 6: Trim and Reclassify the Total Travel Cost Grid

 

 

Grid: CITY_mask = reclass(CITY_sumdist, remap, nodata)

Ensure that there’s a copy of remap file in the directory for the city {file called remap}; if not there, copy same file from other city

The remap file should reclassify all distances between 0 and the desired service area radius as 1.  All other cells will be classed as nodata.

 

Step 7: Create Final Buffers

 

Grid: CITY_fin_buff = CITY_mask * CITY_alloc

Creates a grid with the number of the nearest station for all cells within 2651 feet of a station and a value of nodata for all other cells.

 

 

TO CLEAN UP HOLES IN GRID:

 

The resulting grid may have rather ragged edges.  The following set of commands will smooth the service area boundaries and convert the service areas into polygons.

 

Grid: CITY_cleaned = boundaryclean(CITY_fin_buff)

Grid: CITY_polygon = gridpoly(CITY_cleaned)

Grid: q

 

TO DELETE HANGING CHADS

 

While the boundaryclean() command should smooth out the edges of the service areas, there still may be some ‘hanging chads,’ small one grid cell polygons that are hanging off the edge of the service area.  The following commands will locate and delete these extraneous polygons.

 

Arc: ae

Arcedit: ec CITY_polygon

Arcedit: ef poly

Arcedit: de poly

Arcedit: draw

Arcedit: sel all

Arcedit: sel area = 2500

            If selection area is 0, skip final steps, just q

The value used to select should be the area of a single grid cell.  In this case, the cells are 50x50, so the area is 2500.

Arcedit: delete

Arcedit: save

Arcedit: q

 

If the analysis of the service area polygons is to be performed in some software other than ArcInfo, the following commands are required to make the coverage accessible to ArcInfo.

 

Arc: build CITY_polygon

Arc: export CITY_polygon

 

Open the coverage in ArcView and convert it to a shapefile.

 

TO MANUALLY REMOVE DONUT HOLES:

 

Because of the nature of ArcInfo coverages, any ‘donut holes’ within a service area will actually be represented as separate polygons.  These polygons are generally undesirable when conducting analysis of the service areas.  To get rid of them, delete all polygons which have a Grid Code attribute of –9999.