Features

The OLP CLI supports the following:

  • list features from an interactive map layer
  • get features from an interactive map layer
  • put features to an interactive map layer
  • delete features from an interactive map layer

catalog layer feature list

Lists the features of the specified interactive map layer to the standard output.

olp catalog layer feature list <catalog HRN> <layer ID> [command options]

Required parameters:

  • <catalog HRN> The HRN of the catalog.
  • <layer ID> The ID of the layer.

Optional parameters:

  • --ids <ID1 ID2 ...> The list of feature IDs you want to fetch, separated by space.
  • --filter <filter query> Search features based on property values using a filter query. Use a semicolon to query on multiple properties. For example, --filter "p.age>20;p.country=Germany". Here the prefix p. points to the feature's properties map. For more information, see Search Features.
  • --bbox <bbox> The bounding box to search the area in format - westLongitude, southLatitude, eastLongitude, northLatitude. Coordinates are in WGS'84 format. For example, --bbox 13.082,52.416,13.628,52.626.
  • --limit <limit> The number of features to be fetched. The default limit is 200.
  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --quiet Displays feature IDs, each on a new line.
  • --scope <project HRN> Specifies the project HRN to use as the scope in the request. The value specified with --scope overrides any value for here.token.scope provided in the credentials file used for the command.

For more information on using credentials and profiles, see Credentials Setup.

Example:

The following command lists 200 features from the interactive map layer layer1 in the catalog catalog1.


olp catalog layer feature list hrn:here:data::myrealm:catalog1 layer1

Output:


id                                      geometryType        createdAt           updatedAt
QBqnw3VUGo5bxpNs                        Point               14/05/2021 04:30    14/05/2021 04:30
sQkir7fa7jJZuOHK                        Point               14/05/2021 05:27    15/05/2021 06:45
C5k0BquzEspp7N5I                        LineString          15/05/2021 03:13    16/05/2021 04:30
sAjKucaagZPem005                        Polygon             17/05/2021 07:46    18/05/2021 06:36
08MeHAD5fmhgX2MY                        Polygon             21/05/2021 06:58    22/05/2021 02:30

catalog layer feature get

This command is used for fetching the data from an interactive map layer. By default, the command output is displayed in the standard output in JSON format. This command has different options which you can use to fetch the data according to your needs.

olp catalog layer feature get <catalog HRN> <layer ID> [command options]

Required parameters:

  • <catalog HRN> The HRN of the catalog.
  • <layer ID> The ID of the layer.

Optional parameters:

  • --ids <ID1 ID2 ...> The list of feature IDs you want to fetch, separated by space.
  • --filter <filter query> Search features based on property values using a filter query. Use a semicolon to query on multiple properties. For example, --filter "p.age>20;p.country=Germany". Here the prefix p. points to the feature's properties map. For more information, see Search Features.
  • --bbox <bbox> The bounding box to search the area in format - westLongitude, southLatitude, eastLongitude, northLatitude. Coordinates are in WGS'84 format. For example, --bbox 13.082,52.416,13.628,52.626.
  • --limit <limit> The number of features to be fetched. The default limit is 30,000.
  • --output <path to dir> The output directory to store the downloaded features. If the specified directory doesn't exist, it is automatically created. If no directory is specified, the default value is <current dir>.
  • --all Downloads all the features from the layer to the directory specified in the --output parameter. If no directory is specified, the default download location is <current dir>.
  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --quiet Displays the absolute path to the output directory, if available. Otherwise, the features are printed to the standard output.
  • --scope <project HRN> Specifies the project HRN to use as the scope in the request. The value specified with --scope overrides any value for here.token.scope provided in the credentials file used for the command.

For more information on using credentials and profiles, see Credentials Setup.

Example:

The following command prints the features with IDs feature1 and feature2 from the interactive map layer interactivemap-layer1 in the catalog catalog1 to the standard output.

Linux
Windows
olp catalog layer feature get hrn:here:data::myrealm:catalog1 interactivemap-layer1 \
--ids feature1 feature2
olp catalog layer feature get hrn:here:data::myrealm:catalog1 interactivemap-layer1 ^
--ids feature1 feature2

Example:

The following command downloads the features by applying filter p.age>20;p.country=Germany from the interactive map layer interactivemap-layer1 in the catalog catalog1 to the specified output directory. This query returns the features whose property age value is greater than 20 and country is Germany.

Linux
Windows
olp catalog layer feature get hrn:here:data::myrealm:catalog1 interactivemap-layer1 \
--filter "p.age>20;p.country=Germany" --output <output-path>
olp catalog layer feature get hrn:here:data::myrealm:catalog1 interactivemap-layer1 ^
--filter "p.age>20;p.country=Germany" --output <output-path>

catalog layer feature put

This command is used to upload the data into an interactive map layer. It supports .geojson files.

olp catalog layer feature put <catalog HRN> <layer ID> [command options]

Required parameters:

  • <catalog HRN> The HRN of the catalog.
  • <layer ID> The ID of the layer.

Optional parameters:

  • --data <path to input file> The input GeoJSON file for the layer. If no file is specified, the command reads the data from the standard output.
  • --batch-size <number-of-features> The batch size used for uploading data. The default batch size is 200.
  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --quiet Display empty output with no additional information.
  • --scope <project HRN> Specifies the project HRN to use as the scope in the request. The value specified with --scope overrides any value for here.token.scope provided in the credentials file used for the command.

For more information on using credentials and profiles, see Credentials Setup.

Note

If ID is available in the input feature, then the service uses the same ID, else UUID is generated for those features.

Example:

The following command uploads the data from the specified input file to the interactive map layer interactivemap-layer1 in the catalog catalog1.

Linux
Windows
olp catalog layer feature put hrn:here:data::myrealm:catalog1 interactivemap-layer1 \ --data <input_file_path>
olp catalog layer feature put hrn:here:data::myrealm:catalog1 interactivemap-layer1 ^ --data <input_file_path>

catalog layer feature delete

This command is used for deleting features from an interactive map layer.

olp catalog layer feature delete <catalog HRN> <layer ID> [command options]

Required parameters:

  • <catalog HRN> The HRN of the catalog.
  • <layer ID> The ID of the layer.
  • --ids <ID1 ID2 ...> The list of feature IDs you want to delete from the layer, separated by space.

Optional parameters:

  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --quiet Display empty output with no additional information.
  • --scope <project HRN> Specifies the project HRN to use as the scope in the request. The value specified with --scope overrides any value for here.token.scope provided in the credentials file used for the command.

For more information on using credentials and profiles, see Credentials Setup.

Example:

The following command deletes the features with ids feature1 and feature2 from the interactive map layer interactivemap-layer1 in the catalog catalog1.

Linux
Windows
olp catalog layer feature delete hrn:here:data::myrealm:catalog1 interactivemap-layer1 \
--ids feature1 feature2
olp catalog layer feature delete hrn:here:data::myrealm:catalog1 interactivemap-layer1 ^
--ids feature1 feature2

results matching ""

    No results matching ""