-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathuldk_api.py
executable file
·49 lines (38 loc) · 1.66 KB
/
uldk_api.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from . constants import DEFAULT_SRID
from .request import Request
def getBuildingById(id, object_type):
request = "GetBuildingById"
result = "geom_wkt,teryt,region,commune,county,voivodeship"
params = {'request': request, 'id': id, 'result': result, 'srid': DEFAULT_SRID}
res = Request(params, object_type)
return res.data
def getParcelById(id, objectType):
request = "GetParcelById"
result = "geom_wkt,teryt,parcel,region,commune,county,voivodeship"
params = {'request': request, 'id': id, 'result': result, 'srid': DEFAULT_SRID}
res = Request(params, objectType)
return res.data
def getRegionById(id, objectType, **kwargs):
request = "GetRegionById"
result = "geom_wkt,teryt,region,commune,county,voivodeship"
params = {'request': request, 'id': id, 'result': result, 'srid': DEFAULT_SRID}
res = Request(params, objectType, **kwargs)
return res.data
def getCommuneById(id, objectType):
request = "GetCommuneById"
result = "geom_wkt,teryt,commune,county,voivodeship"
params = {'request': request, 'id': id, 'result': result, 'srid': DEFAULT_SRID}
res = Request(params, objectType)
return res.data
def getCountyById(id, objectType):
request = "GetCountyById"
result = "geom_wkt,teryt,county,voivodeship"
params = {'request': request, 'id': id, 'result': result, 'srid': DEFAULT_SRID}
res = Request(params, objectType)
return res.data
def getVoivodeshipById(id, objectType):
request = "GetVoivodeshipById"
result = "geom_wkt,teryt,voivodeship"
params = {'request': request, 'id': id, 'result': result, 'srid': DEFAULT_SRID}
res = Request(params, objectType)
return res.data