The Weight of Anticipation
Navigation systems optimize for distance or travel time. Yet pedestrians sometimes choose to follow a palace wall, pass through a narrow alley, or walk along a street where there are people to watch. If the conditions that make a route appealing can be quantified, they can also become part of route calculation.
This project converts foot traffic, cultural trails, street enclosure, and place character into link-level costs across Jongno’s road network. By adjusting the strength of each factor, it compares the shortest-distance route with a preference-weighted route.
Weighted Route-Finding Architecture
Urban data is preprocessed in QGIS and stored in a single GeoPackage. Grasshopper separates it into visual context, a road network, and source layers for four spatial factors.

This was my first project to use Python extensively within Grasshopper. GeoPandas and Shapely handle spatial relationships, NumPy processes the factor scores, and NetworkX solves the routes. The Grasshopper definition separates data input and preprocessing, factor calculation, network construction, route search, and visualization.
Each factor component returns a cost score aligned to the same road-link order. Lower scores indicate preferred links. This shared input–output contract also allows a factor component to be replaced or a new spatial condition to be connected to the system.
A Proof of Concept in Jongno
The proof of concept uses Jongno, where palaces, alleys, and boulevards sit within a compact urban fabric. National base-map road links and nodes, integrated GIS building data, and public datasets from the Seoul Open Data Plaza were prepared in QGIS and assembled into a GeoPackage.
Shared Source Data from GeoPackage
Extract Nodes & Links rounds the node coordinates, consolidates duplicates, and stores each link’s endpoints, geometry, physical length, and lane count in network_data. The resulting lnk_idx becomes the shared key used to identify the same link across subsequent components.


The left image shows the urban context of the study area. The right image shows the same area converted into nodes and links. In the route images that follow, blue marks the route that minimizes the sum of physical link lengths, while red marks the route that minimizes the selected preference-weighted cost.
The First Weight: Foot Traffic
Commercial-area boundaries and street-level foot-traffic data from Seoul’s Commercial District Analysis Service are mapped onto the road links. Users can select total foot traffic or a gender- and age-specific field, then choose whether to prefer busier streets or avoid crowds.
When a link intersects multiple commercial areas, the component uses the largest foot-traffic value. The normalized score is reversed according to the user’s preference while preserving a common output convention: lower values indicate preferred links.




The route images show how different factor-strength settings change the selected links.
The Second Weight: Seoul’s Cultural Trails
The cultural-trail dataset from Seoul’s DoDreamWay service is mapped onto the road network. A 2 m buffer is applied to the road links and a 3 m buffer to the cultural-trail geometry, absorbing positional discrepancies between the two source datasets.
Links that overlap a cultural trail receive a cost score of 0; all other links receive 1. The geometric link length remains unchanged. Links outside the cultural-trail network receive the relative penalty, and multiple intersections are recorded as a single match.




Applying the cultural-trail factor moves the route away from Jongno’s boulevards and toward the cultural paths around Jongmyo Shrine, Changdeokgung, Gyeongbokgung, and Gyeonghuigung.
Building Influence Zones
Calculating street enclosure and transferring POI values to the road network both require a definition of which buildings are adjacent to each link. Since this relationship is absent from the source data, it is generated by intersecting road-link buffers with Voronoi cells derived from resampled building perimeters.
Using only building centroids would discard their scale and perimeter geometry. The building outlines are therefore resampled at intervals no greater than 5 m, with each point retaining the ID of its source building. A Point Voronoi diagram is then generated from these samples. Each road link receives an estimated width based on its lane count, with an additional 1 m margin.
The resulting near_buildings structure maps each link to the IDs and heights of its adjacent buildings. Because nearby Voronoi cells occupy the space around a road, this method provides a closer approximation of directly facing buildings than a fixed-radius search.


The Third Weight: Street Enclosure
Street enclosure is calculated from the ratio of road width D to the average height H of adjacent buildings. Road width is estimated as lane count × 3 m, while building height is estimated as floor count × 3.5 m. Links without adjacent buildings use the ratio cap of 5.
In Ahn Aram’s study using simulated street images, participants rated a D:H ratio of 1:0.7 as the most comfortable. They associated 1:1 with stability, 1:0.3 with emptiness, and 1:3 with strong enclosure. Under the code’s D/H convention, the preferred proportion is approximately 1.43. The default preference curve is therefore centered at 1.5, with σ=0.6 set as the project’s spread parameter. Since the Gaussian value peaks at the preferred proportion, the component returns 1-g(r) as the cost score.
Ahn, Aram, “A Study on the Physical Spatial Elements of Streets: Based on Pedestrian Responses to Street-Space Characteristics,” Master’s thesis, Seoul National University, 2016
Preferences for enclosure vary between users. Under the additional settings, the normalized ratio is passed to Grasshopper’s Graph Mapper, allowing the user to draw a custom cost curve. The default Gaussian curve and the user-defined curve share the same output convention.




The Fourth Weight: Place Character
Place character converts the types and counts of selected POIs into road-link costs. The selected codes are grouped into elements of street vitality, destinations, and pedestrian barriers.
Each POI is assigned to its containing building through a within spatial join. The building-level counts are then propagated to road links through near_buildings. Vitality and destination categories reduce the relative cost, while pedestrian barriers increase it. The strength of each category can be adjusted independently. These categories are design interpretations applied to the public dataset.
Combining Factors and Solving Routes
The four components return cost arrays with the same link order and length. Users can adjust each factor independently, while the aggregator’s overall sensitivity α controls their combined influence on the route.
The aggregator first verifies that the input arrays have equal lengths, then normalizes and combines their scores for each link. Network Builder multiplies the resulting cost multiplier by the physical link length. Path Finder snaps the origin and destination to their nearest nodes and runs Dijkstra’s algorithm twice over the same graph.



All four factors—foot traffic, cultural trails, street enclosure, and place character—are active in these three results. Different factor strengths and overall-sensitivity settings produce different routes between the same origin and destination.
Validation Scope and Next Steps
The current result is a proof of concept using static data from Jongno. It confirms that the four spatial factors can be converted into link-level costs and that their settings produce different routes. The resulting route preferences have not yet been evaluated with pedestrian participants. The current model also treats every road link as walkable and represents the network as an undirected graph.
The first priority is user evaluation. Observed route choices and pedestrian responses are needed to calibrate the default cost functions and their useful ranges. The second is a pedestrian-specific network and repeatable preprocessing pipeline. Distinguishing non-walkable links and reducing the manual QGIS workflow are necessary to apply the same calculations reliably in other areas.
Once this foundation is in place, reviews, images, and descriptions of a place could be interpreted with an LLM and translated into an additional factor representing the atmosphere of a street.