You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何从HERE REST API获取道路数据及地理坐标等附加信息

Hey there! I see you've been using HERE's Map Tile API but only getting pixel-based street labels, and you're looking to fetch actual geographic coordinates (latitude/longitude) plus additional road data like route numbers. Let's walk through the right tools and steps to get this done.

Why the Map Tile API Isn't the Right Fit

First, it's important to clarify: the Map Tile API is designed for rendering map tiles, which is why it returns pixel coordinates for labels instead of real geographic data. To get road geometry and attributes, you'll need to use HERE's APIs built specifically for map data extraction.

Here are two primary APIs that will give you the data you need:

1. HERE Roads API

This API is tailored to retrieve detailed road information, including geographic coordinates, road numbers, names, and road types. It's perfect for getting road geometry as a list of latitude/longitude points.

Example Request

GET https://roads.api.here.com/v1/roads?bbox=52.5159,13.3777,52.5179,13.3807&apiKey={YOUR_API_KEY}
  • The bbox parameter defines the area you want to query (format: minLat,minLon,maxLat,maxLon).
  • Replace {YOUR_API_KEY} with your valid HERE API key.

Key Response Data

In the response, each road entry will include:

  • geometry: An array of [latitude, longitude] pairs representing the road's path.
  • attributes: Contains details like roadNumber (route/road ID), name, roadType, and more.

2. HERE Map Data API

If you need even more granular road data (like lane counts, turn restrictions, or full network topology), the Map Data API is the way to go. It provides structured, feature-rich map data for specific layers (including roads).

Example Request

GET https://mapdata.api.here.com/v1/mapdata?layers=ROAD_GEOM_FC&bbox=52.5159,13.3777,52.5179,13.3807&apiKey={YOUR_API_KEY}
  • The layers parameter specifies which map data layer to retrieve (here, ROAD_GEOM_FC for road geometry features).
  • Again, use your API key for authentication.

Key Response Data

The response will include features objects, each with:

  • geometry: A GeoJSON structure with the road's geographic coordinates.
  • properties: A full set of road attributes, including route numbers, road class, and connectivity info.
Important Tips
  • Authentication Update: HERE has phased out app_id and app_code in favor of API Keys. Make sure you generate a valid API Key from your HERE Developer account to use these APIs.
  • Filtering Data: Use parameters like filter to narrow down results (e.g., only fetch highways or local roads) and avoid unnecessary data.
  • Rate Limits: Be mindful of the API's rate limits to prevent service interruptions. Check the HERE documentation for specific limits per API.

内容的提问来源于stack exchange,提问作者Alexander Chernetcov

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 03:23:47