Re: [thredds] THREDDS WMS re-projection error

  • To: "Wright, Simon M." <smw@xxxxxxxxx>
  • Subject: Re: [thredds] THREDDS WMS re-projection error
  • From: Sean Arms <sarms@xxxxxxxx>
  • Date: Tue, 23 Aug 2016 11:00:29 -0600
Greetings Simon,

It almost looks like this is an issue of how the pixel is defined - it's
like there is an offset of 0.5 pixel between the green and grey layer. I do
not have any experience with any of the GIS packages. Anyone out there
experienced this before?

Sean


On Tue, Aug 16, 2016 at 9:12 AM, Wright, Simon M. <smw@xxxxxxxxx> wrote:

> Dear THREDDS mailing list
>
>
>
> We have set THREDDS up to host a WMS for some netCDF files.  These netCDF
> files have a 5 km resolution and are in the EPSG:3035 coordinate reference
> system.  The metadata header for one of the netCDF files is as follows:
>
>
>
> netcdf Z:/thredds/edge/edge-mockup-20160711-RCP2_6-ECMWF-NOAA-
> indicator01.nc {
>
>   dimensions:
>
>     time = UNLIMITED;   // (17 currently)
>
>     x = 1000;
>
>     y = 950;
>
>   variables:
>
>     float indicator(time=17, y=950, x=1000);
>
>       :_FillValue = -9999.0f; // float
>
>       :standard_name = "indicator01";
>
>       :long_name = "indicator01";
>
>       :units = "-";
>
>       :RCP = "RCP2_6";
>
>       :GCM = "ECMWF";
>
>       :HYDROMODEL = "NOAA";
>
>       :coordinates = "time y x";
>
>       :grid_mapping = "lambert_azimuthal_equal_area";
>
>       :missing_value = -9999.0f; // float
>
>       :valid_min = 0.0; // double
>
>       :valid_max = 22.8378; // double
>
>       :_ChunkSizes = 6, 317, 334; // int
>
>
>
>     int lambert_azimuthal_equal_area;
>
>       :grid_mapping_name = "lambert_azimuthal_equal_area";
>
>       :longitude_of_projection_origin = "10.0";
>
>       :latitude_of_projection_origin = "52.0";
>
>       :false_easting = "4321000.0";
>
>       :false_northing = "3210000.0";
>
>       :_CoordinateTransformType = "Projection";
>
>       :_CoordinateAxisTypes = "GeoX GeoY";
>
>
>
>     double lat(y=950, x=1000);
>
>       :standard_name = "latitude";
>
>       :long_name = "latitude coordinate";
>
>       :units = "degrees_north";
>
>       :_ChunkSizes = 475, 500; // int
>
>
>
>     double lon(y=950, x=1000);
>
>       :standard_name = "longitude";
>
>       :long_name = "longitude coordinate";
>
>       :units = "degrees_east";
>
>       :_ChunkSizes = 475, 500; // int
>
>
>
>     double time(time=17);
>
>       :_FillValue = -9999.0; // double
>
>       :long_name = "time";
>
>       :units = "seconds since 2019-01-01 23:59:59";
>
>       :calendar = "gregorian";
>
>       :_ChunkSizes = 17; // int
>
>       :_CoordinateAxisType = "Time";
>
>
>
>     double x(x=1000);
>
>       :standard_name = "projection_x_coordinate";
>
>       :long_name = "x coordinate of projection";
>
>       :units = "Meter";
>
>       :_ChunkSizes = 1000; // int
>
>       :_CoordinateAxisType = "GeoX";
>
>
>
>     double y(y=950);
>
>       :standard_name = "projection_y_coordinate";
>
>       :long_name = "y coordinate of projection";
>
>       :units = "Meter";
>
>       :_ChunkSizes = 950; // int
>
>       :_CoordinateAxisType = "GeoY";
>
> }
>
>
>
> Displaying the netCDF file via the Godiva 2 viewer in THREDDS seems to
> work as expected, but when overlaying other datasets in other software
> packages (e.g. QGIS, ArcGIS, etc.) there is a noticeable offset/error in
> the WMS images generated by THREDDS.
>
>
>
> To spot the offset, we load the WMS from THREDDS and the original source
> data from the netCDF file as layers in QGIS.  In the attached image
> (QGIS-error.png), you can clearly see that the grey (local netCDF file)
> layer is not completely hidden by the green (THREDDS WMS) layer.
>
>
>
> We assume that this is something to do with re-projection of the data?
> Pulling an image from the THREDDS WMS in the EPSG:3035 projection system
> yields the same sort of offset.  A call with WMS parameters
> SRS=EPSG:3035&BBOX=3615000,3550000,3620000,3555000 in our mind should
> return a single pixel from the netCDF data, however it doesn't.
>
>
>
> One other thing to note is that QGIS reports the source projection
> definition as '+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000
> +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'  which differs from
> EPSG:3035 in its datum.  However we don't think this should matter as the
> same netCDF file is being processed by QGIS and THREDDS.
>
>
>
> Therefore, should the coordinate reference system in the netCDF file be
> defined in a different way or is there a bug in the ncWMS used by the
> THREDDS?
>
>
>
>
>
>
>
> Many thanks for any help that people can provide, best wishes, Simon.
> ------------------------------
> This message (and any attachments) is for the recipient only. NERC is
> subject to the Freedom of Information Act 2000 and the contents of this
> email and any reply you make may be disclosed by NERC unless it is exempt
> from release under the Act. Any material supplied to NERC may be stored in
> an electronic records management system.
> ------------------------------
>
> _______________________________________________
> NOTE: All exchanges posted to Unidata maintained email lists are
> recorded in the Unidata inquiry tracking system and made publicly
> available through the web.  Users who post to any of the lists we
> maintain are reminded to remove any personal information that they
> do not want to be made public.
>
>
> thredds mailing list
> thredds@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit:
> http://www.unidata.ucar.edu/mailing_lists/
>
  • 2016 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: