Project

General

Profile

Actions

Incident #10345

closed

Gis Viewer does not produce images correctly

Added by Gianpaolo Coro over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Fabio Sinibaldi
Category:
Application
Target version:
Start date:
Nov 14, 2017
Due date:
% Done:

100%

Estimated time:
Infrastructure:
Production

Description

The Gis Viewer stretches the images and does not manage Thrreds layers properly.

Example of the issue and related layers are summarised by this link:

https://bluebridge.d4science.org/geo-explorer-app-2.11.0-4.6.1/geoexplorerportlet/MapGenerator?outputFormat=image/jpeg&bbox=-180,-73.30078125,180,73.30078125&width=1521&height=417&geoservers=http://geoserver1.d4science.org/geoserver/aquamaps/wms;http://geoserver4.d4science.research-infrastructures.eu/geoserver/wms;http://www.fao.org/figis/geoserver/species/ows;http://thredds.research-infrastructures.eu/thredds/wms/public/netcdf/HadCRUT.4.2.0.0.median_CLIMATOLOGY_METEOROLOGY_ATMOSPHERE_.nc&layers=aquamaps:TrueMarble.16km.2700x1350;lgadusmorhua20121220231503115cet;SPECIES_DIST_COD;temperature_anomaly&styles=null;Species_prob;species_style_FAFA5F;boxfill/rainbow&opacities=1;0;1;1&cqlfilters=null;null;null;null&gsrefs=0;1;2;3&crs=null;EPSG:4326;EPSG:4326;EPSG:4326&wmsServerVersions=null;1.1.0;1.1.0;1.3.0&srs=null;EPSG:4326;EPSG:4326;EPSG:4326&formats=null;application/openlayers;image/png;image/png&wmsNonStandardParameters=null;null;null;null&elevations=null;null;null;null&
Actions #1

Updated by Francesco Mangiacrapa over 7 years ago

  • Status changed from New to In Progress

Hi Gianpaolo,

analyzing the above link I believe that there is a problem with the field width (It is too high):

MapGenerator?outputFormat=image/jpeg&bbox=-180,-73.30078125,180,73.30078125 &width=1521& height=417&...

The link is built client-side by GisViewer. I'm going to check why it happens.

Actions #2

Updated by Francesco Mangiacrapa over 7 years ago

  • Assignee changed from Francesco Mangiacrapa to Fabio Sinibaldi

Checking with Gianpaolo on this issue We have discovered that the problem is the WMS request stored in the metadata of Thredds layers and in particular the issue is related to parameters WMS VERSION and BBOX.

From wiki page at: http://docs.geoserver.org/stable/en/user/services/wms/basics.html#axis-ordering:

The WMS 1.3.0 specification mandates that the axis ordering for geographic coordinate systems defined in the EPSG database be latitude/longitude, or y/x. 
This is contrary to the fact that most spatial data is usually in longitude/latitude, or x/y. 
This requires that the coordinate order in the BBOX parameter be reversed for SRS values which are geographic coordinate systems.

In fact, using the WMS request from source at:

https://bluebridge.d4science.org/geo-explorer-app-2.11.0-4.6.1/geoexplorerportlet/MetadataISO19139SourceView?UUID=5aa2d1e4-b80a-45e5-ac19-a88d915647fd&random=29367527693402520&scope=/d4science.research-infrastructures.eu/gCubeApps/BiodiversityLab

Which is the following one:

http://thredds.research-infrastructures.eu/thredds/wms/public/netcdf/HadCRUT.4.2.0.0.median_CLIMATOLOGY_METEOROLOGY_ATMOSPHERE_.nc?service=wms&version=1.3.0&request=GetMap&layers=temperature_anomaly&bbox=-177.5,-87.5,177.5,87.5&styles=&width=676&height=330&srs=EPSG:4326&CRS=EPSG:4326&format=image/png
the resulting image is stretched.

Since Thredds is using WMS version 1.3, inverting the axis ordering (from -179.5,-89.5,179.5,89.5 to -87.5,-177.5,87.5,177.5) the image is properly exported:
http://thredds.research-infrastructures.eu/thredds/wms/public/netcdf/HadCRUT.4.2.0.0.median_CLIMATOLOGY_METEOROLOGY_ATMOSPHERE_.nc?service=wms&version=1.3.0&request=GetMap&layers=temperature_anomaly&bbox=-87.5,-177.5,87.5,177.5&styles=&width=676&height=330&srs=EPSG:4326&CRS=EPSG:4326&format=image/png

I'm going to assign this ticket to @fabio.sinibaldi@isti.cnr.it. Please, Fabio, let me know if we can fix this issue Thredds side.

Actions #3

Updated by Fabio Sinibaldi over 7 years ago

