Opened 9 years ago

Closed 8 years ago

#1312 closed defect (fixed)

Petascope_Set correct bounding box to Rasql

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 9.3
Component: petascope Version: development
Keywords: Cc: Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description (last modified by Bang Pham Huu)

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.

for c in (eobstest)  return encode(
crsTransform(c[t(0), Lat(0:20), Long(25:30)], 
{Lat:"http://localhost:8080/def/crs/EPSG/0/4269", Long:"http://localhost:8080/def/crs/EPSG/0/4269"}, {})
, "tiff")

Update When use crsTransform() in Rasql query it will use the bounding box of inputCrs in project() operation and transform to outputCrs. E.g: (4326 to 4269). So it should not need to change and add anything in bounding box as parameters for encoding.

select encode(project( c[0,0:10,111:151], 
"25.0,0.0,30.0,20.0", "EPSG:4326", "EPSG:4269" ), "GTiff",

***  "xmin=25.0;xmax=30.0;ymin=0.0;ymax=20.0;crs=EPSG:4326" ****

) from eobstest AS c where oid(c)=1537

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 (4)

comment:2 by Dimitar Misev, 9 years ago

Can you please update the ticket subject, and put all collected information in the ticket description?

comment:3 by Bang Pham Huu, 9 years ago

Description: modified (diff)
Summary: Petascope_Set correct bounding box when project to not nativeCRSPetascope_Set correct bounding box to Rasql

comment:4 by Bang Pham Huu, 9 years ago

Description: modified (diff)
Milestone: 9.29.3
Owner: set to Bang Pham Huu
Status: newaccepted

comment:5 by Bang Pham Huu, 8 years ago

Resolution: fixed
Status: acceptedclosed

This ticket was fixed in patch ticket 1188, it will set the bounding box with crsTransform() according to the outputCrs (e.g: 3857), close ticket.

Note: See TracTickets for help on using tickets.