BikeHireDockingStation (GeoJSON)
This example demonstrates how to transform a GeoJSON file containing Milan’s bike docking stations with geographic coordinates into FIWARE-compliant NGSI-LD entities.
Source Data
The source data follows the standard GeoJSON FeatureCollection format with Point geometries. Each feature has properties such as:
-
ID — Unique identifier
-
BIKE_SH — Station name/identifier
-
INDIRIZZO — Street address
-
ANNO — Installation year
-
STALLI — Number of bike stalls
-
LOCALIZ — Location type
Mapping Configuration
Geometry Handling
Access properties via properties.field_name and geometry via geometry. Preserve GeoJSON Point geometry directly:
location: {
source: "{{ geometry }}",
type: "GeoProperty",
transformation: "geometry",
}
Date Construction
Build a complete datetime from a year field:
dateCreated: {
source: "{{ properties.ANNO }}-01-01T00:00:00Z",
type: "Property",
transformation: "datetime",
}
Nested Address
address: {
type: "Property",
transformation: "object",
mappings: {
streetAddress: {
source: "{{ properties.INDIRIZZO }}",
type: "Property",
transformation: "string",
},
addressLocality: { source: "Milano", type: "Property", transformation: "string" },
addressCountry: { source: "IT", type: "Property", transformation: "string" },
},
}