Coverage for gws-app/gws/plugin/nominatim/__init__.py: 100%

0 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-05 13:35 +0200

1"""Place and address search with Nominatim. 

2 

3This plugin searches places and addresses in OpenStreetMap through the public 

4Nominatim service (https://nominatim.org/release-docs/develop/api/Search/). 

5 

6- ``finder``: the ``nominatim`` finder. It creates a ``nominatim`` model and 

7 provides default teaser and description templates. 

8- ``model``: the read-only ``nominatim`` model. It sends the search keyword to 

9 the service, limited to the bounds of the search shape (in WGS84) and 

10 optionally to countries, with an optional preferred language, and turns the 

11 results into features, sorted by name, OSM class and OSM type. 

12 

13The results are features with WGS84 geometries transformed to the search CRS. 

14Results that do not intersect the search shape are dropped. The address parts 

15of a result are flattened to ``address_*`` attributes, and the attributes 

16``name``, ``osm_class`` and ``osm_type`` are added for use in templates. 

17 

18Example:: 

19 

20 actions+ { type "search" } 

21 

22 finders+ { 

23 type "nominatim" 

24 spatialContext "map" 

25 country "de" 

26 language "de" 

27 } 

28"""