Εμφάνιση αναρτήσεων με ετικέτα QGIS. Εμφάνιση όλων των αναρτήσεων
Εμφάνιση αναρτήσεων με ετικέτα QGIS. Εμφάνιση όλων των αναρτήσεων

Τετάρτη 16 Σεπτεμβρίου 2015

How to Create QGIS Atlas Mapbooks


to Create QGIS Atlas Mapbooks


Put Your Mapping in Auto-Pilot with QGIS Atlas

Like a modern-day mechanical mapping machine, you can automate your map output.


For 99% of us, there are 2 surefire ways to create mapbooks:

1. ArcGIS Data Driven Pages
2. QGIS Atlas


We’ve reviewed pumping out maps with ArcGIS data driven pages. Esri’s data driven pages works great. It’s solid.

But today we want to examine an equally-effective method with a QGIS Atlas tutorial.

Why use QGIS Atlas?


The QGIS Atlas is a true open source technique to generate hundreds of maps in minutes. In the map-making business, this means being efficient without compromising art and intricacy.

QGIS’ Composer has the ability to create an “Atlas” built-in. In open source QGIS software, before version 1.9 it used to a plugin. Now, it’s integrated into QGIS core.

All you need to do is select a map layer containing geometries as your index layer. Each geometry in the index layer is used to create each individual page. QGIS Atlas dynamically changes the view extent to each feature in the index layer. Save tens, hundreds or thousands of maps as a single PDF or separate images.

There are tons of options to customize your map output. Let’s get our feet wet with a QGIS Atlas tutorial.

How to Create a QGIS Atlas Mapbook

Let’s use the the Natural Earth populated places layer. We have 4 records in the attribute table with point locations of New York, Los Angeles, Chicago and Houston.



This means QGIS Atlas will generate 4 pages because there are 4 locations. If you have 1000 records, QGIS Atlas will produce 1000 pages.

Step 1: Create a new composer window

Click File > New Composer

QGIS Composer is where you set up your map output.


 
Step 2: Add a new map item

In your new QGIS Composer, select the New Map Item tool. Drag and create a rectangle in your Composer map canvas.



Step 3: Click “Generate an Atlas” in the “Atlas Generation” pane

In the right-pane, check the box “Atlas Generation”


Step 4: Choose your coverage layer

Your coverage layer is the index layer. It is used to create each individual page. QGIS Atlas dynamically changes the view extent to each feature in the coverage layer. The number of records in the coverage determines how many pages will be in your mapbook.

We have the 4 most populated cities (New York, Los Angeles, Chicago and Houston) in our index layer. This means our mapbook will output 4 pages.



Step 5: Select “Controlled By Atlas” in “Item Properties”

In the “Item Properties” tab, check the box for “Controlled By Atlas”


Step 6: Export QGIS Atlas Mapbook

Click Atlas > Export Atlas as PDF


 
Result: QGIS Atlas Mapbook

The result is a 4-page PDF of each feature in the index layer. New York, Los Angeles, Chicago and Houston are dynamically displayed with very little effort by the cartographer.



The Nitty-Gritty Details in QGIS Atlas

QGIS Atlas has additional functionality for you to customize your mapbooks. The set up and possibilities are endless, in a good way.
 
QGIS Atlas Preview Toolbar

We love the way you can preview mapbooks using the QGIS Atlas toolbar. It’s a unique for you to get a feel for how the mapbook will look when exported. Push the Preview Atlas button to enable this feature.

From there, you can flip through the pages of your mapbook one-by-one. Here you can export as SVG, PDF or images.


Customize your Exports Uniquely

What will be the file names of your maps or mapbook? The Output Filename Expression controls the file names of your export.

When you check Single File Export When Possible , the output PDF file will be in a single PDF. When this option is not checked, the output will be separate PDFs.

How will the mapbook be sorted? This can be controlled using the Sort By and dropdown.


Delve into Scales and Margins

In the Item Properties pane, you must select Controlled by Atlas . With a polygon feature as your coverage layer, you can set up margins around the feature. This means that the scale will dynamically adjust itself.



For example:

When you set up 10% around the continents polygon, this is how much margin will be around each feature. Here is how the continent of Africa will look with a 10% margin:


Africa continent with a 10% margin

Here is Africa with a 50% margin:


Africa with a 50% margin
 
Generate Dynamic Text and Dynamic Everything as Labels

Dynamic text is a label that updates automatically based on a property of a map. If you want to dynamically label a city name in your map, click Add New Label . Under Item Properties , click Insert an Expression .

Under Fields and Values , double-click the field you want to dynamically be displayed in the map window. The expression will be similar to [% “NAME” %] :



QGIS Atlas has its own list of functions that can be added as labels. This includes everything from the feature number to the number of features in the mapbook.
 
Pull Off a Strip Map Along a Line

Okay, the header is deceiving. There is no strip map tool in QGIS.

