#1312 closed defect (fixed)

Petascope_Set correct bounding box to Rasql

Reported by: bphamhuu Owned by: bphamhuu
Priority: major Milestone: 9.3
Component: petascope Version: development
Keywords: Cc: dmisev, vmerticariu
Complexity: Medium

Description (last modified by bphamhuu)

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 Changed 17 months ago by dmisev

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

comment:3 Changed 17 months ago by bphamhuu

  • Description modified (diff)
  • Summary changed from Petascope_Set correct bounding box when project to not nativeCRS to Petascope_Set correct bounding box to Rasql

comment:4 Changed 16 months ago by bphamhuu

  • Description modified (diff)
  • Milestone changed from 9.2 to 9.3
  • Owner set to bphamhuu
  • Status changed from new to accepted

comment:5 Changed 15 months ago by bphamhuu

  • Resolution set to fixed
  • Status changed from accepted to closed

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.