Hello Daniele,
In the meantime, I have gotten feedback from the netcdf-java community
that it is up to the user to put the aggregated files in the proper order.
That still leaves us with the lack of support for decreasing order in
geotools. I made a patch and added it to my aggregation support pull
request:
https://github.com/geotools/geotools/pull/1296/commits/88bc830e570d805a3cd338e2d8dc2abde8d4fab7
https://github.com/geotools/geotools/pull/1296
Regards
Niels
On 30-09-16 12:24, Niels Charlier wrote:
Hi Daniele,
Did you have any more comments on my last email? Would it make sense
to convert all Strings to Dates, and sort them , in order to find the
minimum and maximum? Isn't that a bit expensive (and repetitive) for
those two methods (you'd be doing it twice while doing it once
provides all info)? should we perhaps convert and sort all values once
and store them that way? But that may cause other unwanted side
effects if they are not in the same order any more as they are in the
netcdf-java objects (I am not that familiar with the code yet).
Actually, I am now thinking, the fault lies actually with both
geotools and netcdf-java.
* geotools should be taking into account that the time values might be
decreasing rather than increasing and should thus, just like
CoordinateAxis1D.java#L286
<https://github.com/Unidata/thredds/blob/5.0.0/cdm/src/main/java/ucar/nc2/dataset/CoordinateAxis1D.java#L286>,
take the maximum/minimum of both _extremes_.
* I think netcdf-java, *at the moment of aggregation, *should
aggregate the different files in the right order (be it increasing or
decreasing). I have sent an email to their email list about that.
Do you agree? What are your thoughts?
Regards
Niels
On 28-09-16 13:44, Niels Charlier wrote:
Yeah, still that implies that the order of the files specified in the
aggregation must be the same as the order of values for the
aggregated dimension inside those files themselves. I can find no
such specification though, but maybe I am missing it. It seems that
in the examples on
http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/ncml/Aggregation.html,
the files are always specified in order.
Otherwise we have to the rather expensive operation of going through
all of the Strings,convert them to Dates, then find the
minimum/maximum for each time getMimimum() and getMaximum() is
called. But then again, I wonder if we shouldn't do the same for
non-time values (regular CoordinateValue).
What do you think?
Regards
Niels
On 28-09-16 11:41, Daniele Romagnoli wrote:
Hi Niels,
On Wed, Sep 28, 2016 at 11:05 AM, Niels Charlier <ni...@scitus.be
<mailto:ni...@scitus.be>> wrote:
On 23-09-16 17:03, Daniele Romagnoli wrote:
I think that once the aggregation is in place, times can be in
any order as you reported, so I think it's time to revisit the
timeVariable min/max computation (not sure there are other
methods around based on that supposition. I didn't check it yet).
Although, it seems that in netcdf-java's
CoordinateAxis1D.getMinValue() en
CoordinateAxis1D.getMaxValue(), an assumption is made that the
extremes are at the beginning and end.
Good catch. Are you referring to this?
https://github.com/Unidata/thredds/blob/5.0.0/cdm/src/main/java/ucar/nc2/dataset/CoordinateAxis1D.java#L286
https://github.com/Unidata/thredds/blob/5.0.0/cdm/src/main/java/ucar/nc2/dataset/CoordinateAxis1D.java#L295
It does take into account the order may be decreasing as well as
increasing, but not random.
Perhaps we should remain consistent with that?
I would say yes.
Cheers,
Daniele
Regards
Niels
--
==
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.
------------------------------------------------------------------------------
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel