We've added a new unary API that lets users export processed point by geometry data.
ProcessedPointbyGeometryFileExport
We've added a new unary endpoint called ProcessedPointByGeometryFileExport
. It is a unary version of the ProcessedPointByGeometry
streaming endpoint. It allows users to download data outputs as .csv, parquet, json, or avro file types.
What Can I Use this Endpoint For?
Similar to ProcessedPointByGeometry
, this endpoint lets you input a Linestring or Polygon WKT to receive processed road-matched and trip-stitched information. Unlike the streaming endpoint, ProcessedPointByGeometryFileExport
allows users to request download links for data in a .csv, parquet, json, or arvo file type. These links are valid for 7 days.
Where available, the responses will include information similar to the ProcessedPointByGeometry
endpoint such as vehicle type, vehicle ID, trip ID, speeds, timestamp, near-miss, and make model.
Users can also exclude dates. These dates need to be entered individually into the request. You cannot select a date range, you would need to input each individual date within a range.
E.g., if you would like to exclude the 1st November 2024 to 3rd November 2024, you would need to create separate lines for the 1st, 2nd, and 3rd of November 2024 to exclude those dates. You would do so by copying from the start curly brace {
to the end curly brace }
of the first date and replicating that for the three dates you wish to exclude.
A Note on Syntax: The typescript language date format is important. Specifically, “04” is not the same as “4”; dates used in the API queries should not have a leading zero. Be mindful of the data type required for each field.
cURLs
If you wish to use a command line interface (CLI) like Mac OS “Terminal”, Linux “Bash” rather than using Python or the API Docs web tools to run your API query, and to obtain your file export, you can use the cURL method.
cURL, or client URL, is a command line tool that transfers data to and from a server. At the most fundamental, cURL lets you talk to a server by specifying the location (in the form of a URL) and the data you want to send. If you don’t already know how to compose a cURL API query, you can compose your first query in the API Docs portal using the provided JSON format, then click the “Copy as cURL” button to copy the cURL syntax command to your clipboard.
For future queries, you could use this same copied text (saved somewhere), modify the query parameters (API authentication key – generated by an Authenticate API cURL command, geometry, dates, filters), and just use your CLI to run the query.
A Note on cURLs: To download cURLs on a PC operating system, we recommend using a CLI like Git Bash. Alternatively, you can copy the URLs that are generated as part of the response and paste these links into your browser address bar.
How Do I Get a WKT Linestring or Polygon?
There are two ways to generate a WKT file information to input into this endpoint.
- Using Advanced Mode the Compass Road Intelligence Platform. You can read more about how to upload and download WKTs in the Road Intelligence platform in this article. When using the platform to draw a linestring, you will be able to specify a start and end point in a 2-click method. Other methods to produce a linestring require you to manually road-match by clicking at multiple points along a link to roughly match the road geometry.
- Using an external tool. Examples of tools that allow you to generate custom WKT polygons and linestrings include WKTMap (EPSG suggestions AU - 7844, UK - 27700, USA -4269, WGS 84 - 4326) and WKTViewer
What File Types Can I Export?
Users can request data in four different file types:
- CSV
- Parquet
- JSON
- AVRO
Why Are There Multiple Download Links?
Depending on the size of your query, you may receive multiple cURLs to download your files. This occurs because each file has a maximum size of approximately 600 MB. Once a file reaches the maximum file size, a new file will be generated to continue the data download until all the data for your WKT polygon or linestring is retrieved.