On Wed, Mar 21, 2018 at 2:47 PM, Matthew Campbell <[email protected]> wrote:
> Under normal circumstances, we use the FMRC capabilities provided by
> netCDF-java via featureCollection XML files to aggregate datasets with
> different runtimes (these datasets are themselves NCML aggregations of .nc
> files). When opening such a featureCollection in java, we get a dataset
> that that has a dimension variable named ‘run’ for the different run times,
> and everything works beautifully. However, I’m working on a project where
> we have a custom runtime dimension configured as “*reference_time*” which
> is a requirement from our customer. When the netCDF plugin encounters the
> metadata configuration for the custom dimension in the coverage
> configuration it attempts to look up a “*reference_time*” dimension in
> the netCDF dataset. In this case, the plugin will not locate the correct
> runtime dimensions and throws a null pointer exception in some WCS / WMS
> operations. The exceptions in the service occur because Geoserver assumes
> that coverages are configured a certain way.
>
> I am proposing a design for Geoserver to allow the user to define what the
> custom dimension name is, thereby giving the implementers greater
> flexibility and enable a way to get past the null pointer exception as well
> as allowing Buisness level standards for naming conventions with their
> interfaces.
>
> I envision a setting in the dimension tab when viewing a published layer
> which will map custom dimension names available in the dataset to a user
> defined string. This string would be stored in the coverage.xml under the
> custom dimension element as an advertised name, perhaps as an example: “
> *<publishedName>run</publishedName>*”. When Geoserver then computes the
> custom dimension (and here is where I’m not sure it should ultimately be
> done) for example, when determining the “dimensionName” (as used in
> AbstractDefaultValueSelectonStrategy.java
> <https://github.com/geoserver/geoserver/blob/55c4740060eb2b8809ae935a510ac83eeb923313/src/wms/src/main/java/org/geoserver/wms/dimension/AbstractDefaultValueSelectionStrategy.java>)
> Geoserver will first check for the “<publishedName>” element and use it’s
> contents henceforth, otherwise default to the custom dimension name as
> usual.
>
Given the way things are configured, maybe you need to do the opposite,
keep the UI you propose, but key dimensions in the metadata map using the
published name, and have in the dimension configuration a "nativeName"
instead. This also matches how layer renaming facilities work, the layer
has the published name, inside ResourceInfo there is a nativeName.
Overall this is a configuration change, so besides resourcing the actual
coding, you'll have to write a GSIP, see
http://docs.geoserver.org/latest/en/developer/policies/gsip.html
The pull request should follow these rules:
https://github.com/geoserver/geoserver/blob/master/CONTRIBUTING.md
About where the computation happens, most of the action happens in methods
around this class:
https://github.com/geoserver/geoserver/blob/master/src/wms/src/main/java/org/geoserver/wms/WMS.java
Hope this helps, if you have any question just ask here :-)
Cheers
Andrea
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
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.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel