Skip to content
This repository was archived by the owner on Dec 16, 2021. It is now read-only.

paranlee/spring-cloud-gateway-wms-bbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Cloud Gateway with WMS BBOX Dynamic Routing

Request parameter based dynamic routing with BBOX Coordinate on WMS Protocol.

Example Description

When xmin: 20000000.0 then, Route to http://localhost:8000.

 $ curl "http://localhost:8080/geoserver/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=myLayer%3AMyGrid&TILED=true&viewparams=msrDate%3A20210401%3Bmsr%3AA%3Bmnc%3A1%3BkpiValue%3Apoor_sinr%3A%3Anumeric%3Bterm%3Amm%3BuseMsrDate%3A1%3BuseMsr%3A1%3BuseMnc%3A1%3BuseKpiValue%3A1%3BuseTerm%3A1%3BgpotSize%3A150%3BpartxMin%3A1414%3BpartxMax%3A1414%3Bminx%3A14146114.833080746%3Bminy%3A4489366.42764472%3Bmaxx%3A14147815.556960093%3Bmaxy%3A4491067.151524066%3B&env=c1%3A%23ff0000%3Bv1%3A1%3B&WIDTH=256&HEIGHT=256&CRS=EPSG%3A3857&STYLES=&BBOX=20000000.0%2C4489366.42764472%2C14147815.556960093%2C4491067.151524066"
 $ python3 -m http.server Serving HTTP on :: port 8000 (http://[::]:8000/) ... ::ffff:127.0.0.1 - - [16/Sep/2021 10:08:22] "GET /geoserver/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%252Fpng&TRANSPARENT=true&LAYERS=myLayer%253AMyGrid&TILED=true&viewparams=msrDate%253A20210401%253Bmsr%253AA%253Bmnc%253A1%253BkpiValue%253Apoor_sinr%253A%253Anumeric%253Bterm%253Amm%253BuseMsrDate%253A1%253BuseMsr%253A1%253BuseMnc%253A1%253BuseKpiValue%253A1%253BuseTerm%253A1%253BgpotSize%253A150%253BpartxMin%253A1414%253BpartxMax%253A1414%253Bminx%253A14146114.833080746%253Bminy%253A4489366.42764472%253Bmaxx%253A14147815.556960093%253Bmaxy%253A4491067.151524066%253B&env=c1%253A%2523ff0000%253Bv1%253A1%253B&WIDTH=256&HEIGHT=256&CRS=EPSG%253A3857&STYLES=&BBOX=20000000.833080746%252C4489366.42764472%252C14147815.556960093%252C4491067.151524066 HTTP/1.1"

When xmin: 10000000.0 then, Route to http://localhost:8001.

 $ curl "http://localhost:8080/geoserver/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=myLayer%3AMyGrid&TILED=true&viewparams=msrDate%3A20210401%3Bmsr%3AA%3Bmnc%3A1%3BkpiValue%3Apoor_sinr%3A%3Anumeric%3Bterm%3Amm%3BuseMsrDate%3A1%3BuseMsr%3A1%3BuseMnc%3A1%3BuseKpiValue%3A1%3BuseTerm%3A1%3BgpotSize%3A150%3BpartxMin%3A1414%3BpartxMax%3A1414%3Bminx%3A14146114.833080746%3Bminy%3A4489366.42764472%3Bmaxx%3A14147815.556960093%3Bmaxy%3A4491067.151524066%3B&env=c1%3A%23ff0000%3Bv1%3A1%3B&WIDTH=256&HEIGHT=256&CRS=EPSG%3A3857&STYLES=&BBOX=10000000.833080746%2C4489366.42764472%2C14147815.556960093%2C4491067.151524066" 
 $ python3 -m http.server 8001 Serving HTTP on :: port 8001 (http://[::]:8001/) ... ::ffff:127.0.0.1 - - [16/Sep/2021 10:08:50] "GET /geoserver/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%252Fpng&TRANSPARENT=true&LAYERS=myLayer%253AMyGrid&TILED=true&viewparams=msrDate%253A20210401%253Bmsr%253AA%253Bmnc%253A1%253BkpiValue%253Apoor_sinr%253A%253Anumeric%253Bterm%253Amm%253BuseMsrDate%253A1%253BuseMsr%253A1%253BuseMnc%253A1%253BuseKpiValue%253A1%253BuseTerm%253A1%253BgpotSize%253A150%253BpartxMin%253A1414%253BpartxMax%253A1414%253Bminx%253A14146114.833080746%253Bminy%253A4489366.42764472%253Bmaxx%253A14147815.556960093%253Bmaxy%253A4491067.151524066%253B&env=c1%253A%2523ff0000%253Bv1%253A1%253B&WIDTH=256&HEIGHT=256&CRS=EPSG%253A3857&STYLES=&BBOX=10000000.833080746%252C4489366.42764472%252C14147815.556960093%252C4491067.151524066 HTTP/1.1"

At Window OS. then we can use Invoke-WebRequest on powershell.

Reference

A Web Map Service (WMS) is a standard protocol developed by the Open Geospatial Consortium

About

Request parameter based dynamic routing with BBOX Coordinate on WMS Protocol.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages