deegree/deegree-ogcapi

Spatial extent of collection view not calculated correctly

Closed this issue · 1 comments

Describe the bug
When StorageCRS is configured to EPSG:4326 (see here deegree/deegree-workspaces#17) the calculated coordinates of the collection and items view seem to be different.

This is the spatial extent of collection KitaEinrichtungen retrieved via [API_ENDPOINT]/datasets/kitaeinrichtung/collections/KitaEinrichtungen?f=json:

  "extent": {
    "spatial": {
      "bbox": [
        [
          4.511343502479566,
          0.00048162875265936306,
          4.511348125125168,
          0.0004843912278179983
        ]
      ],
      "crs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
    }
  },

This is the geometries of the features retrieved via [API_ENDPOINT]/datasets/kitaeinrichtung/collections/KitaEinrichtungen/items?f=json:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "id": "APP_KITAEINRICHTUNGEN_1010002",
      "geometry": {
        "type": "Point",
        "coordinates": [
          9.955169041803735,
          53.55926028699146
        ]
      },
...
    {
      "type": "Feature",
      "id": "APP_KITAEINRICHTUNGEN_1010467",
      "geometry": {
        "type": "Point",
        "coordinates": [
          10.105296352572411,
          53.64460438880249
        ]
      },
...
    {
      "type": "Feature",
      "id": "APP_KITAEINRICHTUNGEN_1011056",
      "geometry": {
        "type": "Point",
        "coordinates": [
          9.861767196817834,
          53.59800987268548
        ]
      },
...

The coordinates of the collection view seem to be broken. The items view, however, seems to be correct.

This also leads to the fact that the background map of the map preview of the collection view is not displayed as it is requested with coordinates which do not return any map.
On the other hand, the background map and the data are displayed correctly in the map preview of the item view.

Expected behavior
Coordinates should be correct in both cases.

Desktop (please complete the following information):

  • Version: Current main branch
  • OS: Ubuntu
  • Datasource: postgres/postgis
  • Browser: firefox

If StorageCRS is configured to EPSG:4326 instead of http://www.opengis.net/def/crs/OGC/1.3/CRS84 in deegree/deegree-workspaces#17, the returned spatial extent changes.

[API_ENDPOINT]/datasets/kitaeinrichtung/collections/KitaEinrichtungen?f=json:

  "extent": {
    "spatial": {
      "bbox": [
        [
          9.75414367902492,
          53.3993376886889,
          10.2701214583176,
          53.7056196083231
        ]
      ],
      "crs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
    }
  },

[API_ENDPOINT]/datasets/kitaeinrichtung/collections/KitaEinrichtungen/items?f=json:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "id": "APP_KITAEINRICHTUNGEN_1010002",
      "geometry": {
        "type": "Point",
        "coordinates": [
          9.955169041803735,
          53.55926028699146
        ]
      },
...
    {
      "type": "Feature",
      "id": "APP_KITAEINRICHTUNGEN_1010467",
      "geometry": {
        "type": "Point",
        "coordinates": [
          10.105296352572411,
          53.64460438880249
        ]
      },
...
    {
      "type": "Feature",
      "id": "APP_KITAEINRICHTUNGEN_1011056",
      "geometry": {
        "type": "Point",
        "coordinates": [
          9.861767196817834,
          53.59800987268548
        ]
      },
...

The map preview is working correctly for both views, collection and items, now.

Thus, the initial problem seems to be solved.

Changes were committed: deegree/deegree-workspaces@fb1185a