HERE Workspace for Java and Scala Developers (3)

Developer Tutorials

A set of tutorials to explain the key concepts in OLP and to illustrate how to build Pipeline applications.

In short, focused tutorials, you can learn how to set up your environment, create catalogs, read from them, run batch and streaming pipelines and how to work with HERE Map Content.

Available: In documentation
Complexity: Basic

Code Examples

Java and Scala examples, that demonstrate typical use cases for the HERE Workspace – a part of HERE platform. HERE Workspace is an environment to enrich, transform and deploy location-centric data.

Available: GitHub
Complexity: Basic

Code Examples for China

Examples are contained in the repo, accessible to OLP China Subscribers. Find your credentials at https://repo.platform.hereolp.cn/artifactory/open-location-platform/com/here/platform/
Click 'Generate Credentials,’ your username and password are inside the settings.xml file.

Complexity: Basic

Data Processing and Pipelines (10)

Catalog Notification

Demonstrates how to setup and subscribe to Catalog Notifications. When catolog data changes or when changes occur in a catalog's layer, OLP sends a notification message to your stream layer.

Available: Sign in to Repo
Complexity: Medium

Stream SDII Read/Write

This working sample Java project is an introduction to Open Location Platform's Stream Pipeline service.

What you will learn:

  • how to setup inputs and outputs using the Portal
  • how to build source code
  • how to deploy application jar file using the OLP CLI
  • how to create OLP access tokens
  • how to send messages to your inputs via OLP Ingestion
  • how to verify your pipeline application is running
  • how to view pipeline application outputs and log messages

This example is in the repo, accessible to OLP Subscribers. Find your credentials at https://platform.here.com/profile/repository. Click 'Generate Credentials,’ your username and password are inside the settings.xml file.

Available: Sign in to Repo
Complexity: Basic

Chain Compilation Pipelines

This is a sample Scala project that demonstrates how to chain compilation pipelines together in a single job. There is an example RefTreeCompiler that provides data for the Direct1ToNCompiler following it.

This example is in the repo, accessible to OLP Subscribers. Find your credentials at https://platform.here.com/profile/repository. Click 'Generate Credentials,’ your username and password are inside the settings.xml file.

Available: Sign in to Repo
Complexity: Medium

Event Counter

This example is an introduction to Layers and Pipelines on the Open Location Platform. Users will learn how to work Stream and Volatile layers, and how to ingest data.

This example is in the repo, accessible to OLP Subscribers. Find your credentials at https://platform.here.com/profile/repository. Click 'Generate Credentials,’ your username and password are inside the settings.xml file.

Available: Sign in to Repo
Complexity: Medium

Flink SDII Map Match

This stream pipeline reads sensor data (SDII messages) from a streaming layer, map matches using path map-matching then writes to a volatile layer.

This example is in the repo, accessible to OLP Subscribers. Find your credentials at https://platform.here.com/profile/repository. Click 'Generate Credentials,’ your username and password are inside the settings.xml file.

Available: Sign in to Repo
Complexity: Medium

HERE Weather Pipeline Example

Learn how to create catalogs and layers, access weather data from HERE Archived, Live, and Forecasted Weather Catalogs and cross reference it with SDII drive data ingested through a stream layer. Learn to search for weather forecasts for an anticipated path of a driver. Write resulting information to a volatile layer.

This Java code example demonstrates several tasks typical of pipeline development including:

  • Creating, reading and writing catalog data,
  • Formatting partitions,
  • Data processing via Flink.

This example is in the repo, accessible to OLP Subscribers. Find your credentials at https://platform.here.com/profile/repository. Click 'Generate Credentials,’ your username and password are inside the settings.xml file.

Available: Sign in to Repo
Complexity: Medium

HERE Map Content - Product Compatibility

This example demonstrates the use Region and Database Version Number (DVN) to map OLP Segment IDs and non-OLP Link IDs.

Note: This example uses premium catalog content.

CS0This example shows how to use:

The following topics are covered:

  • Visualizing Road Segments and Links using a custom schema.

Available: Sign in to Repo
Complexity: Advanced

Non-Incremental Compiler

Demonstrate use of a non-incremental compiler with path map-matching and visualizing data using geo-json. The pipeline will read all SDII Messages stored in Sample SDII Messages catalog (catalog has 10 partitions), map-match every message and create geo-json output with GPS and map-matched points.

This example shows how to use:

The following topics are covered:

  • Data Processing Library's (DPL) Non-Incremental Compiler Pattern
  • Path Map Matching
  • Visualize using GeoJson
Available: Sign in to Repo
Complexity: Advanced

Automotive Sensor Pipeline

Learn about a complete sensor processing application. From ingestion of SDII data, archival of SDII data, query of sensor data, streaming process of sensor data, batch process of sensor data, MapContent filtering and finally to sensor learning/map fusion.

