Can't read Netcdf with WKT attributes

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Can't read Netcdf with WKT attributes

Van Der Stelt Frank
Hi All,

I'm using the Netcdf input plugin with geoserver 2.15.2. However when I try to read my files I get a warning "unable to connect" This because the CRS is not found:

Caused by: java.io.IOException: java.lang.IllegalArgumentException: Unable to find a CRS for the provided variable: lon

Before this warning another warning appears:

WARNING: Unable to setup a CRS from the specified WKT: PROJCS['unnamed',GEOGCS['GRS 1980(IUGG, 1980)',DATUM['unknown',SPHEROID['GRS80',6378137,298.257222101],TOWGS84[0,0,0,0,0,0,0]],PRIMEM['Greenwich',0],UNIT['degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['latitude_of_origin',0],PARAMETER['central_meridian',18],PARAMETER['scale_factor',1],PARAMETER['false_easting',150000],PARAMETER['false_northing',0],UNIT['Meter',1]]

My netcdf has a variable projection which is read by the netcdf plugin according to the documentation:

https://docs.geoserver.org/stable/en/user/extensions/netcdf/netcdf.html#wkt-attributes

It looks like this (ncdump):

     int projection ;
                projection:grid_mapping_name = "transverse_mercator" ;
                projection:proj4 = "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs" ;
                projection:scale_factor_at_central_meridian = 1. ;
                projection:longitude_of_central_meridian = 18. ;
                projection:latitude_of_projection_origin = 0. ;
                projection:false_easting = 150000. ;
                projection:false_northing = 0. ;
                projection:semi_major_axis = 6378137. ;
                projection:inverse_flattening = 298.257222101 ;
                projection:spatial_ref = "PROJCS[\"unnamed\",GEOGCS[\"GRS 1980(IUGG, 1980)\",DATUM[\"unknown\",SPHEROID[\"GRS80\",6378137,298.257222101],TOWGS84[0,0,0,0,0,0,0]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",18],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",150000],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]" ;

The WKT syntax is parsed (parseWKT in geotools) but the coordinate reference system is not created.

Does anyone else have this problem when using the WKT-syntax in netcdf? Something wrong with the WKT-syntax? Any way to turn of the parsing by geoserver?

Kind regards,

Frank van der Stelt
Systems developer
SMHI - Swedish Meteorological and Hydrological Institute

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork