Opened 9 years ago
Last modified 8 years ago
#1312 closed defect
Petascope_Set correct bounding box to Rasql — at Version 3
Reported by: | Bang Pham Huu | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 9.3 |
Component: | petascope | Version: | development |
Keywords: | Cc: | Dimitar Misev, Vlad Merticariu | |
Complexity: | Medium |
Description (last modified by )
Current, bounding box only support to add native coordinates and CRS (e.g: Lat, Long, 4326), when transform to another CRS like 3857. It still set the bounding box with the native values.
WCPS query
for c in (mean_summer_airtemp) return encode( crsTransform(c[Lat(-40:-25), Long(120:130)] , { Lat:"http://www.opengis.net/def/crs/EPSG/0/3857", Long:"http://www.opengis.net/def/crs/EPSG/0/3857"}, {}), "tiff")
Rasql query
select encode( project( c[160:360,320:620], "120.0,-40.0,130.0,-25.0", "EPSG:4326", "EPSG:3857" ), "GTiff", "xmin=120.0;xmax=130.0;ymin=-40.0;ymax=-25.0;crs=EPSG:4326") from mean_summer_airtemp AS c where oid(c)=2049
All of values in bounding box of Rasql query should be changed to coordinates in 3857, alo with crs=EPSG:3857.
It is set correct in extend() with bounding box, but not in scale() also
# Extend test: for c in (mean_summer_airtemp)return encode(extend( c[Lat(-40:-25), Long(120:130)], {Lat :"http://www.opengis.net/def/crs/EPSG/0/4326" ( -45:35 ), Long: "http://www.opengis.net/def/crs/EPSG/0/4326" (125:135) }) , "tiff") select encode(extend(c[160:360,320:620],[260:460,-880:720]), "GTiff", "xmin=125.0;xmax=135.0;ymin=-45.0;ymax=35.0;crs=EPSG:4326") from mean_summer_airtemp AS c where oid(c)=2049 # Scale test: for c in (mean_summer_airtemp)return encode(scale( c[Lat(-40:-25), Long(120:130)], {Lat :"http://www.opengis.net/def/crs/EPSG/0/4326" ( -45:35 ), Long: "http://www.opengis.net/def/crs/EPSG/0/4326" (125:135) }) ,"tiff") select encode(scale( c[160:360,320:620], [260:460,-880:720] ), "GTiff", "xmin=120.0;xmax=130.0;ymin=-40.0;ymax=-25.0;crs=EPSG:4326") from mean_summer_airtemp AS c where oid(c)=2049
Change History (2)
comment:2 by , 9 years ago
comment:3 by , 9 years ago
Description: | modified (diff) |
---|---|
Summary: | Petascope_Set correct bounding box when project to not nativeCRS → Petascope_Set correct bounding box to Rasql |
Note:
See TracTickets
for help on using tickets.
Can you please update the ticket subject, and put all collected information in the ticket description?