Sorry, but I didn't understand the request :
if the issue is in the ISO metadata we should edit that, which resides on GeoNetwork, not Thredds.
If the issue is in the dataset (or in the metadata inside it, being a netcdf) we should republish the dataset (but no idea what you mean by fixing thredds - side).

Also, It would help to know how this layer has been generated. If it has been generated/published programmatically, we should address the generator too, otherwise this situation will repeat.

Actions #4

Updated by Francesco Mangiacrapa over 7 years ago

Yes, @fabio.sinibaldi@isti.cnr.it you're right, I presented the problem incorrectly saying 'Thredds side'.
Precisely, the issue is in the metadata of Thredds layers saved on GN. As above presented, currently, they are not compliant to WMS 1.3 as lat/long (their BBOX is compliant to WMS 1.1 as long/lat).
Who/How is publishing new layers I don't know, @gianpaolo.coro@isti.cnr.it can clarify this question.. However, also old layers published have this problem (they are published as long/lat but Thredds calls are performed using WMS version 1.3 that reads the BBOX as lat/long).

I hope this clarify the issue

Actions #5

Updated by Fabio Sinibaldi over 7 years ago

Ok, now I understand.
By inspecting the metadata, it seems it is a bit old layer : all publication and creation date reported are from 2013. If that's correct, the logic involved in producing these wrong metadata may be already dismissed, but we should investigate on this.
Anyway, as far as i understand, the viewer simply relies on the wms request in the metadata file. We can have different approaches on this :

  • republish the metadata modifying the bbox in the query string : definitely a tricky task for various reasons and it probably doesn't solve (future layers, harvested layers and in general layers that we don't have control on)
  • modify the gui/involved servlets in order to use the bounding box declared in the ISO metadata i.e. :
 <gmd:extent>
        <gmd:EX_Extent>
          <gmd:description>
            <gco:CharacterString>Bounding box</gco:CharacterString>
          </gmd:description>
          <gmd:geographicElement>
            <gmd:EX_GeographicBoundingBox>
              <gmd:extentTypeCode>
                <gco:Boolean>true</gco:Boolean>
              </gmd:extentTypeCode>
              <gmd:westBoundLongitude>
                <gco:Decimal>-177.5</gco:Decimal>
              </gmd:westBoundLongitude>
              <gmd:eastBoundLongitude>
                <gco:Decimal>177.5</gco:Decimal>
              </gmd:eastBoundLongitude>
              <gmd:southBoundLatitude>
                <gco:Decimal>-87.5</gco:Decimal>
              </gmd:southBoundLatitude>
              <gmd:northBoundLatitude>
                <gco:Decimal>87.5</gco:Decimal>
              </gmd:northBoundLatitude>
            </gmd:EX_GeographicBoundingBox>
          </gmd:geographicElement>
        </gmd:EX_Extent>
      </gmd:extent>
    </gmd:MD_DataIdentification>

In my opinion the last option is the more robust one, since it doesn't rely on specific details declared in metadata but on the actual managed data by the WMS server.

Actions #6

Updated by Francesco Mangiacrapa over 7 years ago

  • Status changed from In Progress to Rejected
  • % Done changed from 0 to 100

Ok, @fabio.sinibaldi@isti.cnr.it, thanks for you reply. I will consider your suggestions in order to reinforce the GeoExplorer capabilities in the future.

Just to be exact the current GisViewer version uses OpenLayers library and shows Thredds layers properly why It does not use WMS 1.3 but performs query to WMS 1.1.1 (ignoring the WMS version (so WMS 1.3) specified in the metadata of Thredds Layers). You can check this by using the GeoExplorer/GisViewer and debugging the Network calls performed by GisViewer on Thredds Layers.

i.e The following one is a request performed by GisViewer for the Thredds layer 't_an' (note the VERSION=1.1.1 ):
http://thredds.research-infrastructures.eu/thredds/wms/public/netcdf/temperature_annual_1deg_ENVIRONMENT_OCEANS_.nc?LAYERS=t_an&TRANSPARENT=TRUE&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=boxfill%2Falg&SRS=EPSG%3A4326&_OLSALT=0.9612505476491353&ELEVATION=0&BBOX=-180,-90,-90,0&WIDTH=256&HEIGHT=256

That said, my conclusions are the following:

  1. current issue reported by @gianpaolo.coro@isti.cnr.it is due to wrong BBOX into metadata for Thredds layers. About this point I don't know if it is possible to republish/patch all wrong metadata;
  2. the GisViewer should be enhanced in order to use WMS version declared into metadata. About this point I will open a task regarding such activity asap.

I'm going to reject this incident since it does not concern the Gis Viewer application. If needed @fabio.sinibaldi@isti.cnr.it open a new one..

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 8.91 MB)