gbif / portal16

GBIF.org website
https://www.gbif.org
Apache License 2.0
24 stars 15 forks source link

How to handle GeoJSON in other projections #1578

Open MortenHofft opened 3 years ago

MortenHofft commented 3 years ago

The UI state that you can use GeoJSON to filtering. But it doesn't say anything about the projection or datum. We should either convert projection or state the requirements

GeoJSON example
{
  "type" : "FeatureCollection",
  "crs" : {
    "type" : "name",
    "properties" : {
      "name" : "EPSG:28992"
    }
  },
  "features" : [
    {
      "type" : "Feature",
      "id" : 1,
      "geometry" : {
        "type" : "Polygon",
        "coordinates" : [
          [
            [
              67145.844999998808,
              439344.6640000008
            ],
            [
              57669,
              436777
            ],
            [
              56195.710000000894,
              430025.01000000164
            ],
            [
              37445.050000000745,
              417475.78000000119
            ],
            [
              32106.561999998987,
              408335.49599999934
            ],
            [
              41623.671000000089,
              408107.78799999878
            ],
            [
              38659.63599999994,
              402433.07699999958
            ],
            [
              62781.127999998629,
              403489.25299999863
            ],
            [
              67796.440000001341,
              408443.07999999821
            ],
            [
              84282.999000001699,
              408916
            ],
            [
              73669.88599999994,
              422802.06399999931
            ],
            [
              62151.579999998212,
              429029.92199999839
            ],
            [
              70456.370000001043,
              433370.8599999994
            ],
            [
              67145.844999998808,
              439344.6640000008
            ]
          ]
        ]
      },
      "properties" : {
        "OBJECTID" : 1,
        "Code" : 614,
        "Gemeentenaam" : "Schouwen",
        "Gemeentecode" : "GM0614",
        "Shape_Length" : 160258.67940965926,
        "Shape_Area" : 945140599.14390874,
        "InPoly_FID" : 1,
        "SimPgnFlag" : 0,
        "MaxSimpTol" : 5000,
        "MinSimpTol" : 5000
      }
    }
  ]
}
MortenHofft commented 3 years ago

Apparently I've answered this in the past. CRS seems no longer supported in GeoJSON https://github.com/gbif/portal-feedback/issues/1906

As a service we could detect if it was provided and tell the user it isn't supported. We could also update the help text to state that it has to be wgs84