Commit 25e2c66a authored by Kris Vanneste's avatar Kris Vanneste
Browse files

Updated plot_map.py example.

git-svn-id: https://svn.seismo.oma.be/svn/seismo/mapping/layeredbasemap/trunk@7660 40b490c5-b4d9-47cb-8714-9bef99b524d5
parent 6f19cd40
......@@ -8,18 +8,21 @@ import mapping.layeredbasemap as lbm
region = (1,8,49,52)
projection = "merc"
#projection = "EPSG:31300"
#projection = "merc"
projection = "EPSG:31370"
#projection = 'EPSG:4326'
title = "Test"
resolution = "i"
graticule_interval = (2, 1)
layers = []
data = lbm.WMSData("http://seishaz.oma.be:8080/geoserver/rob/wms?", layers=["bel_villages_polygons"], verbose=True)
style = lbm.WMSStyle(xpixels=1200)
#data = lbm.WMSData("http://seishaz.oma.be:8080/geoserver/rob/wms?", layers=["ec8_zonation"], verbose=False)
data = lbm.WMSData("https://cartoweb.wms.ngi.be/service?", layers=["topo", "crossborder"], wms_version='1.3.0', verbose=True)
#data = lbm.WMSData("https://ows.terrestris.de/osm/service?", layers=["TOPO-OSM-WMS"], verbose=True)
style = lbm.WMSStyle(xpixels=1200, alpha=0.75)
layer = lbm.MapLayer(data, style)
#layers.append(layer)
layers.append(layer)
coastline_style = lbm.LineStyle(line_color="r", line_width=1)
data = lbm.BuiltinData("coastlines")
......@@ -53,10 +56,10 @@ multipoint_style = lbm.PointStyle(
)
layers.append(lbm.MapLayer(multipoint_data, multipoint_style))
image_data = lbm.ImageData("C:\\Temp\\banerNL.gif", 1, 49)
image_data = lbm.ImageData("E:\\Home\_kris\Logos\Orb1a.GIF", 1, 49)
image_style = lbm.ImageStyle(horizontal_alignment='left', vertical_alignment='bottom')
layer = lbm.MapLayer(image_data, image_style)
#layers.append(layer)
layers.append(layer)
map = lbm.LayeredBasemap(layers, title, projection, region=region, resolution=resolution, graticule_interval=graticule_interval)
......@@ -66,6 +69,6 @@ map = lbm.LayeredBasemap(layers, title, projection, region=region, resolution=re
#x, y = map.lonlat_to_map_coordinates(lons, lats)
#print(zip(x, y))
#map.plot()
map.plot()
map.export_geotiff(out_filespec="C:\\Temp\\matplotlib.tif", dpi=200, verbose=True)
#map.export_geotiff(out_filespec="C:\\Temp\\matplotlib.tif", dpi=200, verbose=True)
Markdown is supported
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