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

0 statements  

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

1"""GekoS-Bau integration. 

2 

3Connects GWS with the GekoS-Bau building permit software 

4(https://www.gekos.de/). GekoS calls GWS URLs to show positions and parcels on 

5the map and to get the coordinates of parcels and addresses. Parcels and 

6addresses are looked up with the ALKIS plugin (``gws.plugin.alkis``). 

7Optionally, GekoS records (Vorgaenge) are loaded from gek-online into a 

8PostGIS index table. 

9 

10Submodules 

11---------- 

12 

13- ``action`` - the ``gekos`` action. Implements ``gekosGetXY``, which returns 

14 the coordinates of a parcel or an address as plain text ``x;y``, using the 

15 ``alkis`` action of the project. 

16- ``index`` - the index. Loads records from gek-online sources (XML), 

17 creates point geometries, optionally moves points with the same position 

18 apart on a circle, and writes the records into the index table. The uid of 

19 a record is ``<instance>_<ObjectID>``. 

20- ``core`` - configuration types of the index, its sources and the position 

21 correction. 

22- ``cli`` - the command ``gws gekos index``, which creates the index. 

23- ``js`` - the client part, which handles ``GIS-URL-GetXYFromMap``. 

24 

25GekoS settings 

26-------------- 

27 

28The GekoS settings for GWS (Verfahrensadministration / GIS Schnittstelle). 

29Base address:: 

30 

31 GIS-URL-Base = http://my-server 

32 

33Client-side call, handled in the client by the Marker element:: 

34 

35 GIS-URL-ShowXY = /project/PROJECT_ID/?x=<x>&y=<y>&z=SCALE_VALUE 

36 

37Client-side call, handled in the client by ``js/index.tsx``:: 

38 

39 GIS-URL-GetXYFromMap = /project/PROJECT_ID/?&x=<x>&y=<y>&gekosUrl=<returl> 

40 

41Client-side call, handled by the ALKIS plugin:: 

42 

43 GIS-URL-ShowFs = /project/PROJECT_ID/?alkisFs=<land>_<gem>_<flur>_<zaehler>_<nenner>_<folge> 

44 

45Callback URLs, handled by the ``gekos`` action:: 

46 

47 GIS-URL-GetXYFromFs = /_/gekosGetXY/projectUid/PROJECT_ID/fs/<land>_<gem>_<flur>_<zaehler>_<nenner>_<folge> 

48 GIS-URL-GetXYFromGrd = /_/gekosGetXY/projectUid/PROJECT_ID/ad/<str>_<hnr><hnralpha>_<plz>_<ort>_<bishnr><bishnralpha> 

49 

50The order of the placeholders must match ``COMBINED_FLURSTUECK_FIELDS`` and 

51``COMBINED_ADRESSE_FIELDS`` in the ALKIS plugin. 

52 

53Example:: 

54 

55 actions+ { 

56 type "gekos" 

57 index { 

58 tableName "gekos.vorgaenge" 

59 crs 25832 

60 sources [ 

61 { 

62 url "https://gek-online.example.com/..." 

63 params { ... } 

64 instance "bau" 

65 } 

66 ] 

67 position { 

68 offsetX 0 

69 offsetY 0 

70 distance 5 

71 angle 30 

72 } 

73 } 

74 } 

75 

76Create the index from the command line:: 

77 

78 gws gekos index --projectUid myproject 

79"""