-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from appelmar/curvilinear
This pull request mainly adds: - support for images with spatial reference as geolocation arrays (including curvilinear grids) - window_space operation
- Loading branch information
Showing
26 changed files
with
1,845 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#! /bin/sh | ||
# Guess values for system-dependent variables and create Makefiles. | ||
# Generated by GNU Autoconf 2.71 for gdalcubes 0.6.4. | ||
# Generated by GNU Autoconf 2.71 for gdalcubes 0.6.9999. | ||
# | ||
# Report bugs to <[email protected]>. | ||
# | ||
|
@@ -610,8 +610,8 @@ MAKEFLAGS= | |
# Identity of this package. | ||
PACKAGE_NAME='gdalcubes' | ||
PACKAGE_TARNAME='gdalcubes' | ||
PACKAGE_VERSION='0.6.4' | ||
PACKAGE_STRING='gdalcubes 0.6.4' | ||
PACKAGE_VERSION='0.6.9999' | ||
PACKAGE_STRING='gdalcubes 0.6.9999' | ||
PACKAGE_BUGREPORT='[email protected]' | ||
PACKAGE_URL='' | ||
|
||
|
@@ -1279,7 +1279,7 @@ if test "$ac_init_help" = "long"; then | |
# Omit some internal or obsolete options to make the list less imposing. | ||
# This message is too long to be a string in the A/UX 3.1 sh. | ||
cat <<_ACEOF | ||
\`configure' configures gdalcubes 0.6.4 to adapt to many kinds of systems. | ||
\`configure' configures gdalcubes 0.6.9999 to adapt to many kinds of systems. | ||
Usage: $0 [OPTION]... [VAR=VALUE]... | ||
|
@@ -1341,7 +1341,7 @@ fi | |
|
||
if test -n "$ac_init_help"; then | ||
case $ac_init_help in | ||
short | recursive ) echo "Configuration of gdalcubes 0.6.4:";; | ||
short | recursive ) echo "Configuration of gdalcubes 0.6.9999:";; | ||
esac | ||
cat <<\_ACEOF | ||
|
@@ -1439,7 +1439,7 @@ fi | |
test -n "$ac_init_help" && exit $ac_status | ||
if $ac_init_version; then | ||
cat <<\_ACEOF | ||
gdalcubes configure 0.6.4 | ||
gdalcubes configure 0.6.9999 | ||
generated by GNU Autoconf 2.71 | ||
Copyright (C) 2021 Free Software Foundation, Inc. | ||
|
@@ -1595,7 +1595,7 @@ cat >config.log <<_ACEOF | |
This file contains any messages produced by compilers while | ||
running configure, to aid debugging if configure makes a mistake. | ||
It was created by gdalcubes $as_me 0.6.4, which was | ||
It was created by gdalcubes $as_me 0.6.9999, which was | ||
generated by GNU Autoconf 2.71. Invocation command line was | ||
$ $0$ac_configure_args_raw | ||
|
@@ -4382,7 +4382,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
# report actual input values of CONFIG_FILES etc. instead of their | ||
# values after options handling. | ||
ac_log=" | ||
This file was extended by gdalcubes $as_me 0.6.4, which was | ||
This file was extended by gdalcubes $as_me 0.6.9999, which was | ||
generated by GNU Autoconf 2.71. Invocation command line was | ||
CONFIG_FILES = $CONFIG_FILES | ||
|
@@ -4437,7 +4437,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ | |
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | ||
ac_cs_config='$ac_cs_config_escaped' | ||
ac_cs_version="\\ | ||
gdalcubes config.status 0.6.4 | ||
gdalcubes config.status 0.6.9999 | ||
configured by $0, generated by GNU Autoconf 2.71, | ||
with options \\"\$ac_cs_config\\" | ||
|
@@ -4998,4 +4998,3 @@ printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 | |
fi | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
library(gdalcubes) | ||
v = cube_view(srs = "EPSG:4326", extent = list(left = 5, right = 15, bottom = 48, top = 58, | ||
t0 = "2021-01-01", t1 = "2021-12-31"), dt = "P365D", | ||
dx = 1, dy = 1) | ||
v | ||
|
||
gdalcubes:::.raster_cube_dummy(v, 1, 1.0) |> | ||
window_space("max(band1)","min(band1)", window = c(5,5)) |> | ||
as_array() -> x | ||
|
||
expect_true(all(x == 1)) | ||
|
||
|
||
|
||
gdalcubes:::.raster_cube_dummy(v, 1, 1.0) |> | ||
window_space("count(band1)", window = c(3,3)) |> | ||
as_array() -> x | ||
Xtrue = matrix(9, 10,10) | ||
Xtrue[c(1,10),] = Xtrue[,c(1,10)] = 6 | ||
Xtrue[1,1] = Xtrue[1,10] = Xtrue[10,1] = Xtrue[10,10] = 4 | ||
expect_true(all(x[1,1,,] == Xtrue)) | ||
|
||
|
||
K = matrix(1, 3,3) | ||
|
||
gdalcubes:::.raster_cube_dummy(v, 1, 1.0) |> | ||
window_space(kernel = K, pad = 0) |> | ||
as_array() -> x | ||
expect_true(all(x[1,1,,] == Xtrue)) | ||
|
||
gdalcubes:::.raster_cube_dummy(v, 1, 1.0) |> | ||
window_space(kernel = K, pad = "REFLECT") |> | ||
as_array() -> x | ||
expect_true(all(x == 9)) | ||
|
||
|
||
gdalcubes:::.raster_cube_dummy(v, 1, 1.0) |> | ||
window_space(kernel = K, pad = "REPLICATE") |> | ||
as_array() -> x | ||
expect_true(all(x == 9)) | ||
|
||
|
||
|
||
|
||
gdalcubes:::.raster_cube_dummy(v, 1, 1.0, chunking = c(1,3,2)) |> | ||
window_space(kernel = K, pad = "REPLICATE") |> | ||
as_array() -> x | ||
expect_true(all(x == 9)) | ||
|
Oops, something went wrong.