Learn how to

  • Collect stream SDII messages into an archived catalog
  • Search and retrieve archived data
  • Create a scheduled batch pipeline
  • Cluster events
  • Evaluate the HERE Map Content catalog to narrow a coverage area
  • Use map matching
  • Use the Data Processing Library (DPL) RefTree and Direct1ToN compiler patterns.

Find your credentials at https://platform.here.com/profile/repository. Click 'Generate Credentials,’ your username and password are inside the settings.xml file.

Available: Sign in to Repo
Complexity: Advanced

DPL DeltaSets Example

This example demonstrates how to retrieve attributes from the HERE Map Content catalog via catalog layer association and segment traversal without the use of HERE location libraries properties maps. What You Will Learn:

  • How to use Data Processing Library's DeltaSets.
  • How to fetch data from the HERE Map Content catalog.
  • How to fetch & process traffic sign attributes on a segment (Advanced Navigation Attributes layer).
Available: Sign in to Repo
Complexity: Medium

Data (8)

HERE Custom Schema Example

Learn how to create, publish and render custom-schema in Open Location Platform. Demonstrates protobuf creation to represent Stadiums in Germany, Java & Scala maven dependency generation, schema usage in layer of catalog, usage of schema in other modules and visualization of data in inspect tab.

What you will learn:

  • How to create custom schema project
  • How to package the proto
  • How to deploy the schema
  • How to verify that schema is deployed in OLP
  • How to use the schema for a catalog
  • How to visualize the data in catalog
  • How can you use this schema in other projects
  • How to deploy and test the renderer plugin locally

This example does not use any of the existing catalogs, it demonstrates creation of layer in catalog which utilizes custom schema.

This example is in the repo, accessible to OLP Subscribers. Find your credentials at https://platform.here.com/profile/repository. Click 'Generate Credentials,’ your username and password are inside the settings.xml file.

Available: Sign in to Repo
Complexity: Basic

HERE Live and Archived Weather Quick Start

Learn how to use the HERE Live Weather catalog in your applications. ThIs Java code example demonstrates how to access real-time and archived weather content, based on coordinates or input from SDII drive messages. This example is in the repo, accessible to OLP Subscribers. Find your credentials at https://platform.here.com/profile/repository. Click 'Generate Credentials,’ your username and password are inside the settings.xml file.

Available: Sign in to Repo
Complexity: Basic

HERE Real-Time Traffic Quick Start

Learn how to use the HERE Real-Time Traffic catalog in your applications. These Java code examples demonstrate the counting of traffic incidents in a map tile, as well as comparing real-time traffic to historical trends for road segments with a map tile. This example is in the repo, accessible to OLP Subscribers. Find your credentials at https://platform.here.com/profile/repository. Click 'Generate Credentials,’ your username and password are inside the settings.xml file.

Available: Sign in to Repo
Complexity: Basic

HD Live Map Attribute Retriever

This example teaches you how to fetch data from the HDLM catalog and find out which HD Live Map (HDLM) catalog version is compatible with latest HERE Map Content (HMC) catalog. You will also learn how to extract all topology segments for a tile from HMC layer "topology-geometry" and find all corresponding lanes geometries contained in layer "lane-geometry-polyline" in HDLM catalog. Additionally this example will show how to convert lane geometry information into GeoJson format and publish it in OLP so it can be visualized under the Data's Inspect tab.

Available: Sign in to Repo
Complexity: Medium

HERE Map Content Attribution Retrieval

This example demonstrates how to retrieve attributes from the HERE Map Content catalog via catalog layer association and segment traversal without the use of HERE location libraries properties maps.

What You Will Learn:

  • How to fetch data from the HERE Map Content catalog.
  • How to process attributes on a segment.
  • How to fetch ADAS attributes.
  • How to fetch Speed Limit attributes (Road Attributes, Navigation Attributes, & Advanced Navigation Attributes layers).
  • How to fetch Street Names (Address Attributes & Street Names layers).
  • How to fetch Traffic Sign attributes (Advanced Navigation Attributes layer).
  • How to associate Places for HERE Essential Map and HERE Places layers with their associated metadata layer.
  • How to associate street address with Places.
  • How to associate 3D Buildings and Building Footprints layers with their associated metadata layer.
  • How to associate the Cartography layer with its associated metadata layer.
Available: Sign in to Repo
Complexity: Medium

HERE Map Content Statistics

This working sample is an introduction to HERE Map Content. This example is in the repo, accessible to OLP Subscribers. Find your credentials at https://platform.here.com/profile/repository. Click 'Generate Credentials,’ your username and password are inside the settings.xml file.

  • How to collect attribute statistics across HERE Map Content catalog layers.
  • How to compile attribute statistics across HERE Map Content catalog layers.
  • How to collect and compile statistics across country borders.
Available: Sign in to Repo
Complexity: Medium

HERE Custom Schema - Range Attribution

This example demonstrates how to create, publish and use a custom schema for storing results of range-attribution(offset) calculations.

This example shows how to use:

