urban-morphology
БесплатноБез исполняемых скриптовНе проверенBuild projected-CRS urban morphology graphs from building footprints and movement segments, including barrier-aware tessellation, place/movement composition…
от lza6★ 19 звёзд на GitHubОб этом скилле
Urban morphology
Use this skill when the task is to turn building footprints and street-like LineString segments into a place/movement urban morphology graph, or when the task needs one of its three typed relation layers independently. The runtime API is GeoDataFrame-first and can return NetworkX only as a compatibility output. It does not require a notebook, Overture download, live service, or source checkout at execution time.
Read the bundled reference that matches the next decision:
references/input-contracts.md— required geometry, ID, CRS, barrier, and output contracts.references/workflows.md— end-to-end, pairwise, and multi-distance recipes.references/troubleshooting.md— validation failures, empty/degraded tessellations, distance surprises, and barrier diagnostics.
Operating surface
| Need | Entry point | What it returns |
|---|---|---|
| Complete morphology | city2graph.morphology.morphological_graph |
(nodes, edges) dictionaries, or a deprecated-compatible NetworkX graph |
| Several network budgets | morphological_graphs |
{float_distance: (nodes, edges)} or {float_distance: nx.Graph} |
| Place adjacency | place_to_place_graph |
place nodes and touched_to edges |
| Place/street interface | place_to_movement_graph |
combined nodes and faced_to edges |
| Street-segment connectivity | movement_to_movement_graph |
movement nodes and connected_to edges |
| Explicit segment topology | segments_to_graph |
endpoint nodes and segment edges |
| Standalone tessellation | city2graph.utils.create_tessellation |
polygon cells with tess_id; enclosed cells also have enclosure_index |
Prefer GeoDataFrame output. For downstream graph conversion, pass the returned
nodes/edges to the package's graph-conversion API rather than relying on the
deprecated as_nx argument.
Fast routing rules
- Have buildings and segments, and need all three relation types? Call
morphological_graph(buildings_gdf, segments_gdf, ...). - Need multiple radii from one center? Call
morphological_graphswith a non-empty list/tuple of distances. It computes the movement graph and one reachability field once and reuses the largest-distance tessellation context. - Already have tessellation cells? Use the pairwise functions. Ensure
cells have
place_idand movement rows havemovement_idbefore callingplace_to_movement_graphorplace_to_place_graph. - Need a movement topology only? Use
segments_to_graphfor endpoint topology, ormovement_to_movement_graphfor the dual graph whose nodes are segments. - Need barriers that are not traversable movement? Supply a boolean
non_movement_barrier_col; supplyprimary_barrier_colseparately when a row's alternative geometry should be used as the tessellation/facing geometry. These switches are orthogonal. - Need NetworkX? Prefer the package conversion function after inspecting
GeoDataFrame output.
as_nx=Trueremains available but is deprecated; anyduplicate_edges=True, as_nx=Truecombination is invalid.
End-to-end procedure
1. Normalize spatial inputs
- Load building
Polygon/MultiPolygonfootprints and movementLineStringsegments into GeoDataFrames. - Reproject every layer and the center point to one suitable projected CRS before any metric distance, centroid, buffer, or tessellation operation. Coordinates in EPSG:4326 are degrees, not meters. The morphology pipeline harmonizes the active segment CRS to the building CRS, but do not rely on that implicit conversion for the center or for an auxiliary barrier column.
- Ensure segment endpoints that are intended to connect are coordinate-equal;
segments_to_graphdeduplicates exact endpoint coordinate tuples, not fuzzy near-matches. - If segments were reprojected after an auxiliary
barrier_geometrycolumn was made, keep that column geometry-aware or rebuild it. The implementation reprojects a CRS-tagged alternative barrier column to the active segment CRS; a CRS-less geometry column adopts the segment CRS.
2. Build the morphology graph
from city2graph.morphology import morphological_graph
nodes, edges = morphological_graph(
buildings_gdf=buildings,
segments_gdf=segments,
center_point=center, # optional Point/one-row GeoSeries/GeoDataFrame
distance=500.0, # optional network budget in projected units
clipping_buffer=300.0, # tessellation context beyond the budget
extent_buffer=100.0, # independent street-access cap
primary_barrier_col="barrier_geometry",
contiguity="queen",
keep_buildings=True,
keep_segments=True,
tolerance=1e-6,
include_unenclosed_buildings=False,
tessellation_fallback=False,
tessellation_n_jobs=1,
)
The pipeline validates and CRS-aligns inputs, assigns movement_id from the
segment index on an owned copy, optionally splits barrier-only rows, bui
Установить urban-morphology в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл urban-morphology?
Build projected-CRS urban morphology graphs from building footprints and movement segments, including barrier-aware tessellation, place/movement composition, network-distance filters, fallbacks, and multi-distance outputs.
Как установить скилл urban-morphology?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл urban-morphology запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic