Arun Gopinath

Welcome to blog of Arun Gopinath

Convert a shapefile into a interactive online map

Arun Gopinath / 2021-05-07


Introduction

Imagine you have a shapefile (.shp) with you. Now you want to show the interactive map to your colleague. There are two options:

OR

Let’s begin

From this point, I assume you have a shapefile with you. Incase you don’t have use this file from previous post.

Download shapefile

Now this is our plan.

Steps

  1. Open the shapefile in QGIS.
  2. Right click the shapefile in the layers tab. Then, Export –> Save Features as. Export option
  3. Select format as GeoJSON, Choose file destination and select Reference system(CRS). Then click Ok. Export to GeoJSON format
  1. Go to github.com and create an account.
  2. After successfully creating an account in Github, go to gist.github.com. Open gisy
  3. Easiest way to add the file is drag and drop method. That means open the folder containing the .geojson file. Drag the file and drop in the blank space (check figure).

Drag and drop

If the blank space is filled with text data, then proceed to next step.

  1. Most important part - make sure that you name the file you just copied with .geojson extension. Name the file with .geojson extension
  2. Select Create public gist ( Secret gist cannot be used because our aim is to share the map with public ) . Next page will load our interactive map.
  3. Select Share option and copy the link. Share options Share link
  1. What are you waiting for ? Happy sharing.

Output of this tutorial can be view here.