Coverage for gws-app/gws/plugin/gekos/core.py: 0%

23 statements  

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

1"""Configuration types for the GekoS index.""" 

2 

3from typing import Optional 

4 

5 

6import gws 

7 

8 

9class PositionConfig(gws.Config): 

10 """Correction of point positions in the GekoS index.""" 

11 

12 offsetX: int 

13 """Offset added to X coordinates of points.""" 

14 offsetY: int 

15 """Offset added to Y coordinates of points.""" 

16 distance: int = 0 

17 """Radius of the circle on which points with the same location are spread.""" 

18 angle: int = 0 

19 """Angle step in degrees for spreading points with the same location.""" 

20 

21 

22class SourceConfig(gws.Config): 

23 """Gek-online source configuration.""" 

24 

25 url: gws.Url 

26 """Base URL for gek-online calls.""" 

27 params: dict 

28 """Query parameters for gek-online calls.""" 

29 instance: str 

30 """Instance name for gek-online calls, used to create unique UIDs.""" 

31 

32 

33class IndexConfig(gws.Config): 

34 """Index of GekoS records in a database table.""" 

35 

36 sources: list[SourceConfig] 

37 """gek-online sources to load records from.""" 

38 position: Optional[PositionConfig] 

39 """Position correction for points.""" 

40 tableName: str 

41 """Database table for the GekoS index.""" 

42 crs: gws.CrsName 

43 """CRS for GekoS data.""" 

44 crs: gws.CrsName 

45 """CRS for GekoS data.""" 

46 dbUid: Optional[str] 

47 """UID of the database provider for the index table.""" 

48 sources: list[SourceConfig] 

49 """gek-online sources to load records from.""" 

50 position: Optional[PositionConfig] 

51 """Position correction for points.""" 

52 tableName: str 

53 """Database table for the GekoS index."""