CHAPTER 8

Making and Sharing Maps and GIS Data

GIS stands for Geographic Information System, which is a system designed to capture, store, manipulate, analyze, manage, and present spatial or geographic data. That is a mouthful—but basically GIS lets you go much deeper into spatial and geographic knowledge than a simple map ever could. If you have ever used a Garmin or your smartphone to get driving directions, you are already familiar with how useful GIS technology can be. In this chapter, we will look at how to use open-source GIS and maps to bring some geographic firepower to your projects.

Open-Source Maps

Maps are useful for planning a trip or just gathering information about our world. Many of us depend on maps for getting around, which is why it is nice to have access to free and open-source maps with no strings attached. For basic images of world maps or maps of cities, MapsOpenSource (mapsopensource.com) provides geographic menus as well as a search feature for finding them. For a street map you can actually use for navigating the world, consider OpenStreetMap (www.openstreetmap.org), which is created by people like you and is free to use under an open license (Figure 8.1). It is truly a crowd-sourced mapping project that is built by a community of mappers who contribute and maintain data about a long list of useful features that focus on local knowledge all over the world, including roads, trails, cafés, railway stations, and other attractions. You can help to improve OpenStreetMap with high-tech projects such as using aerial imagery from open-source drones (see the section “Open-Source Drones” in this chapter), balloons, or kites. After pictures are taken, OpenDroneMap (opendronemap.github.io), a free and open-source software, allows you to postprocess drone, balloon, kite, and street-view data to geographic data, including orthophotos, point clouds, and textured mesh.

Likewise, open-source Global Positioning System (GPS) devices (see the section “Open-Source GPS” in this chapter) can be used to improve the maps, which are particularly helpful for areas that do not photograph well (e.g., forested hiking, mountain biking, and cross-country ski trails). A lot of OpenStreetMap’s usefulness, however, comes from contributors using low-tech field maps to verify that OpenStreetMap is accurate and up-to-date. You can contribute no matter how technically sophisticated you are, and your contribution will really matter. As with many of the other projects in this book, the open-source maps are useful on their own, but it is also gratifying to actually participate in making them better.

Images

Images

Figure 8.1 Screen captures of open street map zooming from (a) Europe to (b) Nancy, France, to (c) Place Stanislas with local restaurants labeled at full zoom. (CC BY-SA) https://www.openstreetmap.org/

Open-Source Drones

In many ways, open source has driven and led innovation in the drone technological space (Anderson, 2014). The primary innovation hub for drones is DIY Drones (diydrones.com), which is the largest community for amateur unmanned aerial vehicles (UAVs). DIY Drones created the community that built the ArduPilot (ardupilot.org), which is the world’s first universal autopilot platform covering the air with planes, multirotors/multicopters, and helicopters, as well as the new-fangled quad planes and compound helicopters; the ground with many types of ground rovers; and the water with boats and even submarines. ArduPilot is not a toy—it is fully loaded and reliable open-source autopilot software that has been installed in more than a million vehicles worldwide. We know it is reliable because of its advanced data-logging, analysis, and simulation tools, making it easy to show that ArduPilot has been thoroughly tested and proven to be reliable autopilot software. As with the other projects discussed in this book, the open-source nature of ArduPilot’s code base means it is rapidly evolving, and always at the cutting edge of drone technology development. It is mature enough that ArduPilot has become its own platform (similar to the Arduino open-source electronics platform we discuss in Chapter 11 along with the origin of the ArduPilot name and technology). Today, many commercial companies (e.g., 3DR, jDrones, PrecisionHawk, AgEagle, and Kespry), several large institutions and corporations such as NASA, Intel, and Boeing, and countless colleges and universities around the world, build their own offerings from the ArduPilot code base and provide peripheral supplies and new interfaces. Thus, users benefit from a broad ecosystem of sensors, companion computers, and communications systems all constantly forming around the ArduPilot core. ArduPilot-controlled drones such as the octocopter shown in Figure 8.2 can be used for everything from search-and-rescue operations, agricultural automation for robot tractors, underwater exploration of coral reefs, and inspection of roads, bridges, or oil pipelines, as well as, of course, aerial mapping.

Images

Figure 8.2 Autonomous coaxial octocopter flying with ArduPilot. (Image courtesy of Olivier J. Brousse.) (CC BY-SA-4.0) http://www.ardupilot.org/

On the hardware side, Pixhawk (pixhawk.org) is an independent open-hardware project that aims to provide readily available high-quality and low-cost autopilot hardware designs that can run ArduPilot, as well as PX4. PX4 (px4.io) is a pro-quality copter, plane, rover, and vertical takeoff and landing (VTOL) software stack from the Dronecode Foundation. The Dronecode Project, hosted under the Linux Foundation, is a vendor-neutral site for end-to-end drone software (www.dronecode.org).

If you want a lighter drone project and you love your smartphone, you might want to join Spain’s Flone Project (flone.cc/en/home-2), which converts your smartphone into a drone while using another smartphone as the controller. It combines a digitally fabricated airframe (following what we cover in detail in Chapter 12) with free and open-source software that allows an open-source operating system (i.e., Android) smartphone on the ground to control the one strapped onto the airframe via Bluetooth (Figure 8.3).

Images

Figure 8.3 Flone 1.0, available on Instructables, developed by Aeracoop: Aerial Cooperation. (CC BY-SA) https://www.instructables.com/id/Flone/

There are many other open-source drone projects that enable open-source control over a much wider range of drone types. For example, Paparazzi UAV (Unmanned Aerial Vehicle, wiki.paparazziuav.org) is an open-source drone hardware and software project encompassing autopilot systems and ground station software for a long list of multicopters or multirotors, fixed-wing aircraft, helicopters, and hybrid aircraft. The main goal of Paparazzi UAV is to enable autonomous flight (even of multiple aircraft), although it is capable of manual flying. Paparazzi works as a dynamic flight plan system that uses way points as “variables.” This makes it easy to create very complex, fully automated missions without the operators or users intervening in the control of the drone.

Finally, one of the key selling points for using open-source software and hardware for this particular technology, which has a wide range of applications, including military and law enforcement, is that because the source code is open, it can be audited to ensure compliance with security and secrecy requirements. This is particularly critical for sensitive hardware, which we discuss in Chapter 11.

Open-Source GPS

With GPS modules becoming a standard offering in many modern smartphones, the costs of GPS basic components have come down so far that they are easily accessible to makers. This provides the potential for many wondrous creations you can build on for your own projects—and the maker community has not disappointed! We discuss open-source electronics and the Arduino microcontroller in Chapter 11, but just on the Arduino GPS page, there are 38 open-source GPS projects (create.arduino.cc/projecthub/projects/tags/gps) you might want to try out. There is, of course, navigation for cars and drones of all kinds, as you might expect, but makers have also used this open-source GPS technology to do more sophisticated tasks such as making accident and pothole detectors, sun-tracker controls for solar photovoltaic arrays, and devices to help and track kayak navigation.

Having the ability to use GPS any way they want allows people to just have fun—as with the autonomous “follow me” cooler, which is a small robot that carries around a cooler and dutifully follows a person holding a smartphone via Bluetooth. It uses GPS to navigate. Open-source GPS use is not limited to Arduino; for example, Raspberry Pi GPS projects include navigating with Navit or OpenMapTiles (openmaptiles.com), which provides world maps you can deploy on your own (e.g., the OpenStreetMaps discussed earlier in “Open-Source Maps”).

Open-source GPS can help you with the oddest of modern problems. Does the rapidly growing Flat Earth Society count one of your friends or relatives as a member? Are you having trouble countering arguments they find on YouTube? Perhaps a backyard experiment will help. Combining a Raspberry Pi, data logger, GPS tracker, and camera with a helium balloon, you can make a fun project to show that the Earth is not flat. Handy open-source software can show the flight of your balloon in three dimensions on Google Earth and send back photographic evidence the whole way. It can also be used for real science or just to take your own “almost astronaut” pictures, as shown in Figure 8.4.

Images

Figure 8.4 Earth picture as taken from a Raspberry Pi ballooning experiment. (Photo courtesy of the Raspberry Pi Foundation.) (CC BY-SA-4.0) https://opensource.com/life/15/9/pi-sky-high-altitude-ballooning-raspberry-pi

In addition to open hardware for GPS, there is also well-developed software with the Traccar Project (www.traccar.org), which is flexible enough to meet your needs no matter which end of the spectrum your own GPS project or GPS device resides. You can self-host the server or let it reside in the cloud. Traccar has a fully featured web interface that is amenable to a desktop or a mobile device, where it can be used as a GPS tracker in real time—mapped on roads or on satellite images. You can set up web notifications, along with support for email and short message service (SMS), which allows for external alerting in cases of fuel and maintenance events, geo-fencing (e.g., Do you want to make sure your teenager keeps the car in town?), and many other applications. Traccar supports simple location history, trip, chart, and summary reports, which you can use to track everything from a walk in the neighborhood to an epic cross-country road trip in the family RV. You can see this all through the web or mobile app or download the data to play with at home.

There are many other open-source GPS software solutions that can be scaled to any project. For example, if you are looking for something a little simpler, consider TrackIt! (github.com/flespi-software/TrackIt), which is a lightweight open-source solution for road navigation, as well as tracking your stuff with a simple intuitive interface and basic functionality. By contrast, if your fleet of open-source drones is growing, OpenGTS (opengts.sourceforge.net) is an open-source project designed specifically to provide web-based GPS tracking services for a fleet of vehicles.

