3 | | '''Update:''' The problem only happens if use a coverage with multibands (ranges) and encode all of these ranges in NetCDF. In this example: test_projection has 3 bands (Red, Green, Blue). |
| 3 | Example with 1 band NetCDF from 1 band GeoTIFF. |
| 4 | {{{ |
| 5 | gdal_translate '/home/rasdaman/tmp/test_projection/mean_summer_airtemp |
| 6 | /irr_cub2_b1.tif' |
| 7 | -of NetCDF output.nc |
| 8 | }}} |
| 9 | |
| 10 | Metasdata |
| 11 | {{{ |
| 12 | Driver: netCDF/Network Common Data Format |
| 13 | Files: output.nc |
| 14 | Size is 63, 36 |
| 15 | Coordinate System is: |
| 16 | PROJCS["WGS 84 / UTM zone 33N", |
| 17 | GEOGCS["WGS 84", |
| 18 | DATUM["WGS_1984", |
| 19 | SPHEROID["WGS 84",6378137,298.257223563, |
| 20 | AUTHORITY["EPSG","7030"]], |
| 21 | AUTHORITY["EPSG","6326"]], |
| 22 | PRIMEM["Greenwich",0], |
| 23 | UNIT["degree",0.0174532925199433], |
| 24 | AUTHORITY["EPSG","4326"]], |
| 25 | }}} |
| 26 | |
| 27 | |
| 28 | if use 2 bands GeoTIFF to transform to NetCDF it will lost these information |
| 29 | |
| 30 | {{{ |
| 31 | gdal_translate '/home/rasdaman/test_server/NEW/rasdaman/systemtest |
| 32 | /testcases_services/test_wcs/testdata/irr_cube_2/AUT-PM10_2008-01-01.geo.tif' |
| 33 | -of NetCDF output.nc |
| 34 | }}} |
7 | | Describe Coverage metadata: https://www.diffchecker.com/9uk36tkw |
8 | | }}} |
9 | | |
10 | | |
11 | | If only select 1 band (Red) then it will have the full geo-referenced metadata. |
12 | | |
13 | | '''WCPS query with metadata (select 1 band)''' |
14 | | |
15 | | |
16 | | {{{ |
17 | | for c in (test_projection), d in (eobstest) |
18 | | return encode(crsTransform((c.Red), |
19 | | { Lat:"http://www.opengis.net/def/crs/EPSG/0/3542", Long:"http://www.opengis.net/def/crs/EPSG/0/3542"}, {}), "netcdf") |
20 | | }}} |
21 | | |
22 | | |
23 | | '''WCPS query without metadata (multibands)''' |
24 | | |
25 | | {{{ |
26 | | for c in (test_projection), d in (test_projection) |
27 | | return encode(crsTransform((c + d), |
28 | | { Lat:"http://www.opengis.net/def/crs/EPSG/0/3542", Long:"http://www.opengis.net/def/crs/EPSG/0/3542"}, {}), "netcdf") |
29 | | }}} |
30 | | |
31 | | '''or not use crsTransform() with sample data: irr_cube_2''' |
32 | | |
33 | | {{{ |
34 | | for c in (irr_cube_2) |
35 | | return encode(c[ansi(148654)], "netcdf") |
36 | | }}} |
37 | | |
38 | | |
39 | | |
40 | | {{{ |
41 | | Driver: netCDF/Network Common Data Format |
42 | | Files: /home/rasdaman/Downloads/ows(126) |
43 | | Size is 512, 512 |
50 | | SUBDATASET_1_NAME=NETCDF:"/home/rasdaman/Downloads/ows(126)":Band1 |
51 | | SUBDATASET_1_DESC=[260x261] Band1 (8-bit integer) |
52 | | SUBDATASET_2_NAME=NETCDF:"/home/rasdaman/Downloads/ows(126)":Band2 |
53 | | SUBDATASET_2_DESC=[260x261] Band2 (8-bit integer) |
54 | | SUBDATASET_3_NAME=NETCDF:"/home/rasdaman/Downloads/ows(126)":Band3 |
55 | | SUBDATASET_3_DESC=[260x261] Band3 (8-bit integer) |
| 45 | SUBDATASET_1_NAME=NETCDF:"/home/rasdaman/tmp/test_projection/mean_summer_airtemp/output.nc":Band1 |
| 46 | SUBDATASET_1_DESC=[36x63] Band1 (32-bit floating-point) |
| 47 | SUBDATASET_2_NAME=NETCDF:"/home/rasdaman/tmp/test_projection/mean_summer_airtemp/output.nc":Band2 |
| 48 | SUBDATASET_2_DESC=[36x63] Band2 (32-bit floating-point) |