# /latlng/intersects

## locations which intersect a location at coordinate.

<mark style="color:blue;">`GET`</mark> `geolytix.xyz/api/location/select/latlng/intersects`

This endpoints returns locations which intersect a location at the given coordinate.

#### Query Parameters

| Name   | Type   | Description                                                                                                     |
| ------ | ------ | --------------------------------------------------------------------------------------------------------------- |
| locale | string | The locale (key) for the layer.                                                                                 |
| layer  | string | The layer (key).                                                                                                |
| table  | string | The PostGIS table to be queried. Defaults to layer table or tables array if not specified in request.           |
| geom   | string | A geometry field must be provided if the layer has no geometry definition. Will override layer geom definition. |
| token  | string | A token is required to access private endpoints.                                                                |

{% tabs %}
{% tab title="200 A JSON array of locations." %}
```javascript
{
  "geomj": "{...}",
  "infoj": [
    {
      "label": "Population '11",
      "field": "pop_11",
      "type": "integer",
      "value": 304
    }
  ]
}
```
{% endtab %}

{% tab title="204 Returned when the database query was successful but no records were returned." %}
```
'No rows returned from table.'
```
{% endtab %}

{% tab title="401 Returned when trying to access a private endpoint with an invalid or missing token." %}
```
'Invalid token.'
```
{% endtab %}

{% tab title="406 Will be returned if parameter are missing or don't match the workspace in memory." %}
```
'Invalid locale.'
​
'Invalid layer.'
​
'Missing lng.'
​
'Missing lat.'
​
'Missing geom (SRID 4326) field on layer.'
​
'Invalid parameter.'
```
{% endtab %}

{% tab title="500 Backend failed to fetch results from database table." %}
```
'Failed to query PostGIS table.'
```
{% endtab %}
{% endtabs %}

