Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

data-ingestion

БесплатноБез исполняемых скриптовНе проверен

Use city2graph Overture Maps acquisition, boundary resolution, clipping, output control, and segment preprocessing safely.

lza6от lza6★ 19 звёзд на GitHub

Об этом скилле

Overture data ingestion

Use this sub-skill when a workflow needs to resolve a place or area, acquire a selected Overture Maps layer, save or return GeoJSON, clip an Overture query, or prepare Overture transportation segments for graph or morphology work. The public entry points are city2graph.data.get_boundaries, city2graph.data.load_overture_data, and city2graph.data.process_overture_segments.

This route teaches the city2graph 1.0.0 data surface. It is deliberately separate from morphology and graph-conversion routes: it gets spatial inputs into trustworthy GeoDataFrames and makes segment geometry usable, but it does not construct the final graph.

Route here when

  • The input is an Overture bounding box, polygon, GeoSeries, GeoDataFrame, or a place name to be geocoded with Nominatim.
  • You need the Overture CLI download options, release selection, STAC behavior, timeout flags, file naming, return semantics, or clipping behavior.
  • You need to split Overture segments at connector positions, cluster nearby segment endpoints, calculate lengths, or derive passable geometries from level_rules.
  • You need a safe, offline-verifiable acquisition plan rather than an agent silently making a live download.

Route elsewhere / do not claim

  • Build the morphology or heterogeneous graph after ingestion: use the morphology or graph-conversion sub-skills.
  • Use Overture schema internals, raw Parquet/STAC implementation details, or undocumented CLI features as if they were city2graph contracts.
  • Treat live Overture, AWS, or Nominatim access as a required verification step. Network access is an explicit runtime prerequisite and is not needed for the local preprocessing verification described here.
  • Treat barrier_geometry as a literal barrier line. It is the passable remainder of the source segment after level-rule intervals are removed.

Operating contract

Public signatures

The installed package exposes these signatures:

from city2graph.data import (
    get_boundaries,
    load_overture_data,
    process_overture_segments,
)

get_boundaries(place_name: str, user_agent: str = "city2graph")

load_overture_data(
    area=None,
    place_name=None,
    types=None,
    output_dir=".",
    prefix="",
    save_to_file=True,
    return_data=True,
    release=None,
    connect_timeout=None,
    request_timeout=None,
    use_stac=True,
    **kwargs,
)

process_overture_segments(
    segments_gdf,
    get_barriers=True,
    connectors_gdf=None,
    threshold=1.0,
)

load_overture_data returns a dictionary keyed by requested type only when return_data=True; with return_data=False its public result is {} even when files are written successfully. process_overture_segments returns a GeoDataFrame, while get_boundaries returns a one-row boundary GeoDataFrame.

Required area/place choice

load_overture_data requires exactly one of area and place_name:

  • both omitted: ValueError("Exactly one of 'area' or 'place_name' must be provided");
  • both supplied: the same ValueError;
  • area supplied: use it directly after area normalization;
  • place_name supplied: resolve it with get_boundaries, then use the first returned geometry.

Do not pass a place name and a fallback area together. If a caller wants a stable, reviewable boundary, resolve the name once, inspect or persist the returned polygon, and use that polygon for a subsequent run.

Area forms and CRS

Accepted area forms are:

  • a four-value bounding box [min_lon, min_lat, max_lon, max_lat], in WGS84;
  • a Shapely Polygon or MultiPolygon, assumed to be in WGS84;
  • a GeoSeries or GeoDataFrame; the first geometry is used, and a CRS other than WGS84 is reprojected to EPSG:4326 before the query.

A polygon or multipolygon becomes both a bounding-box query and a precise clipping geometry. A four-value list becomes only a bounding-box query. For a GeoSeries/GeoDataFrame with no CRS, the code does not invent one; assign the correct CRS before calling it. The Overture query box is formatted as minx,miny,maxx,maxy, with polygon bounds rounded to ten decimal places.

WGS84_CRS is the module constant "EPSG:4326". Overture download coordinates are geographic, but segment length and endpoint thresholds should normally be computed after reprojecting the returned layers to a suitable projected CRS.

Resolve a place boundary

get_boundaries("Liverpool, UK") calls Nominatim with:

Nominatim(user_agent="city2graph").geocode(
    place_name,
    geometry="geojson",
    exactly_one=False,
)

It examines all returned locations and chooses the first result whose raw GeoJSON geometry is Polygon or MultiPolygon; it does not blindly accept the first geocoder result. The result is a WGS84 GeoDataFrame with one place_name property. It raises ValueError when no result exists or no polygon boundary is present; for a street address or point-only result, try a mo

Полный SKILL.md на GitHub

Установить data-ingestion в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/overture-workflows.mdreferences/troubleshooting.md

FAQ

Что делает скилл data-ingestion?

Use city2graph Overture Maps acquisition, boundary resolution, clipping, output control, and segment preprocessing safely.

Как установить скилл data-ingestion?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл data-ingestion запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить data-ingestion с