The following topics are covered:

  • How to create, package and deploy custom schema
  • How to create a catalog layer with custom schema
  • How to create custom schema partition and publish data
  • How to calculate range attribution using location libraries
Available: Sign in to Repo
Complexity: Advanced

Range-Based Attributes

Retrieve range-based attributes using location libraries.

Note: This example uses premium catalog content.

This example shows how to use:

The following topics are covered:

  • How to use Location Libraries
  • How to read Slope measurements from ADAS layer
Available: Sign in to Repo
Complexity: Medium

Inspect Data (2)

Renderer Plugin for Visual Data Inspection

A collection of renderer plugin examples for transforming platform data to GeoJSON for visual inspection in the Data Inspector in the portal.

Available: In documentation
Complexity: Basic

Customized Data Inspection with Data Inspector Library or with Leaflet

A collection of examples showing customization of Data Inspector, creation of a server-side token provider and inspection of platform data layers in Leaflet.

Available: In documentation
Complexity: Basic

Other (3)

HERE Tile Resolver Examples

This example demonstrates how to use various methods in the HereTileResolver class that is part of both the Java & Scala Location Library APIs.
What You Will Learn

  • How to use HereTileResolver class in the Java Location Library API.
  • How to use HereTileResolver class in the Scala Location Library API
Available: Sign in to Repo
Complexity: Basic

Data Client Library

This module contains Data Client Library examples written in Java for catalog and layer creation. Demonstrates basic read and write operations on metadata and blob data for stream, versioned, volatile and index layer types. Find your credentials at https://platform.here.com/profile/repository. Click 'Generate Credentials,’ your username and password are inside the settings.xml file.

Available: Sign in to Repo
Complexity: Medium

CS Example Bundle

Several OLP Customer Solutions (CS) examples bundled together in one convenient ZIP file.

Note: Some of the examples in this bundle use premium catalog content.

The following examples are bundled in this package:

  • attribute-accessor-example - Range-Based Attributes
  • automotive-sensor - Automotive Sensor Pipeline
  • chained-compilation - Chain Compilation Pipelines
  • data-client-library - Data Client Library Reference
  • event-counter - Event Counter
  • flink-sdii-mapmatch-java - Flink SDII Map Match
  • stream-sdii-read-write - Stream SDII Read/Write in Java and Scala
  • hmc-attribute-retriever - HERE Map Content Attribute Retrieval
  • hmc-statistic - HERE Map Content Statistics
  • ingestion-rest-api - Ingestion Service Rest API
  • shared-utilities - Additional utilities included and used by some examples
  • pipelines-rest-api - Pipeline Service REST API
  • non-incremental-compilation - Non-Incremental Compiler
  • range-attribution - HERE Custom Schema - Range Attribution
  • product-compatibility - HERE Map Content - Product Compatibility (premium content)
  • traffic - HERE Real-Time Traffic Quick Start
  • weather - HERE Live and Archived Weather Quick Start

Available: Sign in to Repo
Complexity: Advanced

REST (4)

Index Layer REST API

This example demonstrates how to insert blob data, create metadata indexes from that data, how to update a data index and removal of an index; all via the REST API.

What You Will Learn

  • How to use the Index REST API.
  • How to use the Blob REST API to insert blob data.
  • How to create metadata indexes.
  • How to update a data index.
  • How to remove an index

Available: Sign in to Repo
Complexity: Basic

Ingestion Service REST API

This working sample is an introduction to how to publish data to OLP stream layer using Ingestion Rest API

  • Sending any data type to data-agnostic endpoint
  • Sending data in a format of SdiiMessageList to SdiiMessageList endpoint

This example is in the repo, accessible to OLP Subscribers. Find your credentials at https://platform.here.com/profile/repository. Click 'Generate Credentials,' your username and password are inside the settings.xml file.

Available: Sign in to Repo
Complexity: Basic

Pipelines Service REST API

This example demonstrates how to interact with Pipelines Service via REST API in order to deploy and execute your code in OLP.

The REST API equivalents of each of the OLP Pipeline operations are covered:

  • How to authenticate with Pipelines Service
  • How to upload their JAR files to OLP
  • How to create pipelines, pipeline templates and pipeline versions
  • How to activate a pipeline version to run their pipeline code
  • How to cancel pipeline versions and clean up used resources
Available: Sign in to Repo
Complexity: Basic

Stream Service REST API

This example will show how to manipulate (subscribe, read, unsubscribe) a stream layer using the OLP Stream REST API. Additional scripts are provided that can be used to create a stream layer, ingest data into it and then delete it.

This example shows how to use the Stream Service REST API to:

  • Subscribe to a stream layer of an OLP catalog.
  • Read messages from that layer.
  • Commit partition offsets.
  • Un-subscribe from the stream layer.
  • Re-subscribe using a previous subscription ID.
  • Read from where we left off above.

The OLP technologies used include:

  • OLP Stream Service REST API
  • OLP Catalogs and Stream Layers
Available: Sign in to Repo
Complexity: Basic