### Start OpenTripPlanner Routing Engine Source: https://digitransit.fi/palvelu Launches the routing engine container with HSL data. ```bash docker run -d --rm -p 9080:8080 -e ROUTER_NAME=hsl -e JAVA_OPTS=-Xmx4g -e ROUTER_DATA_CONTAINER_URL=https://api.digitransit.fi/routing-data/v2/hsl hsldevcom/opentripplanner:prod ``` -------------------------------- ### Example GeoJSON Data Structure Source: https://digitransit.fi/liity/reittiopas This is an example of the GeoJSON data structure used to define points of interest. Ensure all field names are in lowercase. The 'popup' field supports HTML for rich content display. ```json { "type": "FeatureCollection", "features": [ { "type": "Feature", "id": "1", "geometry": { "type": "Point", "coordinates": [ 21.26673, 61.44984 ] }, "properties": { "category": "SERVICE_POINT", "name": "Nimi", "name_fi": "Nimi", "name_sv": "Namn", "name_en": "Name", "popup": "
Nimi<\/span>
Katu 1<\/div> <\/div>", "text": " Nimi\nKatu 1, 00100", "city": "Kaupunki", "city_fi": "Kaupunki", "city_sv": "Stad", "address": "Katu 1", "address_fi": "Katu 1", "address_sv": "Gata 1", "icon": { "id": "icon_service_point", "svg": "" } } }, ] } ``` -------------------------------- ### Start Digitransit UI Source: https://digitransit.fi/palvelu Launches the user interface container configured to use local routing and geocoding services. ```bash docker run -d --rm -p 8080:8080 -e OTP_URL=http://localhost:9080/otp/ -e CONFIG=hsl -e GEOCODING_BASE_URL=localhost:3100/v1 hsldevcom/digitransit-ui ``` -------------------------------- ### Start Pelias Data Container Source: https://digitransit.fi/palvelu Initializes the data container required for the geocoding service. ```bash docker run -d --rm --name pelias-data-container hsldevcom/pelias-data-container ``` -------------------------------- ### Start Pelias Geocoding API Source: https://digitransit.fi/palvelu Launches the geocoding API service linked to the data container. ```bash docker run -d --rm --name pelias-api -p 3100:8080 --link pelias-data-container:pelias-data-container hsldevcom/pelias-api ``` -------------------------------- ### Required Response Headers Source: https://digitransit.fi/liity/reittiopas To ensure the journey planner can utilize the data, the service providing the data must include the 'Access-Control-Allow-Origin' header set to allow the journey planner, and 'Content-Type' must be 'application/json'. ```http Access-Control-Allow-Origin: * Content-Type: application/json ``` -------------------------------- ### GeoJSON for Fare Zone Visualization Source: https://digitransit.fi/liity/reittiopas This GeoJSON defines linestring geometries for fare zone boundaries, used for visualizing zone lines on the map. It includes styling properties for the lines. ```json { "type" : "FeatureCollection", "name" : "Vyöhykkeet", "features" : [ { "type" : "Feature", "styles": [ { "color": "#666", "weight": 2, "opacity": 1 }, { "color": "#333", "weight": 12, "opacity": 0.2 } ], "geometry" : { "type" : "MultiLineString", "coordinates" : [ [ [ 21.80091, 63.09565 ],[ 21.80074, 63.1031 ], [ 21.8004, 63.10618 ] ], [ [ 21.81437, 63.11153 ],[ 21.66672, 63.13274 ], [ 21.66158, 63.1356 ], [ 21.66272, 63.13675 ] ], [ [ 21.66158, 63.1356 ], [ 21.66272, 63.13675 ] ] ] } } ] } ``` -------------------------------- ### Define OpenStreetMap POI with Swedish Label Source: https://digitransit.fi/liity/reittiopas Use this JSON structure when adding or updating POI data in OpenStreetMap to ensure proper localization. ```json { "id":26430225, "type":"node", "lat":60.2070123, "lon":24.7022998, "tags":{ "name":"Koivuhovi", "name:sv":"Björkgård", "railway":"station" } } ``` -------------------------------- ### Defining Icons in GeoJSON Source: https://digitransit.fi/liity/reittiopas The SVG graphic for an icon should be included once in the data. Subsequent points should reference the icon by its 'id'. ```json "icon": { "id": "service-point", "svg": "" } ``` ```json "icon": { "id": "service-point" } ``` -------------------------------- ### Emissions.txt Format for CO2 Data Source: https://digitransit.fi/liity/reittiopas This CSV format is used to provide average CO2 emissions per vehicle per kilometer and average passenger count for routes. It is not part of the GTFS standard but must be included in the GTFS package. ```csv route_id,avg_co2_per_vehicle_per_km,avg_passenger_count 1001,123,20 1002,123.4,20.0 1003,0,0 ``` -------------------------------- ### GeoJSON for Fare Zone Icons and Labels Source: https://digitransit.fi/liity/reittiopas This GeoJSON feature defines a point for a fare zone, including its ID and an SVG representation for a map icon. It specifies the geometry type as MultiPoint and provides coordinates. ```json { "type": "Feature", "properties": { "id": "icon-zone-f", "svg": " " } }, "geometry": { "type": "MultiPoint", "coordinates": [ [26.8068, 63.2194], [26.4574,62.97] ] } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.