Commit 1f733577 authored by Jean-Marie Lepioufle's avatar Jean-Marie Lepioufle
Browse files

enabling getting styles from layers

parent cafaec71
# osmaug
# osmaug v0.02dev
A package for:
- getting tiles from OpenStreet Map or from a geoserver surrounding specific locations.
- getting tiles surrounding specific locations from OpenStreet Map and/or from a geoserver.
- implementing Euclidian transformation as picture augmentation.
- Combining specific locations with the filename related to an augmented tile into a tabular data frame.
......
......@@ -8,7 +8,7 @@ def getosm_function(params: Dict):
zoom = params['zoom']
source = params['source']
if source['type'] == "wms":
wms_source = map_wms_source(source['url'],source['layers'],source['fmt'],source['transparent'],source['cql_filter'])
wms_source = map_wms_source(source['url'],source['layers'],source['styles'],source['fmt'],source['transparent'],source['cql_filter'])
else:
wms_source = None
resdir = os.path.join(params['resdir'])
......
......@@ -21,10 +21,9 @@ def make_bbox(coords,crs,delta_meters):
return(res)
# bbox=[59.8,10.7, 60.0, 10.8]
def map_wms_source(url,layers,fmt,transparent,cql_filter):
res = pd.DataFrame(columns=['url','layers','fmt','transparent','cql_filter'])
res = res.append({'url': url, 'layers': layers, 'fmt':fmt,'transparent':transparent,'cql_filter':cql_filter},ignore_index=True)
def map_wms_source(url,layers,styles,fmt,transparent,cql_filter):
res = pd.DataFrame(columns=['url','layers','styles','fmt','transparent','cql_filter'])
res = res.append({'url': url, 'layers': layers, 'styles': styles, 'fmt':fmt,'transparent':transparent,'cql_filter':cql_filter},ignore_index=True)
return(res)
def load_map(bbox,wms_source,zoom,file):
......@@ -40,6 +39,7 @@ def load_map(bbox,wms_source,zoom,file):
tv_adtLayer = WmsTileLayer(
url = wms_source['url'][0],
layers = wms_source['layers'][0],
styles = wms_source['styles'][0],
fmt = wms_source['fmt'][0],
transparent = wms_source['transparent'][0],
cql_filter = wms_source['cql_filter'][0])
......
......@@ -16,7 +16,7 @@ dev_requirements = []
setup(
name='osmaug',
version='0.04dev',
version='0.05dev',
author='Jean-Marie Lepioufle, Islen Vallejo',
author_email='jml@nilu.no, iv@nilu.no',
packages=[
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment