Opened 7 years ago

Last modified 7 years ago

#1676 closed defect

rasdapy: arrays have wrong dimension and wrong sdom — at Version 1

Reported by: Dimitar Misev Owned by: Bang Pham Huu
Priority: major Milestone: 9.5
Component: applications Version: development
Keywords: Cc: Peter Baumann, Vlad Merticariu
Complexity: Medium

Description (last modified by Bang Pham Huu)

Executing a query with RasdaPy like select encode(mr2, "png") from mr2 results in a 3D array with size 22623 (number of cells).

This is wrong, the output from rasql is a 1D array with size 22624.

I'm not sure why the array is 3D at all (some hard-coded solution); the size bug is likely because rasdapy takes the upper bound from the sdom [0:22623] and doesn't add 1 to it when calculating the size.

the output of a 2D collection [0:2, 0:2] with 3 bands is returned as 3D array numpy ndarray from this query

rasql_query='select c from test_rasdapy_rgb as c'
data = ConfigManager.execute_read(rasql_query)
print data.to_array()


[[[[1 1 1]
   [1 1 1]
   [1 1 1]]

  [[1 1 1]
   [1 1 1]
   [1 1 1]]

  [[1 1 1]
   [1 1 1]
   [1 1 1]]]]

Change History (1)

comment:1 by Bang Pham Huu, 7 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.