Opened 8 years ago

Closed 7 years ago

#1406 closed defect (fixed)

WCPS1.5_Fit subsets to sample space

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)

In WCPS1.5, we have not set the bounding box correctly (i.e: just pass it as user request in query), this will lead to this problem when pixel size is not consistent (http://earthserver.eu/trac2/ticket/144).

In Wcs there is a method: fitToSampleSpace() to fix this bounding box to sample (i.e: it can be increased or decreased from requested subsets to the coordinates which are fit) and need to be used also in WCPS 1.5.

check the result with GDALwarp http://rasdaman.org/ticket/1325


Change History (3)

comment:1 by Bang Pham Huu, 8 years ago

Description: modified (diff)

comment:2 by Bang Pham Huu, 8 years ago

So there is 2 types of pixel origin: https://docs.oracle.com/database/121/GEORS/img/cell_cs_types.gif

+ Pixel center (Petascope)
+ Pixel origin corner (GDAL http://wiki.orfeo-toolbox.org/index.php/Pixel_origin_convention )

and according to the formula in https://docs.oracle.com/database/121/GEORS/geor_intro.htm#GEORS951
they will have different values in some cases, so compare Petascope output sizes and GDAL output sizes is not necessary.

This ticket will need to follow the formula in the link above for pixel center:


   + In center-based cell space, coordinate (x, y) is mapped to (I,J) 
 as long as I-0.5 <= x < I+0.5 and J-0.5 <= y < J+0.5.

   + In upperleft-based cell space, coordinate (x, y) is mapped to cell (I,J)
 as long as I <= x < I+1.0 and J <= y < J+1.0.

For example, sub-cell coordinate (0.3, 0.3) has the same integer 
cell coordinate (0,0) in both coordinate systems, while (0.3,0.6) means (0,1) 
in center-based cell space but means (0,0) in upperleft-based cell space.

It is really clear and should be added to some wiki page.

comment:3 by Bang Pham Huu, 7 years ago

Resolution: fixed
Status: newclosed

close as patch is accepted.

Note: See TracTickets for help on using tickets.