{"uid":"cap_6FekjfOMyZ0r2_-t3OmL5","slug":"geoprimitives-ground-elevation-lookup-1acfb219","name":"geoprimitives Ground Elevation Lookup","description":"Give it a latitude and longitude and it answers with the ground elevation there in metres above NAVD88, read from the USGS 3D Elevation Program seamless DEM. Parameters go in the query string: this is a GET, there is no body. COVERAGE, stated up front because it is the first thing to check: the state of Alaska, whole, and nothing else yet. The coverage gate reads the coordinate, so it runs in the handler and after payment, not in front of the 402: a coordinate outside Alaska is quoted like any other and then refused with outside_coverage. A refusal does not settle, so nothing is charged, but it costs a signature and a second round trip to find out. Check the coverage against this description or the free catalog first. The conterminous United States and Hawaii are the next extension and arrive through the same pipeline with no change to this interface; every response repeats the coverage under `coverage` so an agent never infers it from an error. Canada is not served even where USGS publishes pixels over it: those come from Natural Resources Canada under a licence with an attribution clause, and this catalog carries public-domain data only, so they were not stored. SOURCE AND VINTAGE: USGS 3DEP seamless 2 arc-second product, the resolution USGS publishes for Alaska, a work of the United States government in the public domain (17 U.S.C. 105). A 2 arc-second pixel is about 62 m north to south and 20 to 30 m east to west at Alaskan latitudes; the response states the pixel size at your latitude. USGS republishes blocks as new lidar and IFSAR arrive, and the response carries the publication date of the block that answered you. Heights are orthometric, NAVD88, metres; horizontal positions are NAD83, which this endpoint reads as WGS 84 since the two differ by under two metres, a fraction of a pixel. INTERPOLATION: bilinear over the four pixel centres around the point by default, which is what GDAL and PROJ do for a continuous surface. Pass interpolation=nearest for the raster's own value at the pixel the point falls in, which is bit-identical to gdallocationinfo on the USGS file and the right choice when you want the source unblended. Checked against GDAL rather than against itself: of 200 coordinates drawn over the built blocks, the 150 inside the coverage agreed with `gdallocationinfo -r bilinear` on the USGS GeoTIFFs to 6.2e-4 m at worst, and interpolation=nearest agreed with plain `gdallocationinfo` to the millimetre this endpoint rounds to. The response always names the method used. VOIDS AND WATER: gaps in the USGS footprint and the Canadian side of the border are void, and so is open water beyond the three-mile county limit. A void pixel inside a bilinear window is dropped and the remaining weights renormalised, as gdalwarp treats nodata, and the response says how many of the four were used. A window that is entirely void is refused with no_data and not charged, never answered with zero. Inshore water is a different case and you should know it: USGS writes 0 over the sea in some blocks and nodata in others, so a coordinate in a harbour or a bay inside the county limit may answer 0 m, which is the source's value and not a measurement of anything. ACCURACY of the data itself is USGS's, not this endpoint's: the Alaska seamless layer is built from IFSAR at 5 m resampled to 2 arc-seconds, and USGS states its vertical accuracy per source project rather than for the seamless layer as a whole. Expect metre-level agreement with a survey on open terrain and worse under forest and on steep slopes. This endpoint adds nothing to that error beyond interpolation. Longitude and latitude are checked against EPSG:4326 bounds first. Reproject with POST /v1/transform if you are not already in WGS 84 or NAD83. For a line rather than a point use POST /v1/elevation/profile, which samples along a polyline in one call.","url":"https://api.geoprimitives.dev/v1/elevation?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["lat","lon"],"properties":{"lat":{"type":"number","maximum":90,"minimum":-90,"description":"Latitude in decimal degrees, EPSG:4326. Refused outside -90..90."},"lon":{"type":"number","maximum":180,"minimum":-180,"description":"Longitude in decimal degrees, EPSG:4326. Refused outside -180..180."},"interpolation":{"enum":["bilinear","nearest"],"type":"string","default":"bilinear","description":"bilinear (default): weighted mean of the four pixel centres around the point. nearest: the value of the pixel the point falls in, bit-identical to gdallocationinfo."}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_fI7ZTLFd8OqIE0uDcY0UF","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns ground elevation in metres above NAVD88 for a given latitude/longitude coordinate, sourced from the USGS 3D Elevation Program seamless DEM, currently covering Alaska only.","exampleAgentPrompt":"What is the ground elevation in metres at latitude 64.2008, longitude -153.4062 in Alaska? Use bilinear interpolation.","exampleUseCases":[{"title":"Terrain safety check for flight planning","prompt":"I'm planning a low-altitude flight path through central Alaska — can you get me the ground elevation at 64.8401° N, 147.7200° W so I know the terrain height there in metres above NAVD88?"},{"title":"Construction site elevation survey","prompt":"We're scoping a building site near Anchorage at lat 61.2181, lon -149.9003. What's the ground elevation there according to USGS elevation data, using bilinear interpolation?"},{"title":"Hiking route altitude profiling","prompt":"I'm planning a hike and want to know the elevation at the trailhead — coordinates are 60.1911 N, 149.6575 W in Alaska. Can you pull the NAVD88 elevation for that spot?"}],"resultDescription":"A JSON object containing the elevation in metres above NAVD88 at the queried coordinate, the interpolation method used, the input coordinate, and the current coverage area. If the coordinate is outside the covered region (currently Alaska only), the response includes an 'outside_coverage' error but does not charge the caller.","failureModes":["Coordinate outside Alaska returns 'outside_coverage' error — no charge, but costs a round trip and a signature; check coverage in advance","Latitude outside -90..90 or longitude outside -180..180 is rejected as invalid","Network or DEM data unavailability may cause transient 5xx errors","Payment failure (x402) prevents the request from being processed"],"whenToPreferThis":"Choose this endpoint when you need authoritative USGS 3DEP-sourced ground elevation data (NAVD88 datum) for coordinates within Alaska, especially when you need bilinear-interpolated values that are more precise than nearest-pixel reads. Ideal for GIS pipelines, terrain analysis, flight planning, construction, or any application requiring official US government elevation data rather than crowd-sourced or lower-resolution global DEMs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T12:40:06.831Z","isFirstParty":false,"canonicalSlug":"geoprimitives-ground-elevation-lookup-1acfb219"}