Opened 7 years ago
Closed 7 years ago
#1755 closed defect (fixed)
Petascope_WMS should do extend before scaling for GetMap request result
Reported by: | Bang Pham Huu | Owned by: | Bang Pham Huu |
---|---|---|---|
Priority: | major | Milestone: | 9.6 |
Component: | petascope | Version: | development |
Keywords: | Cc: | Dimitar Misev, Vlad Merticariu | |
Complexity: | Medium |
Description
Current, with GetMap request, Petascope only does the subset (from bbox parameter) then scale result (from width, height parameters).
e.g:
http://localhost:8080/rasdaman/ows? service=WMS&request=GetMap&version=1.3.0&transparent=TRUE&layers=test_mean_summer_airtemp&styles=&format=image/png &width=256&height=256&crs=EPSG:4326&bbox=-54,144,-18,180
translated to Rasql
SELECT ENCODE(Scale(c0[640:1360,180:900], [0:255, 0:255] ), "png", "nodata=0") FROM test_mean_summer_airtemp as c0
However, because of sdom(c0) only (0:860, 0:710)
, then the result is cropped with sdom = (640:860, 180:710)
and scale this output will return a stretched image incorrectly.
This is the reason why WebWorldWind doesn't show WMS result from Petascope properly (the image here https://imgur.com/a/s3ROADE
shows the edge tiles of coverage are out of the coverage's domain) on the globe.
To fix this problem, it needs to use Extend() before Scale(), the generated Rasql query should be:
SELECT ENCODE(Scale( Extend( c0[640:1360,180:900], [640:1360,180:900]), [0:255, 0:255] ), "png", "nodata=0") FROM test_mean_summer_airtemp as c0
Then, the WMS result from Petascope will be displayed correctly on WebWorldWind at any zoom level https://imgur.com/a/CX967ix