Opened 6 years ago

Closed 6 years ago

#1778 closed defect (invalid)

Rasql_Update 3d map mosaic doesn't import data properly

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

Description

Use this 4 separated GeoTIFF files http://rasdaman.org/browser/systemtest/testcases_services/test_all_wcst_import/test_data/map_mosaic to import as 3D regular time series with this ingredient file:

{
  "config": {
    "service_url": "http://localhost:8080/rasdaman/ows",
    "tmp_directory": "/tmp/",
    "default_crs": "http://abc.secore.net/def/crs/EPSG/0/4326",
    "mock": false,
    "automated": true,
    "track_files": false,
    "retry" : false
  },
  "input": {
    "coverage_id": "test__mapmosaic_pyramid3d",
    "paths": [
      "*.tif"
    ]
  },
  "recipe": {
    "name": "time_series_regular",
    "options": {
      "time_start": "2012-12-02T20:12:02",
      "time_format": "auto",
      "time_crs": "http://localhost:8080/def/crs/OGC/0/AnsiDate",
      "time_step": "2 days 10 minutes 3 seconds",
      "tiling": "ALIGNED [0:1000, 0:1000, 0:2]"
    }
  }
}

Then, you got the rasql queries from Petascope for each file:

Request: 'UPDATE test__mapmosaic_pyramid3d SET test__mapmosaic_pyramid3d[0:239,0:239,0] ASSIGN shift(decode(<[0:0] 1c>, "GDAL", "{\"filePaths\":[\"/home/rasdaman/rasdaman_community/rasdaman/systemtest/testcases_services/test_all_wcst_import/test_data/map_mosaic/waxlake1.tif\"]}"), [0,0]) WHERE oid(test__mapmosaic_pyramid3d) = 86529'... parsing... checking semantics... evaluating... ok
 [INFO] - 2018-06-04 10:39:49,046: ok

 [INFO] - 2018-06-04 10:39:49,151: Request: 'UPDATE test__mapmosaic_pyramid3d SET test__mapmosaic_pyramid3d[0:239,240:479,0] ASSIGN shift(decode(<[0:0] 1c>, "GDAL", "{\"filePaths\":[\"/home/rasdaman/rasdaman_community/rasdaman/systemtest/testcases_services/test_all_wcst_import/test_data/map_mosaic/waxlake2.tif\"]}"), [0,240]) WHERE oid(test__mapmosaic_pyramid3d) = 86529'... parsing... checking semantics... evaluating... ok
 [INFO] - 2018-06-04 10:39:49,153: ok

 [INFO] - 2018-06-04 10:39:49,248: Request: 'UPDATE test__mapmosaic_pyramid3d SET test__mapmosaic_pyramid3d[240:479,0:239,1] ASSIGN shift(decode(<[0:0] 1c>, "GDAL", "{\"filePaths\":[\"/home/rasdaman/rasdaman_community/rasdaman/systemtest/testcases_services/test_all_wcst_import/test_data/map_mosaic/waxlake3.tif\"]}"), [240,0]) WHERE oid(test__mapmosaic_pyramid3d) = 86529'... parsing... checking semantics... evaluating... ok
 [INFO] - 2018-06-04 10:39:49,252: ok

 [INFO] - 2018-06-04 10:39:49,328: Request: 'UPDATE test__mapmosaic_pyramid3d SET test__mapmosaic_pyramid3d[240:479,240:479,2] ASSIGN shift(decode(<[0:0] 1c>, "GDAL", "{\"filePaths\":[\"/home/rasdaman/rasdaman_community/rasdaman/systemtest/testcases_services/test_all_wcst_import/test_data/map_mosaic/waxlake4.tif\"]}"), [240,240]) WHERE oid(test__mapmosaic_pyramid3d) = 86529'... parsing... checking semantics... evaluating... ok

The files and grid domains are correctly separated. However, the result of select encode() as PNG shows it doesn't work properly for importing data in these cases.

SELECT encode(c[0:479,0:479,0], "image/png" , "{\"geoReference\":{\"crs\":\"EPSG:32615\",\"bbox\":{\"xmin\":618885,\"ymin\":3228195,\"xmax\":690885,\"ymax\":3300195}}}") FROM test__mapmosaic_pyramid3d AS c

Result is wrong: https://imgur.com/BLVaa2L

Result is expected: https://imgur.com/ju20Qrh as importing 2D map mosaic ingredient file:

 [INFO] - 2018-06-04 11:28:05,240: Request: 'UPDATE test_waxlake SET test_waxlake[0:239,0:239] ASSIGN shift(decode(<[0:0] 1c>, "GDAL", "{\"filePaths\":[\"/home/rasdaman/rasdaman_community/rasdaman/systemtest/testcases_services/test_all_wcst_import/test_data/map_mosaic/waxlake1.tif\"]}"), [0,0]) WHERE oid(test_waxlake) = 87041'... parsing... checking semantics... evaluating... ok
 [INFO] - 2018-06-04 11:28:05,243: ok

 [INFO] - 2018-06-04 11:28:05,336: Request: 'UPDATE test_waxlake SET test_waxlake[0:239,240:479] ASSIGN shift(decode(<[0:0] 1c>, "GDAL", "{\"filePaths\":[\"/home/rasdaman/rasdaman_community/rasdaman/systemtest/testcases_services/test_all_wcst_import/test_data/map_mosaic/waxlake2.tif\"]}"), [0,240]) WHERE oid(test_waxlake) = 87041'... parsing... checking semantics... evaluating... ok
 [INFO] - 2018-06-04 11:28:05,341: ok

 [INFO] - 2018-06-04 11:28:05,420: Request: 'UPDATE test_waxlake SET test_waxlake[240:479,0:239] ASSIGN shift(decode(<[0:0] 1c>, "GDAL", "{\"filePaths\":[\"/home/rasdaman/rasdaman_community/rasdaman/systemtest/testcases_services/test_all_wcst_import/test_data/map_mosaic/waxlake3.tif\"]}"), [240,0]) WHERE oid(test_waxlake) = 87041'... parsing... checking semantics... evaluating... ok
 [INFO] - 2018-06-04 11:28:05,422: ok

 [INFO] - 2018-06-04 11:28:05,517: Request: 'UPDATE test_waxlake SET test_waxlake[240:479,240:479] ASSIGN shift(decode(<[0:0] 1c>, "GDAL", "{\"filePaths\":[\"/home/rasdaman/rasdaman_community/rasdaman/systemtest/testcases_services/test_all_wcst_import/test_data/map_mosaic/waxlake4.tif\"]}"), [240,240]) WHERE oid(test_waxlake) = 87041'... parsing... checking semantics... evaluating... ok


Select query:

SELECT encode(c, "image/png" , "{\"geoReference\":{\"crs\":\"EPSG:32615\",\"bbox\":{\"xmin\":618885,\"ymin\":3228195,\"xmax\":690885,\"ymax\":3300195}}}") FROM test_waxlake AS c

Change History (1)

comment:1 by Bang Pham Huu, 6 years ago

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