-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmesh3d_api.py
35 lines (30 loc) · 898 Bytes
/
mesh3d_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
import re
from .wms.utils import get_wms_objects
from . import service_api
URL = "https://mapy.geoportal.gov.pl/wss/service/PZGIK/NMT/WMS/ModeleSiatkowe3D?"
c = re.compile(r"\{{1}.*\}{1}")
def getMesh3dListbyPoint1992(point):
x = point.x()
y = point.y()
LAYERS = [
'SkorowidzeModeleSiatkowe3D'
]
PARAMS = {
'SERVICE': 'WMS',
'request': 'GetFeatureInfo',
'version': '1.1.1',
'layers': ','.join(LAYERS),
'styles': '',
'srs': 'EPSG:2180',
'bbox': '%f,%f,%f,%f' % (x-50, y-50, x+50, y+50),
'width': '101',
'height': '101',
'format': 'image/png',
'transparent': 'true',
'query_layers': ','.join(LAYERS),
'i': '50',
'j': '50',
'INFO_FORMAT': 'text/html'
}
resp = service_api.getRequest(params=PARAMS, url=URL)
return get_wms_objects(resp)