Geoserver Map Fish Print Configuration & Example Script index. html <head> <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/css/ol.css" type="text/css"> <style> .map { height: 400px; width: 100%; } </style> <script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/build/ol.js"></script> <title>OpenLayers example</title> </head> <div id="map"></div> <a id="export-pdf"><span id="button-label" class="btn btn-info"> Export(pdf)</span></a> <script> var URL = 'http://localhost:9090/geoserver/test/wms'; var centerpos = [84.2, 28.2]; var newpos = ol.proj.transform(centerpos, 'EPSG...
Popular posts from this blog
NetCDF to PostGIS Script Script # Import modules import psycopg2, time, datetime from scipy.io import netcdf # Establish connection db1 = psycopg2.connect("host=xxxx dbname=priogrid user=xxxx password=xxxx") cur = db1.cursor() # Create Table in postgis print str(time.ctime())+ " Creating precipud19002008 table." cur.execute("DROP TABLE IF EXISTS precipud19002008;") cur.execute("CREATE TABLE precipud19002008 (gid serial PRIMARY KEY not null, year int, month int, lon decimal, lat decimal, prec decimal);") # Read netcdf file using the netcdf_file class. 'r' for read. f = netcdf.netcdf_file('/mnt/pc258/prio_grid/source/ClimateData/precipud19002008.nc', 'r') # Create lathash. Read the f.variables['lat'].data.tolist() creates a list of lat coodinates. print str(time.ctime())+ " Looping through lat coords." temp = f.variables['lat'].data.tolist() # Create list of lat coords lathash = {} f...
Comments
Post a Comment