Opened 6 years ago

Closed 6 years ago

#1789 closed defect (fixed)

WCPS_Fit output geo bounds from WCPS trimming should regard to negative grid origin

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

Description

From problem in Rasdaman user group: https://groups.google.com/forum/#!topic/rasdaman-users/X9WrCeZhnyM

The problem is a coverage was imported with negative grid domain (map mosaic), e.g:

rasql -q 'select sdom(c) from l2a_b02 as c' --out string
rasql: rasdaman query tool v1.0, rasdaman 9.6.0.
Opening database RASBASE at localhost:7001... ok.
Executing retrieval query... ok.
Query result collection has 1 element(s):
  Result element 1: [0:30977,-40002:10979,0:2]

with its geo domains:

  <lowerCorner>300000 4790220 "2017-11-22T10:53:41.000Z"</lowerCorner>
  <upperCorner>609780 5300040 "2018-03-22T10:50:21.000Z"</upperCorner>

And user does a trimming subset in WCPS, e.g:

$b[E(365000:385000), N(4820000:4840000)

However, from the source code http://rasdaman.org/browser/applications/petascope/petascope_main/src/main/java/petascope/wcps/metadata/service/SubsetParsingService.java#L313, this always convert to grid bound with origin = 0, hence the translated grid bounds for the N axis is: 46004:48003 which is much greater than the imported grid domain -40002:10979 and it causes other trimming/slicing (e.g: clip()) on this axis will be wrong grid coordinates.

Change History (1)

comment:1 by Bang Pham Huu, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.