When defining an area of interest for your export, there are a few guidelines you need to follow to ensure the area is a valid one.

In MapBrower there are two ways to define an area of interest for export: drawing the area directly onto the map and importing a GeoJSON file. In both cases, if the area you have defined is invalid, you'll see an error message at the top of the map like the one shown below:


If you see an error like this, chances are you have drawn an invalid shape, uploaded an invalid file format, or your GeoJSON file is defining features that are invalid.

The following sections describe the reasons your area of interest has failed and the errors you can expect to see in MapBrowser.

Error: Invalid file format

Error message

"Filename": Import failed. This is not a valid GeoJSON file.

You can only upload a file in the following two formats:  .json, .geojson. Check your file format.

Error: Invalid coordinates

Error message

"Filename": Import failed. This file contains invalid or unprocessable coordinates.

This error indicates that your JSON or GeoJSON file is specified in a coordinate system other than WSG84. Check your GeoJSON file.

Error: Invalid Shape

Error message

"Filename": Import failed. This file contains invalid or unprocessable geometry.

This error indicates that your JSON or GeoJSON file contains one or more of the following:

Check your GeoJSON file and if it contains any of these features, you will need to modify it.

Feature Collections, LineStrings, Points etc

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [102.0, 0.5]
      },
      "properties": {
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]
        ]
      },
      "properties": {
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],
            [100.0, 1.0], [100.0, 0.0]
          ]
        ]
      },
      "properties": {
      }
    }
  ]
}

The above example from https://en.wikipedia.org/wiki/GeoJSON.


Empty geometries

Example 1

{
    "type": "Polygon",
    "coordinates": []
  }

 
Example 2

{
  "type": "MultiPolygon",
  "coordinates": []
}


Self Intersecting Polygons

A self intersecting polygon has sides that cross over, like the one shown below. These are invalid shapes, so you will need to redefine your area of interest.



Valid Shapes

You can upload GeoJSON files that define areas of interest containing:

  • Polygons and Multipolygons
  • Holes within geometries 

The example below shows an uploaded geojson file containing both multi polygons and holes within polygon.