Commit d3c98b5f authored by Bengfort's avatar Bengfort
Browse files

rm user docs on geofilters

see documentation!112
parent 0f068fc6
Pipeline #13479 passed with stages
in 4 minutes and 54 seconds
......@@ -16,19 +16,7 @@ describes how this feature can be activated and used.
castellum by default. However, some additional steps are needed.
## Example use case
If the desired participants for a study should be older than 40 years
and live in an area where the noise from an airport is over 40dB you
would create and upload a GeoJSON file with a (multi)polygon spanning
the area where this condition applies. Afterwards proceed as usual with
setting the filter for age in the study filter UI. The resulting
subjects in the recruitment interface match the filter condition AND
their contact address is located inside the uploaded polygon.
## Geocoding
### Nominatim
## Set up Nominatim
Nominatim is a free geocoder from the OpenStreetMap ecosystem. A public
instance is available at <>. For bulk
......@@ -59,7 +47,8 @@ Further reading:
- <>
- <>
### Configure Castellum
## Configure Castellum
- Add `'django.contrib.gis'` and `'castellum.geofilters'` to
......@@ -78,67 +67,3 @@ Further reading:
to determine if an address doesn't exist at all, is misspelled or
can't be geocoded because it's not in the database used for
## Create a geo filter
### GeoJSON format
Provide a valid [GeoJSON]( file with
a either a single feature or a feature collection of type "Polygon" or
"MultiPolygon". Castellum will then filter all subjects that live inside
this (multi)polygon, so it should enclose all areas where the conditions
for recruitment are met. Note that the Coordinate Reference System (CRS)
must be WGS84 (EPSG:4326).
This is an example of a valid GeoJSON file:
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[
[13.3517429, 52.5189382],
[13.2908489, 52.5165476],
[13.3463410, 52.4848593],
[13.3512518, 52.4468630],
[13.3964313, 52.4785787],
[13.4627272, 52.4504546],
[13.4308069, 52.4893448],
[13.4730399, 52.5192370],
[13.4141102, 52.5180417],
[13.3821899, 52.5604549],
[13.3517429, 52.5189382]
<> is a simple tool to preview and edit GeoJSON.
### How to convert a shapefile to GeoJSON
Most Geographic Information Systems (GIS) such as QGIS or ArcGIS support
the conversion to GeoJSON out of the box. Desktop GIS applications
should automatically reproject the shapefile to WGS84 during the export
to GeoJSON format.
### How to optimize GeoJSON for performance
The duration of the calculation scales roughly linearly to the number of
vertices in the GeoJSON file. If the calculation takes too long, try to
reduce the number of vertices in the file. This can be achieved in two
- Crop the spatial extent of your geographic data to the extent of the
area where the subjects live (or at least most of them). This makes
sense if most of your subjects are from the same city or state.
- Generalize your polygon. This reduces the amount of vertices while
retaining the general shape of the polygon. This makes sense of the
resolution of your data is very high. Remember that Castellum
derives the subjects' geolocations from their addresses, which refer
to houses. Therefore, a polygon with a resolution of 10cm has no
advantage over one with a resolution of 10m, as address data is
resolved to 10m at best, as determined by typical house sizes.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment