forked from envirosolutionspl/uldk_gugik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuldk_xy.py
45 lines (34 loc) · 1.46 KB
/
uldk_xy.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
from urllib.parse import urlencode
from qgis.core import QgsVectorLayer, QgsGeometry, QgsFeature, QgsProject
from .request import Request
from . import uldk_teryt
def getParcelByXY(xy, srid, objectType):
request = "GetParcelByXY"
result = "geom_wkt,teryt,parcel,region,commune,county,voivodeship"
params = {'request': request, 'xy': xy, 'result': result, 'srid': srid}
res = Request(params,objectType)
return res.data
def getRegionByXY(xy, srid, objectType):
request = "GetRegionByXY"
result = "geom_wkt,teryt,region,commune,county,voivodeship"
params = {'request': request, 'xy': xy, 'result': result, 'srid': srid}
res = Request(params,objectType)
return res.data
def getCommuneByXY(xy, srid, objectType):
request = "GetCommuneByXY"
result = "geom_wkt,teryt,commune,county,voivodeship"
params = {'request': request, 'xy': xy, 'result': result, 'srid': srid}
res = Request(params,objectType)
return res.data
def getCountyByXY(xy, srid, objectType):
request = "GetCountyByXY"
result = "geom_wkt,teryt,county,voivodeship"
params = {'request': request, 'xy': xy, 'result': result, 'srid': srid}
res = Request(params,objectType)
return res.data
def getVoivodeshipByXY(xy, srid, objectType):
request = "GetVoivodeshipByXY"
result = "geom_wkt,teryt,voivodeship"
params = {'request': request, 'xy': xy, 'result': result, 'srid': srid}
res = Request(params,objectType)
return res.data