AtlasFetch

v0.4.5
xyz.atlasfetch/atlasfetch Checked 1 day ago Published 10 days ago

Coordinates to places and streets, addresses to points, and routes around your own geofences.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

lookup_location Look up the boundaries containing a coordinate

Reverse geocode a coordinate to the administrative areas that contain it — country, region (state or province) and municipality — as names plus ISO 3166 codes, optionally the nearest street, and matches from boundary sets the account has uploaded: all in one call. Use for: which country, region or municipality a point is in; which street a point is on (add "street" to base); geofence checks against your own polygons; tagging data with region codes. For the other direction, an address to a coordinate, use geocode_address. For a route, a travel distance or a travel time, use get_route — 1…

ParameterTypeDescription
lat *numberLatitude, -90 to 90.
lng *numberLongitude, -180 to 180.
basearrayWhich reference layers to resolve. Defaults to country, region and municipal. "street" is opt-in: add it explicitly to get the nearest street.
encodearrayAlso return the point as an H3 cell index and/or Google Plus Code. Output only — neither can be used AS a location, because both name areas rather than points.
h3resintegerH3 resolution 0-15. 9 is about 400 m across.
pluslenPlus Code length. 9 is not a valid length. 10 is about 14 m.
setsarrayNames of the boundary sets on this account to match against. Defaults to none.
streetGeometrystringGive each street answer the line of the street it names, trimmed to about 250 m either side of the point. Implies the street layer. Off by default, and leave it off unless something will draw it: a li…

geocode_address Geocode an address to a coordinate (Southern Africa)

Turn ONE address into a point, with an honest account of how much of it was found. Built for deliveries. South Africa, Namibia, Botswana, Zimbabwe, Lesotho and Eswatini today; more countries as their data loads. 1 lookup per address, found or not. Send either q (one line) or address (housenumber, street, suburb, city, postcode, unit) — never both. If the address is already split, send it split: it matches better. READ precision BEFORE using the point. "address" means the house was found — or the plot or stand, as Botswana and Zimbabwe write addresses ("Plot 1225, Kasane", "Stand Y116, Ha…

ParameterTypeDescription
addressobjectThe address already split into parts. Needs a street, or a plot or stand number in housenumber with city or suburb for the place. Use instead of q.
basearrayAdministrative layers to resolve at the found point.
countrystringISO 3166-1 alpha-2: ZA, NA, BW, ZW, LS or SZ today. A hard filter: only that country is searched. Pass it outside ZA.
qstringThe whole address on one line, e.g. "25 Adderley Street, Cape Town".
regionstringISO 3166-2 ("ZA-WC") or a name ("Western Cape"). A preference, not a filter.
setsarrayBoundary sets on this account to match at the found point, e.g. delivery zones.
streetGeometrystringThe matched street’s line, trimmed to about 250 m. Only if something will draw it.

list_boundary_sets List the boundary sets on this account

Lists the boundary sets on this account with their boundary counts and the API keys (id and label) each is granted to. A set only matches during a lookup when it is available AND granted to the key making the call. On the shared demo key, grantedKeys is always empty.

create_boundary_set Create a boundary set

Creates an empty named set to hold your own polygons: delivery zones, service areas, sales territories. IMPORTANT, and not a bug: a new set is created unavailable and granted to no key, so it matches nothing until both are changed. Granting is addressed by API key id, and nothing this server can call tells it its own key's id. So this tool can create the set and add boundaries to it, but the FIRST grant has to happen in the dashboard: tell the user to switch the set on and grant it to the key this server uses, at https://atlasfetch.xyz/dashboard.

ParameterTypeDescription
name *stringA short name, used to reference the set in lookups: 1-32 letters, digits, hyphens or underscores, starting with a letter or digit.

add_boundary Add a polygon to a boundary set

Adds ONE polygon to an existing boundary set on this account, so that lookup_location reports when a point falls inside it — delivery zones, service areas, sales territories. Each call creates a new boundary: calling twice with the same name stores two. Before calling: the set must already exist (create_boundary_set). A set matches nothing in lookups until it is switched on and granted to an API key in the dashboard at https://atlasfetch.xyz/dashboard, which this server cannot do. geometry must be a single GeoJSON Polygon — not a MultiPolygon, Feature or FeatureCollection. Positions are…

ParameterTypeDescription
geometry *objectA GeoJSON Polygon, e.g. {"type":"Polygon","coordinates":[[[18.40,-33.93],[18.40,-33.90],[18.44,-33.90],[18.44,-33.93],[18.40,-33.93]]]}.
name *stringLabel returned when a looked-up point falls inside this polygon, e.g. "Zone A".
set *stringName of an existing set on this account (see list_boundary_sets).
propertiesobjectOptional flat key/value pairs returned with every match: keys up to 32 characters, values a string (up to 256 characters), number or boolean. The demo key accepts only category, color and priority, fr…

update_boundary Move or reshape a boundary, keeping its name and properties

Replace the shape of ONE existing boundary. Its id, name, properties and set stay as they are, so every lookup that matches it keeps returning the same properties. Use this to fix or move a zone. Do NOT delete it and add it again: that gives it a new id and loses the properties unless they are re-sent. Name the boundary by set and name; this finds its id. If a set holds two boundaries with that name, the answer lists their ids and asks for one. The new shape gets the same checks as add_boundary, including the 50-point cap (refused, unbilled). Only boundaries on this account can be changed.

ParameterTypeDescription
geometry *objectThe new shape: a GeoJSON Polygon.
set *stringThe set the boundary is in.
idstringThe boundary’s id (a UUID), when it is known. Use this or name.
namestringThe boundary’s name. Use this or id.

get_route Route between coordinates, optionally avoiding your own zones

A driving, cycling, walking or truck route from the first location to the last, via any in between, with distance, duration and turn-by-turn steps. COST: a route is 10 LOOKUPS on the standard plans, not one (a custom plan may charge less; X-Lookups-Remaining is always the truth). Everything it returns is included in that, so do not call it in a loop to compare options without saying so. Durations are FREE-FLOW: the road network at its own speed limits, with NO live or historical traffic. Never present one as an arrival time in traffic — for that, say a traffic-aware service (Google, Mapbox…

ParameterTypeDescription
locations *arrayOrigin, any stops in order, then destination. 2 on the free plans, up to 25 on Pro.
alternativesintegerAlso return up to this many other routes. Exactly 2 locations only. Plan-capped.
avoidSetsarrayNames of boundary sets on this account to route AROUND. Every zone in them is excluded.
exposureSetsarrayNames of boundary sets to MEASURE against: the route is unchanged, and the answer says how many metres of it ran inside each zone.
geometrystringDEPRECATED: use routeGeometry, which takes the same values. Removed in 1.0.
languagestringLanguage for the step instructions, e.g. "en-GB", "de-DE", "fr-FR". Defaults to en-US.
modestringTravel mode. Defaults to car. "truck" is Pro only; see TRUCKS above.
routeGeometrystringThe route line. Defaults to none. Ask for polyline6 or geojson only when something will draw it: it is long, and an assistant cannot read it usefully.
stepsbooleanTurn-by-turn steps per leg. Defaults to true here; set false for distance and time only.
vehicleobjectTruck dimensions and load. Only with mode "truck"; rejected otherwise. Give weightTonnes: without it the truck is treated as heavy (over 9 t) and capped at 80 km/h.