This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
commit a9dfd7123649995f141f1e5dbee184a07a273c82 Author: Martin Desruisseaux <[email protected]> AuthorDate: Sat Jan 19 16:42:07 2019 +0100 Use more verbose Category names if available, and declare explicitly a name for the SampleDimension. --- .../src/main/java/org/apache/sis/storage/netcdf/GridResource.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/GridResource.java b/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/GridResource.java index a7c7ccd..53c410a 100644 --- a/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/GridResource.java +++ b/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/GridResource.java @@ -309,7 +309,9 @@ final class GridResource extends AbstractGridResource implements ResourceOnFileS } } } - builder.addQuantitative(data.getName(), range, mt, data.getUnit()); + String name = data.getDescription(); + if (name == null) name = data.getName(); + builder.addQuantitative(name, range, mt, data.getUnit()); } /* * Adds the "missing value" or "fill value" as qualitative categories. If a value has both roles, use "missing value" @@ -345,7 +347,7 @@ final class GridResource extends AbstractGridResource implements ResourceOnFileS builder.addQualitative(name, n, n); } } - return builder.build(); + return builder.setName(data.getName()).build(); } /**
