Creating a simplified GeoJSON map of Prince Edward Island lots

Download the ESRI Shapefile version of the lots from the PEI GIS Catalog and open the resulting lot_township_polygon.shp in QGIS.

In QGIS, right-click on the layer in the layer browser, and select:

  • Format: ESRI Shapefile
  • Save as (filename): pei-lots-wgs84.shp
  • Encoding: System
  • CRS: Selected CRS (then click Browse below, and select WGS 84)

Your “Save vector layer as…” dialog should look something like this:

Close and reopen QGIS and open the newly-created pei-lots-wgs84.shp file, which should look like this:

If you save this as a GEOJSON file at this point, because it’s a very-detailed map the size of the file will be multi-megabytes.  We want to create a smaller file, by simplifying the geometer of the lots.

To do this, select Vector menu > Geometry tools > Simplify geometries in QGIS, enter a new file name, pei-lots-wgs84-simplified.shp, using the default tolerance of 0.0001 and click OK to process.

The result will be a new, simpified Shapefile that you can now export to a GeoJSON file; load the new, simplified layer, then right-click on the layer in the layer browser, and select:

  • Format: GeoJSON
  • Save as (filename): lots.geojson
  • Encoding: System
  • CRS: Layer CRS

You can load the resulting GeoJSON file into geojson.io – it’s about 1.9MB.

Comments