Skip to content
GuidesPlaygroundDashboard

Find features near a geographic point

FeatureCollection Elements.Nearby(ElementNearbyParamsparameters, CancellationTokencancellationToken = default)
GET/api/v1/features/nearby

Find features near a geographic point

ParametersExpand Collapse
ElementNearbyParams parameters
required Double lat

Latitude (-90 to 90)

required Double lng

Longitude (-180 to 180)

Long limit

Maximum results (default 20, max 100)

Long radius

Search radius in meters (default 500, max 10000)

ReturnsExpand Collapse
class FeatureCollection:

Bare GeoJSON FeatureCollection. Pagination metadata is returned in HTTP headers (X-Limit, X-Has-More, X-Next-Cursor, X-Next-Offset, Link).

required IReadOnlyList<GeoJsonFeature> Features
required GeoJsonGeometry Geometry
required Coordinates Coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
IReadOnlyList<Double>
IReadOnlyList<IReadOnlyList<Double>>
IReadOnlyList<IReadOnlyList<IReadOnlyList<Double>>>
IReadOnlyList<IReadOnlyList<IReadOnlyList<IReadOnlyList<Double>>>>
required Type Type
One of the following:
"Point"Point
"LineString"LineString
"Polygon"Polygon
"MultiPoint"MultiPoint
"MultiLineString"MultiLineString
"MultiPolygon"MultiPolygon
required IReadOnlyDictionary<string, JsonElement> Properties
required Type Type
string ID

Feature identifier (type/osm_id)

Long OsmID

OpenStreetMap ID

required Type Type

Find features near a geographic point

ElementNearbyParams parameters = new()
{
    Lat = 0,
    Lng = 0,
};

var featureCollection = await client.Elements.Nearby(parameters);

Console.WriteLine(featureCollection);
Returns Examples