Re:Earth Flow — ETL geoespacial con DAG (motor Rust)
Repo: https://github.com/reearth/reearth-flow · Rust ~9.8 MB + Go + TypeScript · Apache-2.0/MIT · activo (push diario). El README público dice poco ("WIP") — el conocimiento real está en docs/architecture.md y engine/. Verificado leyendo el código fuente el 2026-09-02.
Qué es (real)
Monorepo de una plataforma web de workflows ETL geoespaciales, inspirada en FME:
engine/ — motor de ejecución de DAGs en Rust: 167 acciones (source/transform/sink) definidas en engine/schema/actions.json.
server/ — backend Go con API GraphQL, MongoDB, colaboración en tiempo real.
ui/ — frontend React/TypeScript con editor visual de flujos (ReactFlow + sincronización Yjs vía WebSocket).
Flujo end-to-end: UI diseña el workflow (YAML/JSON validado contra engine/schema/workflow.json) → mutation GraphQL lo persiste en MongoDB → Server lo envía a Google Cloud Batch → el Engine ejecuta el DAG y escribe resultados en GCS/S3 → logs y eventos van a Google Pub/Sub → Subscriber los vuelca a MongoDB/Redis → GraphQL subscriptions los retransmiten a la UI → visualización en Cesium.
El motor: acciones y workflows
167 acciones en categorías claras (fuente: engine/schema/actions.json, con i18n en actions_{es,fr,ja,zh}.json):
- Lectura/escritura: CSV, JSON, GeoJSON, GeoPackage, Shapefile, CityGML 2/3, OBJ, CZML, Excel, MVT Writer, Cesium 3D Tiles Writer, SQL Reader, HTTP Caller
- Geometría: Bufferer, Clipper, Dissolver, Convex Hull, CSG Builder/Evaluator, Extruder, Offsetter, Reprojectors (horizontal / coordinate frame), Geometry Validator/Splitter/Coercer, Grid Divider, Neighbor Finder, Ray Intersector
- Atributos/features: Attribute Manager/Mapper/Flattener/Aggregator, Feature Filter/Joiner/Merger/Sorter/Counter, Spatial Filter, Statistics Calculator
- Serie PLATEAU (
PLATEAU3/4/6.*): validadores y extractores para Project PLATEAU de Japón — UDXFolderExtractor, MissingAttributeDetector, UnmatchedXlinkDetector, SolarPositionCalculator, FloodAreaSurfaceGenerator... → es el reference implementation de pipelines de validación CityGML; adaptable a otros catálogos 3D urbanos.
- Scripting embebido:
Python Script Processor (Python 3.11+) y action-wasm-processor (WASM) para lógica custom dentro del DAG.
Formato de workflow (YAML, required: [id, name, entryGraphId, graphs], opcional with y errorPolicy):
# yaml-language-server: $schema=https://raw.githubusercontent.com/reearth/reearth-flow/main/engine/schema/workflow.json
id: 00caad2a-9f7d-4189-b479-153fa9ea36dc
name: "SimpleWorkflow"
entryGraphId: 3e3450c8-2344-4728-afa9-5fdb81eec33a
graphs:
- id: 3e3450c8-2344-4728-afa9-5fdb81eec33a
name: entry_point
nodes:
- id: 90f40a3e-...
name: Feature Creator
type: action
action: Feature Creator # debe existir en actions.json
with:
creator: |
[ { "testAttribute": "test01" } ]
Los nodos se conectan por puertos tipo FME (sources → processors → sinks). Expresiones inline con #{...} dentro de with.
Uso del CLI (modo standalone, sin server)
cd engine && cargo build --release --bin reearth-flow
# dependencias: Rust stable + libxml2 (Windows: vcpkg install libxml2:x64-windows;
# Linux: libxml2-dev + pkg-config) — sin ellas el build falla con errores de gdal-bindings/xml
./target/release/reearth-flow run --workflow ruta/al/workflow.yaml # "-" = stdin
./target/release/reearth-flow dot --workflow f.yaml # grafo del DAG en GraphViz
./target/release/reearth-flow doc-action # documentación de las 167 acciones
./target/release/reearth-flow schema-workflow # JSON Schema de workflows
./target/release/reearth-flow view # feature-viewer (visord) de resultados
run auto-escala Rayon a min(1.2×n_cpus, 64) threads. Observabilidad nativa OpenTelemetry (logger::setup_logging_and_tracing → var de entorno OTel estándar).
Cuándo usar Re:Earth Flow (vs alternativas)
| Necesidad |
Elección |
| Pipeline GIS reproducible con transformación CityGML/3D Tiles, open-source, self-host |
reearth-flow |
| Solo conversión GTFS→NeTEx / feeds estáticos |
netex-es-conversion, gtfs-tidy |
| Visualización 3D de ciudades en web |
cesium-3d-tiles-vector-data + output Cesium 3D Tiles Writer de Flow |
| Datos PLATEAU Japón 3D city MCP |
plateau-3d-city-mcp (usa outputs compatibles) |
| ETL general no-geoespacial |
FME (comercial) o dbt — Flow es GIS-first |
Patrón trasladable a proyectos de David (DataHub España / España Atlas): DAG YAML declarativo + schema JSON validado + catálogo de acciones con i18n + sink 3D Tiles para visualización Cesium. El Area On Area Overlayer, Attribute Aggregator y Spatial Filter cubren gran parte de lo que hoy se hace a mano con geopandas en los dashboards.
Pitfalls
- El README del repo es un cascarón — NO juzgar el proyecto por él; la doc real vive en
docs/architecture.md, engine/README.md y engine/AGENTS.md.
- Monorepo: el motor NO compila sin libxml2/pkg-config (en Windows vía vcpkg, paso manual obligatorio).
server/ acopla MongoDB + GCP Batch + Pub/Sub: para uso local, usar solo el CLI del engine y workflows YAML.
- Orden de arranque de servicios: MongoDB → Server API → WebSocket → UI (la API debe estar antes que el WebSocket por auth).
- Variables de entorno con prefijos:
FLOW_* (app), REEARTH_* (plataforma), GOOGLE_* (credenciales).
- Los nombres de acciones llevan espacios (
"Feature Creator") — en YAML irrompibles; validar contra actions.json, no adivinar.
Verificación
curl -s https://raw.githubusercontent.com/reearth/reearth-flow/main/engine/schema/actions.json \
| python -c "import json,sys; print(len(json.load(sys.stdin)['actions']),'acciones')"
# → 167 acciones (2026-09-02)
Referencias
- Repo: https://github.com/reearth/reearth-flow · Docs:
docs/architecture.md, CHANGELOG.md (394 KB — histórico vivo del proyecto)
- Esquemas:
engine/schema/{workflow,actions,feature-intermediate,error-codes}.json
- Ejemplos de workflows de test:
engine/testing/workflow-tests/
- Origen del motor: fork evolucionado de
flowy-gis/flowy (Rust)
1---2name: reearth-flow3description: Reearth Flow — plataforma ETL geoespacial web (motor Rust DAG + servidor Go GraphQL + UI ReactFlow) con 167 acciones tipo FME para CityGML/3D Tiles/GeoJSON.4---56# Re:Earth Flow — ETL geoespacial con DAG (motor Rust)78> **Repo:** https://github.com/reearth/reearth-flow · Rust ~9.8 MB + Go + TypeScript · Apache-2.0/MIT · activo (push diario). El README público dice poco ("WIP") — el conocimiento real está en `docs/architecture.md` y `engine/`. Verificado leyendo el código fuente el 2026-09-02.910## Qué es (real)1112Monorepo de una plataforma web de workflows ETL geoespaciales, inspirada en FME:1314- **`engine/`** — motor de ejecución de DAGs en **Rust**: 167 acciones (source/transform/sink) definidas en `engine/schema/actions.json`.15- **`server/`** — backend **Go** con API GraphQL, MongoDB, colaboración en tiempo real.16- **`ui/`** — frontend **React/TypeScript** con editor visual de flujos (ReactFlow + sincronización Yjs vía WebSocket).1718**Flujo end-to-end:** UI diseña el workflow (YAML/JSON validado contra `engine/schema/workflow.json`) → mutation GraphQL lo persiste en MongoDB → Server lo envía a Google Cloud Batch → el Engine ejecuta el DAG y escribe resultados en GCS/S3 → logs y eventos van a Google Pub/Sub → Subscriber los vuelca a MongoDB/Redis → GraphQL subscriptions los retransmiten a la UI → visualización en Cesium.1920## El motor: acciones y workflows2122**167 acciones** en categorías claras (fuente: `engine/schema/actions.json`, con i18n en `actions_{es,fr,ja,zh}.json`):2324- **Lectura/escritura:** CSV, JSON, GeoJSON, GeoPackage, Shapefile, CityGML 2/3, OBJ, CZML, Excel, MVT Writer, **Cesium 3D Tiles Writer**, SQL Reader, HTTP Caller25- **Geometría:** Bufferer, Clipper, Dissolver, Convex Hull, CSG Builder/Evaluator, Extruder, Offsetter, Reprojectors (horizontal / coordinate frame), Geometry Validator/Splitter/Coercer, Grid Divider, Neighbor Finder, Ray Intersector26- **Atributos/features:** Attribute Manager/Mapper/Flattener/Aggregator, Feature Filter/Joiner/Merger/Sorter/Counter, Spatial Filter, Statistics Calculator27- **Serie PLATEAU (`PLATEAU3/4/6.*`):** validadores y extractores para Project PLATEAU de Japón — UDXFolderExtractor, MissingAttributeDetector, UnmatchedXlinkDetector, SolarPositionCalculator, FloodAreaSurfaceGenerator... → es **el reference implementation de pipelines de validación CityGML**; adaptable a otros catálogos 3D urbanos.28- **Scripting embebido:** `Python Script Processor` (Python 3.11+) y `action-wasm-processor` (WASM) para lógica custom dentro del DAG.2930**Formato de workflow** (YAML, `required: [id, name, entryGraphId, graphs]`, opcional `with` y `errorPolicy`):3132```yaml33# yaml-language-server: $schema=https://raw.githubusercontent.com/reearth/reearth-flow/main/engine/schema/workflow.json34id: 00caad2a-9f7d-4189-b479-153fa9ea36dc35name: "SimpleWorkflow"36entryGraphId: 3e3450c8-2344-4728-afa9-5fdb81eec33a37graphs:38 - id: 3e3450c8-2344-4728-afa9-5fdb81eec33a39 name: entry_point40 nodes:41 - id: 90f40a3e-...42 name: Feature Creator43 type: action44 action: Feature Creator # debe existir en actions.json45 with:46 creator: |47 [ { "testAttribute": "test01" } ]48```4950Los nodos se conectan por puertos tipo FME (sources → processors → sinks). Expresiones inline con `#{...}` dentro de `with`.5152## Uso del CLI (modo standalone, sin server)5354```bash55cd engine && cargo build --release --bin reearth-flow56# dependencias: Rust stable + libxml2 (Windows: vcpkg install libxml2:x64-windows;57# Linux: libxml2-dev + pkg-config) — sin ellas el build falla con errores de gdal-bindings/xml58./target/release/reearth-flow run --workflow ruta/al/workflow.yaml # "-" = stdin59./target/release/reearth-flow dot --workflow f.yaml # grafo del DAG en GraphViz60./target/release/reearth-flow doc-action # documentación de las 167 acciones61./target/release/reearth-flow schema-workflow # JSON Schema de workflows62./target/release/reearth-flow view # feature-viewer (visord) de resultados63```6465`run` auto-escala Rayon a `min(1.2×n_cpus, 64)` threads. Observabilidad nativa OpenTelemetry (`logger::setup_logging_and_tracing` → var de entorno OTel estándar).6667## Cuándo usar Re:Earth Flow (vs alternativas)6869| Necesidad | Elección |70|---|---|71| Pipeline GIS reproducible con transformación CityGML/3D Tiles, open-source, self-host | **reearth-flow** |72| Solo conversión GTFS→NeTEx / feeds estáticos | `netex-es-conversion`, `gtfs-tidy` |73| Visualización 3D de ciudades en web | `cesium-3d-tiles-vector-data` + output `Cesium 3D Tiles Writer` de Flow |74| Datos PLATEAU Japón 3D city MCP | `plateau-3d-city-mcp` (usa outputs compatibles) |75| ETL general no-geoespacial | FME (comercial) o dbt — Flow es GIS-first |7677**Patrón trasladable a proyectos de David (DataHub España / España Atlas):** DAG YAML declarativo + schema JSON validado + catálogo de acciones con i18n + sink 3D Tiles para visualización Cesium. El `Area On Area Overlayer`, `Attribute Aggregator` y `Spatial Filter` cubren gran parte de lo que hoy se hace a mano con geopandas en los dashboards.7879## Pitfalls8081- **El README del repo es un cascarón** — NO juzgar el proyecto por él; la doc real vive en `docs/architecture.md`, `engine/README.md` y `engine/AGENTS.md`.82- Monorepo: el motor NO compila sin libxml2/pkg-config (en Windows vía vcpkg, paso manual obligatorio).83- `server/` acopla MongoDB + GCP Batch + Pub/Sub: para uso local, usar solo el CLI del engine y workflows YAML.84- Orden de arranque de servicios: MongoDB → Server API → WebSocket → UI (la API debe estar antes que el WebSocket por auth).85- Variables de entorno con prefijos: `FLOW_*` (app), `REEARTH_*` (plataforma), `GOOGLE_*` (credenciales).86- Los nombres de acciones llevan espacios (`"Feature Creator"`) — en YAML irrompibles; validar contra `actions.json`, no adivinar.8788## Verificación8990```bash91curl -s https://raw.githubusercontent.com/reearth/reearth-flow/main/engine/schema/actions.json \92 | python -c "import json,sys; print(len(json.load(sys.stdin)['actions']),'acciones')"93# → 167 acciones (2026-09-02)94```9596## Referencias9798- Repo: https://github.com/reearth/reearth-flow · Docs: `docs/architecture.md`, `CHANGELOG.md` (394 KB — histórico vivo del proyecto)99- Esquemas: `engine/schema/{workflow,actions,feature-intermediate,error-codes}.json`100- Ejemplos de workflows de test: `engine/testing/workflow-tests/`101- Origen del motor: fork evolucionado de `flowy-gis/flowy` (Rust)