[Geoserver-users] NetCDF-out time & elevation dimension question

Hey all,
I think I stumbled across a bug in the time & elevation dimension handling of the NetCDF-out extension. Our source data contains elevations in Pascals and so we configured the elevation dimension accordingly under the "Dimensions" tab. When I execute a DescribeCoverage request for the coverage, the Elevation domain is correctly labled with uom="Pa". However, when I execute a getCoverage request, the response data defines the elevation units as "m". Looking through the source code I think the bug may be caused by something as trivial as the capitalization (or lack thereof) used for the enabledDimensions key in org.geoserver.wcs2_0.response.WCSDimensionsSubsetHelper.java. The "setupDimensions()" method calls "setupDimensionBean()" for both time & elevation dimensions using all caps. As I step through the code in the debugger, my enabledDimensions map contains both "time" and "elevation" as lower case keys. The result is that the dimension is not retrieved from the map of enabledDimensions and the "fallback" case is hit which uses default values for unit type and symbol.

I have tried modifying the coverage.xml to use capital names for time & elevation dimensions, but this causes GeoServer to ignore the dimensions altogether. Am I configuring my GeoServer incorrectly or is this an actual bug?

Also, and this is a slightly unrelated question, is there a way to provide additional attributes to a dimensions output? As stated before, my source data contains elevation info in Pascals. I would like to output the following attributes under my elevation dimensions if possible:
positive = "down"
long_name = "Isobaric surface"
standard_name = "air_pressure"

Thanks,

Kevin M. Weiss
Software Engineer
CRITICAL NETWORKS / HARRIS CORPORATION
harris.com / kevin.weiss@anonymised.com

Hi Kevin,
Answers are inlined

···

On Tue, Jun 7, 2016 at 4:24 PM, kweiss01@anonymised.com <kweiss01@anonymised.com40…> wrote:

Hey all,
I think I stumbled across a bug in the time & elevation dimension handling of the NetCDF-out extension. Our source data contains elevations in Pascals and so we configured the elevation dimension accordingly under the “Dimensions” tab. When I execute a DescribeCoverage request for the coverage, the Elevation domain is correctly labled with uom=“Pa”. However, when I execute a getCoverage request, the response data defines the elevation units as “m”. Looking through the source code I think the bug may be caused by something as trivial as the capitalization (or lack thereof) used for the enabledDimensions key in org.geoserver.wcs2_0.response.WCSDimensionsSubsetHelper.java. The “setupDimensions()” method calls “setupDimensionBean()” for both time & elevation dimensions using all caps. As I step through the code in the debugger, my enabledDimensions map contains both “time” and “elevation” as lower case keys. The result is that the dimension is not retrieved from the map of enabledDimensions and the “fallback” case is hit which uses default values for unit type and symbol.

I have tried modifying the coverage.xml to use capital names for time & elevation dimensions, but this causes GeoServer to ignore the dimensions altogether. Am I configuring my GeoServer incorrectly or is this an actual bug?

We should take a look on this but I think it’s a bug.
Could you open a JIRA for this?
I wonder if the code should use the org.geoserver.catalog.ResourceInfo IDs instead. If you are familiar with the code and you would like to test that suggestion you can also consider setting up a PullRequest with the fix if it works.

Also, and this is a slightly unrelated question, is there a way to provide additional attributes to a dimensions output?

At the moment this is not supported.
Only global attributes addition is supported in the NetCDF Output tab.
There, you can also deal with CF compliant variable names for which long_name and standard_name attributes are populated. However they refers to data variables, not dimensions.

Hope this helps.
Cheers,
Daniele

As stated before, my source data contains elevation info in Pascals. I would like to output the following attributes under my elevation dimensions if possible:
positive = “down”
long_name = “Isobaric surface”
standard_name = “air_pressure”

Thanks,

Kevin M. Weiss
Software Engineer
CRITICAL NETWORKS / HARRIS CORPORATION
harris.com / kevin.weiss@anonymised.com0…


What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==

GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Daniele Romagnoli
Senior Software Engineer

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.