Package Exports
- wms-save-image
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (wms-save-image) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Features
Download a single image from a WMS map server
Usage
Usage: node wms-save-image <options> [meta.json]
meta.json JSON file containing bounds information
Options:
-U --url WMS URL templateExample
node wms-save-image.js example/thumbnail.json![]()
Arguments
URL template
node wms-save-image.js \
-U "https://openwms.statkart.no/skwms1/wms.topo4.graatone?request=GetMap&SERVICE=WMS&VERSION=1.1.1&BBOX=${left},${bottom},${right},${top}&SRS=EPSG:32633&WIDTH=${width}&HEIGHT=${height}&LAYERS=topo4graatone_WMS&STYLES=&FORMAT=image/png"
example/thumbnail.jsonVariables
- left: Coordinate of left side of bounds
- top: Coordinate of top side of bounds
- right: Coordinate of right side of bounds
- bottom: Coordinate of bottom side of bounds
- width: Output image pixel width in pixels
- height: Output image pixel height in pixels
Meta
JSON format
{
"bbox": {
"left": 524161.0500020641,
"bottom": 7590643.169290178,
"right": 805691.242609148,
"top": 7853460.758413694
},
"image": { "width": 408, "height": 380 },
"color": "hsl(0, 0%, 70%)",
"strokeWidth": 0.5,
"crs": "urn:ogc:def:crs:EPSG::32633"
}