XYZ Hub Connector is a QGIS plugin which can be used to visualize, edit and analyze data from HERE Data Hub spaces and from Interactive Map Layer inside the HERE Platform.
- QGIS version 3.0 or later
- In QGIS, navigate to menu Plugins > Manage and Install Plugins... > All
- Search for
XYZ Hub Connector
> Install plugin - Switch to tab Installed, make sure the plugin
XYZ Hub Connector
is enabled.
- Download the latest release zip file
- In QGIS, navigate to menu Plugins > Manage and Install Plugins... > Install from ZIP, then select the downloaded zip file.
- Switch to tab Installed, make sure the plugin
XYZ Hub Connector
is enabled.
Once you have installed and enabled the plugin XYZ Hub Connector in QGIS, it can be accessed via the toolbar, or the menu Web. The main dialog contains 5 tabs:
-
Load
: load data from an XYZ space into QGIS, given a valid token and server (PRD/CIT). To learn more about how to generate a token, refer to https://www.here.xyz/api/getting-token/ and https://xyz.api.here.com/token-ui/.Mode
: there are 3 modes of loadingLive loading
: interactively refresh features in tiles within the current canvas. Useful for visualization of dynamic dataset with full editing capabilitiesIncremental loading
: interactively refresh and cached features in tiles within the current canvas (no features delete). Useful for visualization and exploration of large datasetStatic loading
: load and cache all features in space in background. Useful for importing and analysis of static dataset
Chunk size
indicates the number of features per tile or iterationLayering
controls the organization of data in XYZ space into different QGIS layers based on fields similarity, with 3 levels:single
: merge data into 1 layer per geometry typemaximal
: do not merge data, as many layers per geometry typebalanced
: merge only similar data into 1 layer, balanced number of layers per geometry type
-
Upload
: upload current Vector Layer to a new XYZ Hub space. For this to work, make sure that your token also has write-level permissions. -
Manage
: create new space, edit or delete existing space. -
Map Tile
: create HERE Map Tile layer given validapp_id
andapp_code
. Alternatively,api_key
can also be used. -
Settings
:Clear cache
: empty the temporary cache folder. Active layers will be invalid after clearing cache.
When the user make some edits to the loaded layer, the changes can be pushed to XYZ Hub via the button Push changes
in the toolbar.
Official Data Hub server is predefined under name "HERE Server" and thus is not required to be created. The following steps are only required for self-hosted Data Hub server and HERE Platform server.
-
From the "Web" menu in QGIS, select "XYZ Hub Connector" > "Add HERE Layer".
-
Press the "Setup" button and then "Setup Server" to add a new server.
-
Click "Add" to add a new server.
-
Select server type
a. Server Type: DATAHUB, enter "HERE self-hosted Data Hub" as the name and your Data Hub URL as the server.
b. Server Type: PLATFORM, enter "HERE platform" as the name and PLATFORM_PRD as the server.
-
Click on OK to save the new server and OK again to return to the setup screen.
- From the "Web" menu in QGIS, select "XYZ Hub Connector" > "Add HERE Layer".
- Press the "Setup", ensure that "HERE Server" is selected in the Server drop down.
- Click on "Add" to add your token.
- Enter a name and corresponding Data Hub token created previously according to the guide https://www.here.xyz/api/getting-token/
- Click on OK to save the token, and close the connection window
- From the "Web" menu in QGIS, select "XYZ Hub Connector" > "Add HERE Layer".
- Press the "Setup", ensure that "HERE Platform" is selected in the Server drop down.
- Click on "Add" to add your credentials.
- Enter "My credentials" as the name.
- Select a credentials.properties containing your HERE Platform app credentials (typically location in
{USER_HOME}/.here/credentials.properties
- If you don't already have an app or a credentials.properties file then you can follow "platform credentials" section of this guide to create one: https://developer.here.com/documentation/java-scala-dev/dev_guide/topics/get-credentials.html
- Grant access on the data to the HERE platform app so that it can access your project. Do so by following this guide: https://developer.here.com/documentation/identity-access-management/dev_guide/topics/manage-projects.html
- Click on OK to save the credentials, and close the connection window
- Create a new project (Project → New), save the project
- From the "Web" menu in QGIS, select "XYZ Hub Connector" > "Add HERE Layer"
- From the Connection drop down, select the "HERE Platform" connection and the "My Credentials" credentials that you created previously
- Click "Connect"
- Select one or more Interactive Map Layer entries
- Click on "Load" to load the data
Note: You can also add background map tiles via the "Map Tile" tab. You will need to use your credentials from https://developer.here.com/.
Test with unittest
./runTest.sh -m unittest test
Test with pytest-xdist
./runTest.sh -m pytest -n 2 test
- Clone this repository.
- Build the plugin by running
sh makeBuild.sh <VERSION NUMBER>
, e.g.sh makeBuild.sh 1.5.5
.
Copyright (C) 2019-2021 HERE Europe B.V.
This project is licensed under the MIT license - see the LICENSE file in the root of this project for license details.