Quoting from the documentation
<https://docs.geoserver.org/stable/en/user/extensions/netcdf/netcdf.html#notes-on-supported-netcdfs>
:

"The NetCDF plugin for GeoServer supports gridded NetCDF files having
dimensions following the COARDS convention (custom, Time, Elevation, Lat,
Lon)"

I'm quite sure the NetCDF needs to be a classic regular grid, scattered
points would require writing code to
migrate the original structure to a gridded one on the fly (that's all the
raster machinery upstream of data reading can handle).

That said... it should be quite possible to write such code, if you are
interested please check out this guide:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-fixes,-improvements-and-new-features-in-GeoServer

Cheers
Andrea

On Fri, Jul 15, 2022 at 2:49 PM Frederic Leclercq <frederic.lecle...@vliz.be>
wrote:

> Hi all,
>
> I'm trying to serve a NetCDF file (CF-compliant), however the shape is not
> as I would expect. Well - the rationale is that the dataset isn't a true
> gridded dataset and to prevent multiple unused cells it uses 'points' as a
> dimension.
>
> The shape looks like this:
>
> dimensions:
>     points = 292332 ;
>     string45 = 45 ;
>     taxon = 10830 ;
> variables:
>     int Date(points) ;
>     float lat(points) ;
>     float lon(points) ;
>     float crs ;
>     char AphiaID(taxon, string45) ;
>     char Taxon_Name(taxon, string45) ;
>     byte Pres_abs(taxon, points) ;
>
> I can't import this in Geoserver:
>
> "Caused by: java.lang.RuntimeException: java.lang.IllegalStateException:
> Unable to create envelope for this dataset
>     at
> org.geotools.imageio.netcdf.NetCDFImageReader.setInput(NetCDFImageReader.java:307)
>     at
> java.desktop/javax.imageio.ImageReader.setInput(ImageReader.java:380)
>     at
> org.geotools.coverage.io.netcdf.NetCDFAccess.<init>(NetCDFAccess.java:119)
>     ... 152 more"
>
> Is it related to the taxon dimension which is basically non-numerical or
> should points be reshaped in a time/lat/lon structure? (which will make
> this file very very large, as the points have not that many lats/lons/dates
> in common)
>
> On the other hand - points x taxon = 3165955560 values in the Pres_abs
> variable - which is larger than 2^31-1 (and that is the maximum value for
> an array in a java application) Before I dive into converting the points
> dimension to lat/lon/time I would like to know if someone managed to serve
> a quite large NetCDF into Geoserver.
>
> Happy to read your ideas/help on this.
>
> Thanks,
> Fred.
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines:
> http://geoserver.org/comm/userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>


-- 

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax:     +39 0584 1660272

mob:   +39  339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it

-------------------------------------------------------

Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
precisa che ogni circostanza inerente alla presente email (il suo
contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential or
otherwise protected from disclosure. We remind that - as provided by
European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
e-mail or the information herein by anyone other than the intended
recipient is prohibited. If you have received this email by mistake, please
notify us immediately by telephone or e-mail
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to