From: Jess
Date: Friday, April 23, 2010, 3:13 PM
I'm a first-year student in a GIS class working on a bike project in
San Francisco, and wanted to see if you could lend some insight. I
thought it would be interesting to do a suitability analysis of the
slopes in SF and compare them to the existing SF bike plan. I've
gotten some data off the SF GOV website, including the contour & roads
data (in polylines), but I'm not quite sure where to begin. I'm having
trouble thinking about what to do with the contour polylines, and how
to get them in a form that could work with spatial analyst. I'd
appreciate it if you could lend any insight. Thanks!
Hi Jess
Could you expand on what you mean by suitability analysis?
Here's how I used the contour polylines file to get slopes for my
planner.
1. Generate graph of vertices/edges representing connections between
street intersections in SF. (vertices are lat/lon pairs, edges are
tuples of 'start vert, end vert, edge name, path type, slope' where
edge name is like "DIVISADERO ST", path type is 'BIKE LANE' or whatev,
and slope is initially 0.0)
2. Put all the vertices into a elevation_dict (associative array,
lookup table, whatever). keys = (lat,lon), values = elevation of
(lat,lon) point (initially all values are 0.0)
3. Go through the contour polylines file and for each vertex in the
dict from step 2, find the closest point in contour polylines and set
elevation_dict[vertex] = elevation of closest contour polylines point.
4. Go through all edges in graph from #1 and fill in slope, using
slope = (elevation_dict[end_vert] - elevation_dict[start_vert]) /
distance between end_vert and start_vert
Now you have slope between all intersections in SF.
From there you could proceed to check whether slope of a bike path
edge is greater that slope of an adjacent non bike path edge, if
that's the kind of thing you're interested in doing.
I did all this in python but you could probably use whatever
language. I can point you to relevant python files in the code repo
if you like.
There are other GIS experts on this list who can maybe help more if
you describe what you wanna do in GIS terms.
Let me know if you have more questions...
Amar
--
You received this message because you are subscribed to the Google Groups "sf-bike-planner" group.
To post to this group, send email to
sf-bike...@googlegroups.com.
To unsubscribe from this group, send email to
sf-bike-plann...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sf-bike-planner?hl=en.