qgis basics for journalists

Simplifying a map for web use

You may want to use some polygons as part of an interactive map in GeoCommons or Google's Fusion Tables. If so, simplifying the map will help it load faster and provide a better user experience. This process will change a 2MB file to about 500k

Simplify a layer

Click on the layer you want to simplify and zoom out so that you can see the entire layer. It should be a boundary layer (tracts) or a line layer (roads).

Go to the Vector menu -> Geometry tools -> Simplify geometries. This opens a window and your layer should be selected in the Input line or polygon layer drop down menu. It it's not, select it.

Next, look for the Simplify tolerance field. This measurement is in degrees so you want to use a really small number. The default of 0.0001 is a good place to start.

Check Save to a new file and create a new folder and a new file. Click OK. A new window will tell you how many vertices were removed. It should have removed somewhere between 70 percent to 90 percent of the original vertices. Close the window.

You will need to add the layer to the project. Once that's done, zoom into the map so you can see a lot of detail. You may see some polygons that don't align perfectly or shapes that are a little distorted. Mine looks pretty good:

If you have a lot of gaps or distortion, you have to make a judgement call. Users may never see small gaps once this is placed on a map. If you have large gaps, you should try again with a smaller setting.

Export a KML file

Both GeoCommons and Fusion Tables support KML files. KML is a single file that is essentially an XML version of the SHP file.

Right-click on the simplified layer and select Save as... Change the format to Keyhole Markup Language (KML) in the window that opens.

Enter a new file name and click the Browse button to specify the save location. Click OK.