GPS may not even be necessary for global location because a team of students from the Royal College of Art and Imperial College have designed an open-source alternative to GPS called Aweigh (www.aweigh.io; shown in Figure 8.5). Aweigh, as in “Anchors aweigh!”, is a particularly clever device that outputs your latitude and longitude. Aweigh does this by calculating the device’s position using the sun—a feature inspired by the polarized vision of insects—and thus does not rely on satellites. Much like the Viking navigational aids known as sun stones, Aweigh can even work on cloudy days when the sun is obscured. Perhaps more important, unlike GPS devices that rely on satellites, Aweigh functions offline, so a user’s positional data are held privately. This is particularly important given what has been disclosed by The New York Times on mass-scale smartphone tracking (Thompson and Warzel, 2019). Aweigh is open source, can be manufactured by open-source digital technologies (see Chapter 12), and uses a Raspberry Pi (see Chapter 11) as the computational core.

Images

Figure 8.5 One of the many designs of the Aweigh open-source navigational aid created by Flora Weil, Keren Zhang, Samuel Iliffe, and States Lee. (CC BY) https://github.com/build-aweigh/build-aweigh/blob/master/Logbook/Aweigh%20book.pdf

Open-Source GIS Information

There are many sources of open-source GIS data that you can use for your GIS projects. Some of the top sources are summarized in Table 8.1.

Open-Source GIS Software

GRASS GIS

So you have some GIS data and now you want to do something with it. Open source can come to the rescue again. There are a dozen good open-source GIS software tools. Here, we will look at two: GRASS and QGIS.

GRASS (Geographic Resources Analysis Support System) GIS (grass.osgeo.org) is a free and open-source GIS software suite used for geospatial data management and analysis, image processing, graphics and maps production, spatial modeling, and visualization. GRASS GIS is currently used in academic and commercial settings around the world, as well as by many governmental agencies and environmental consulting companies. For example, my collaborator and I used it to help renewable-energy companies find some of the best places to build solar farms in southern Ontario (Nguyen and Pearce, 2010), as shown in Figure 8.6.

Table 8.1 Open-Source GIS Data Repositories

Images

Images

Figure 8.6 Using GRASS GIS and r.sun to map the daily insolation per unit area in southeastern Ontario. (Map provided by Ha Thanh Nguyen.) (CC BY-SA) https://www.appropedia.org/File:Daily_insolation_per_unit_area_in_Southeastern_Ontario.jpg

GRASS GIS is a founding member of the Open Source Geospatial Foundation (OSGeo). OSGeo (www.osgeo.org) houses a multitude of projects that will be useful for open-source GIS work of any kind, including content-management systems such as GeoNode, metadata catalogs, desktop programs such as GRASS GIS and QGIS, web-mapping programs such as MapFish and GeoMoose, geospatial libraires such as GeoTools, and spatial databases such as PostGIS.

QGIS

Another OSGeo project is QGIS (www.qgis.org). QGIS has a large open-source developer community and thus provides a continuously and rapidly expanding number of capabilities. You can visualize, manage, edit, and analyze data and compose printable maps. Core plugins include:

Images  Coordinate Capture (captures mouse coordinates in different coordinate reference systems)

Images  DB Manager (exchange, edit, and view layers and tables from or to databases and execute SQL queries)

Images  eVIS (visualize events)

Images  Geometry Checker (check geometries for errors)

Images  Georeferencer GDAL (add projection information to rasters using the Geospatial Data Abstraction Library)

Images  GPS Tools (load and import GPS data developed in Section 8.3)

Images  MetaSearch Catalogue Client (interacting with metadata catalog services supporting the OGC Catalog Service for the Web (CSW) standard)

Images  Offline Editing (allows offline editing and synchronizing with databases)

Images  Processing (the spatial data-processing framework for QGIS)

Images  Topology Checker (finds topological errors in vector layers)

Images

Figure 8.7 QGIS 2.0.1 running on GNU/Linux (Ubuntu 12.04) screenshot of a topographic map around Basa de la Mora (Ibón de Plan) lake, Spanish Pyrenees, by Miguel Sevilla-Callejo. (CC BY-SA-2.0) https://www.flickr.com/photos/msevilla/10288258133/in/pool-qgis-screenshots/

And perhaps most interesting, these open-source packages play nicely together because there is a plugin GRASS 7 that integrates GRASS GIS into QGIS. QGIS can also be scripted with open-source Python. QGIS users share some of their work on Flickr (www.flickr.com/groups/qgis-screenshots), as can be seen in Figure 8.7, which shows Basa de la Mora (Ibón de Plan) lake in the Spanish Pyrenees.

With the open-source tools discussed in this chapter, the world is yours, so go enjoy it!

References

Anderson C. 2014. Makers: The New Industrial Revolution. Random House, New York.

Nguyen HT, Pearce JM. 2010. Estimating potential photovoltaic yield with r.sun and the open source Geographical Resources Analysis Support System. Solar Energy 84(5):831–843.

Thompson SA, Warzel C. 2019. Twelve million phones, one dataset, zero privacy. The New York Times.12-19-2019. https://www.nytimes.com/interactive/2019/12/19/opinion/location-tracking-cell-phone.html