But if you want to use QGIS Atlas along a line, all you have to do is split it into segments. And there is a tool to do that in GRASS. The v.split.length function splits the line into equal segments defined by the user. This means that QGIS Atlas will generate maps for each line segment.


Final Thoughts on QGIS Atlas

QGIS has its own little map-making factory and it’s called QGIS Atlas. Hundreds of mapping monkeys would have a hard time competing with this well-oiled machine. Automation is becoming key in a world begging for spatial answers instantly.

QGIS Atlas is gaining steam. With a little bit of practice, and this QGIS Atlas tutorial, you have the necessary tools to build your own atlas with authority.

Map with confidence. Map with speed. Map with automation.

QGIS Atlas is the only robust open source option to generate beautiful maps without compromising cartography.

What do you think of QGIS Atlas?

Let us know in the comments below.

Source

Πέμπτη 6 Αυγούστου 2015

Free QGIS Video Tutorial



BY CAITLIN DEMPSEY MORAIS



Discover Spatial is offering a free five lesson QGIS video tutorial. Aimed towards those interested in learning more about this open source GIS software, the tutorials cover the following areas: Why QGIS?, Identifying the main elements of the QGIS interface, Loading Shapefiles, Creating a map, Advanced styling techniques, Classifying vector data, Preparing a map for export & print, and Creating vector data. The video tutorials are self-paced.

Discover Spatial offers a varied library of video tutorials, both free and fee-based. Other free tutorial offerings include Fundamentals of remote sensing, Introduction to GIS Cloud, and Map Design 101: Designing for Digital Maps.

Visit: QGIS – A Beginner’s Guide

Κυριακή 2 Αυγούστου 2015

How to Geocode Addresses Using QGIS



BY CAITLIN DEMPSEY MORAIS





If you have a CSV formatted file containing addresses, you can take advantage of QGIS to map out those addresses. This article contains step by step instructions for geocoding addresses using QGIS.

First, you will need to have QGIS installed on your computer. QGIS is an open source GIS software application that is free to download (See: QGIS Download and Installation).
Install the MMQGIS Plugin

In order to geocode addresses from a CSV file, you will need to first install the plugin MMQGIS. MMQGIS contains a suite of very useful plugins for manipulating vector GIS data and was developed by Michael Minn. Contained within this set of plugins is the Geocoding plugins which lets users either geocode an address file using Googles or OpenStreetMap APIs or from a street layer.

To install the MMQGIS plugin, you will need to load the QGIS plugin repository by selecting Plugins –> Manage and Install Plugins from the menu bar.


This loads the Official QGIS Plugin Repository where a list of plugins is available. Select MMQGIS for installation by either scrolling down the alphabetical list of plugins or by filtering the list via the search bar at the top. Check the box next the mmqgis and then click on the install plugin button.
Geocoding an Address File in QGIS

Now that the plugin is installed, you can access the Geocoding function by click on MMQGIS –> Geocoding from the top menu bar.


There are two geocoding options: one for geocoding your address file using either Google or OpenStreetMap geocoding web services or by geocoding from a street layer. For this tutorial, the address file will be geocoded using Google’s geocoding API. Geocoding using one of the web service options will require an Internet connection.

Once the “Geocode CSV with Google / OpenStreetMap” option has been selected, a GUI for the Web Service Geocode opens. From the window, load the CSV file (if you have the address file in a spreadsheet such as MS Excelor Google Fusion Tables, you will need to export the data out as a CSV file). Within the CSV you must have the proper information for geocoding address. The first line of the CSV file should contain the column names with each separated by a comma. The second and all subsequent lines contain the records for that file with each column again separated by a column. Within this file you will need to have a column for the address, a column for the city, and a column for the state (for US records) and/or a column for the countries. For my geocoding, I am using a CSV file containing the rankings and company information for the Fortune 1000 companies in the United States.


Now set the parameters for geocoding; select from each section the street address, city, state, and country columns in the CSV file that match. For web service, pick the desired geocoding service. Note: there is a 2,500 record limit within a 24 hour period when using Google’s service. Lastly, set where you want the resulting shapefile and CSV file that will record any records that were not able to be geocoded.


Once you have set all the parameters, hit the “OK” button to start geocoding. The length of time for geocoding depends on how large your file is. It took about 7 minutes for my 1,000 record file of addresses to finish geocoding. I selected the Google Maps web service which limits geocoding to five records per second.

Once the geocoding is finished, the end result is a geocoded point shapefile. Appended to the table are two tables that describe how each point was determined.




Τετάρτη 29 Ιουλίου 2015

Generalization in GIS



BY CAITLIN DEMPSEY MORAIS




Sometimes GIS data contains an excess of detail or spatial information than what is needed for the scale of the map being prepared. Generalization is the method used in GIS to reduce detail in data. For example, a small scale map of the United States does not need detailed coastlines or a map of California does not need to show every road in the state.

Generalization can be achieved by removing detail, such as only showing major roads, showing only the boundary of a state instead of all the counties. In GIS generalization is also used to smooth out lines, removing small detail such as the nooks and crannies of a coastline or the meanderings of a stream.

Since detail about a geographic feature is simplified during generalization, generalized data is less spatially accurate. Those using generalized data to calculate length, perimeter, or area will incur errors in the calculations.


Generalization in ArcGIS
Depending on whether you are generalizing vector or raster data, there are different tools for generalizing GIS data using ArcGIS. There is a toolset in the Spatial Analyst toolbox in ArcGIS that allows for several different methods of generalization on raster data. The generalization tools in the toolset are grouped into three categories: Aggregating zones of data (Nibble, Shrink, Expand, Region Group, and Thin), smoothing data edges (Boundary Clean and Majority Filter), and reducing the resolution of a raster (Aggregate). For vector data, ArcGIS has aGeneralize tool in the Editing toolset which uses the Douglas-Peucker simplification algorithm to simplify lines. For additional generalization methods, the Generalization toolset found in the Cartography toolbox offers a range of tools for simplifying and reducing resolution of vector data for cartographic purposes.


SMOOTHING A LINE USING THE GENERALIZE TOOL IN ARCGIS. IMAGE: ESRI.


Generalization in QGIS

Generalization of vector data in QGIS can be achieved via the Simplify Geometries tool which is found by selecting Vector -> Geometry Tools -> Simplify geometries. From the popup window, you can then select the line or polygon layer you want to simplify and set the tolerance.



GENERALIZE FUNCTION IN QGIS.


MapShaper

If you need to generalize a GIS dataset independent of a desktop GIS application, MapShaper is a free online tool that allows you to upload a shapefile, GeoJSON, or TopoJSON file. You can then select the simplification method and whether to repair intersections, auto-snap, or prevent shape removal. Once the process has been run, a download link is provided with the newly generalized GIS data.



MAPSHAPER GENERALIZATION TOOL.




Τρίτη 28 Ιουλίου 2015

Adding Real-Time Weather Data from OpenWeatherMap: QGIS Python Programming CookBook



BY PACKT BOOKS




Learn how to add real-time weather data from OpenWeatherMap in QGIS using Python from this section as part of this preview chapter, Creating Dynamic Maps from QGIS Python Programming CookBook. With 140 short, reusable recipes to automate geospatial processes in QGIS, the QGIS Python Programming CookBook teaches readers how to use Python and QGIS to create and transform data, produce appealing GIS visualizations, and build complex map layouts.
Adding Real-Time Weather Data from OpenWeatherMap

Real-time data is one of the most exciting data types you can add to a modern map. Most data producers make data available through Open GIS Consortium (OGC) standards. One such example is OpenWeatherMap, which offers an OGC Web Map Service (WMS) for different real-time weather data layers. In this recipe, we’ll access that service to access a real-time weather data layer.

Getting ready
The only preparation needed for this recipe is to open the QGIS Python Console by clicking the Plugins menu and selecting PythonConsole.

How to do it…
We will add a WMS weather data layer for precipitation to a QGIS map.
  1. First we specify the parameters of the service for the service:service = ‘crs=EPSG:900913&dpiMode=7&featureCount=10&format=image/png&layers=precipitation&styles=&url=http://wms.openweathermap.org/service’
  2. Next we just create the raster layer specifying wms as the type:rlayer = QgsRasterLayer(service, “precip”, “wms”)
  3. Finally we add the precipitation layer to the map:

How it works…
A WMS request is typically a HTTP GET request with all of the parameters as part of the URL. In PyQGIS, you use a URL-encoded format but specify the parameters separate from the URL.The following map image shows the output of the precipitation layer in QGIS.

Σάββατο 11 Ιουλίου 2015

Disaster management with InaSAFE 2.0









An updated version of the Free and Open Source Software InaSAFE 2.0 was developed and released by Indonesia’s National Disaster Management Agency (BNPB) and the Australian Government along with the contribution of the World Bank-GFDRR.

InaSAFE 2.0 works as a plugin for QGIS and the new version includes the ability to work with road data, e.g., downloading roads maps directly from OpenStreetMap (OSM). According to Dr Syamsul Maarif, the Head of Indonesia’s National Disaster Management Agency, the software enables production of realistic natural hazard impact scenarios, by incorporating a range of natural hazard information, such as earthquakes, volcanoes, tsunami or flood; and exposure data, such as the spatial distribution of population, roads or critical infrastructure.

Assesing buildings that might flood with Flood Building Impact Function in InaSAFE 2.0 on QGIS 2.0 (screenshot by inasafe.org )


As in any new project, the software currently has a number of limitations and issues that need to be tackled and users also have to deal with the lack of appropriate datasets. On the other hand, InaSAFE 2.0, with functions like Flood Evacuation, Earthquake Building Impact etc. that can be used to improve human preparedness and contribute in efficient planning of emergency drills and designing of possible evacuation and emergency response routes for natural hazard impact scenarios, can certainly be an internationally significant, simple but rigorous tool for disaster management.