Vintage map design using QGIS

This is amazing, QGIS 2.0 is going from strength to strenth. Another great blog from Anita.

Free and Open Source GIS Ramblings

This post describes the three simple steps necessary to create a vintage-looking map using the blending feature in QGIS 2.0’s print composer. This is what we are aiming for:

alaska_oldpaper

1. Prepare the map

Like any other map, this one starts in the QGIS main window. Try to stick with earthy colors which will go well with the old paper look. For labels, try fonts which look like handwriting.

alaska_oldschool_overview

Once you are happy with your map

2. Prepare the composition background

To get that vintage feel, we need a background image with a great texture. You can find such textures on sites like lostandtaken.com. Download one you like and add it to an empty print composer. Make sure it covers the whole paper:

alaska_oldschool_bg

Lock the image by right-clicking it once – a small lock icon should appear in the upper left corner.

3. Finish the composition

The final step is…

View original post 42 more words

GIS Tips – Spatial Join data IN QGIS!

Just found this on the Harvard website (Harvard University QGIS Workshop) and it is something I have always done in ArcGIS, never thinking that it was even possible in QGIS, afterall why would I when ArcGIS has a big shiny “Spatial Join” button. So I was pretty surprised to read this, and then ticked another box off the list of QGIS v ArcGIS…I tell you now, the list is running pretty equal at present, the only thing missing is a 3D element to QGIS…..

Source: Harvard University QGIS Workshop 26/07/2013

A common GIS task is to join the attributes from one spatial data layer to another. In this example we will join the attribute table from a polygon layer to a points layer, based on which polygon contains the points.

Prepare Target Points Layer
  • For this exercise, we’ll use a set of points generated in Google Maps, showing some interesting sites in Taiwan
  • Add Vector Data, set UTF-8 encoding, and browse to china/taiwan_points.kml
  • Save As filename “TW_pts_big5” as format = ESRI Shapefile and encoding = BIG5 (we want to join BIG5 attribute table to this target layer, so SET CORRECT ENCODING FOR THE DATA THAT WILL BE JOINED)
  • Add the newly created TW_pts_big5 layer and remove the imported taiwan_points KML import layer.
  • Target Points layer should be ready for the join
Prepare Join Layer
  • Now we want to Add Vector Layer and browse to the TW_POP layer, encoding = big5
  • Open the Attribute Table to make sure the encoding looks okay. If it looks fine, close the attribute table.
  • Go to menu VECTOR | DATA MANAGEMENT TOOLS | JOIN ATTRIBUTES BY LOCATION

Run the Join
  • Set the TARGET LAYER = TW_points_big5, set the JOIN LAYER = TW_POP
  • Click on the OUTPUT SHAPEFILE BROWSE button to set output path, filename, and encoding = big5, then click SAVE
  • Click OK and you will be prompted to add the new join shapefile to the TOC (table of contents), click YES
  • Open the Attribute Table of the new join layer. Each point feature now includes the attributes from the JOIN layer, having done a SPATIAL JOIN on the polygon that the point was located in.


GIS Tips – Schedule your work in ArcGIS

Your workload is gigantic, you aren’t getting enough work done in the office, so why not SCHEDULE some work? If you have a simple task which you run every day (or night) you may be able to schedule it to run at a set time using the folling method, I am not too sure on other operating systems, but I got this to work on Windows 7 and ArcGIS 10.1.

Once you are sure your model runs you can do the following. In this example I will be doing a very simple buffer to illustrate the process.

ArcGIS Model

1. Click on Model -> Export -> To Python Script and give it a name. In this case I will call it buffer.py.

2. Inspect the Python Script. In this case it looks like:

# -*- coding: utf-8 -*-
# —————————————————————————
# buffer.py
# Created on: 2012-12-11 21:26:00.00000
#   (generated by ArcGIS/ModelBuilder)
# Description:
# —————————————————————————

# Import arcpy module
import arcpy

# Local variables:
Input_DataSet = “Streams”
Streams = “D:\\Projects\\cra\\geodatabase\\CRA_current.gdb\\ConasaugaRiverWatershed\\Streams”
Output_Dataset = “C:\\modelbuilder\\output\\Buffer200Feet.shp”

# Process: Buffer
arcpy.Buffer_analysis(Streams, Output_Dataset, “200 Feet”, “FULL”, “ROUND”, “NONE”, “”)

3.  Make sure that python is added to the path statement in Control Center -> Advanced System Settings -> Environment Variables

4. Open Task Scheduler

Task Scheduler

 5. Click Create a Basic Task in the Actions Panel to the right. Give your task a descriptive name and a small description.

Task Scheduler Screen 1

6. Determine when you want the task to run. Click Next. Then Select the time:

Task Scheduler TimeTask Schedler Time

 7. Select Start a program from the list of actions.

Task Scheduler Program

 8.  Select the script:

Task Scheduler Script

 9: Finally at the end review your settings and click finish.

With any luck your scheduled task will run at the correct time. Please not that an ArcGIS license must be available for the script to run.

You can find the official ESRI Help page here

GIS Quick Tip – Create an "action" in QGIS

Just found this in QGIS and have had a quick play and really like the way it functions, so wanted to share it with everyone. It’s early days, so once I get to grips with it I will post something a bit more descriptive.

QGIS has Attribute Actions where an action can be performed that uses the value of a feature’s attribute, e.g. opening a pdf or image of an asset. It is possible to run queries or python scripts and capture the results. I’m going to add an action to the Named Place layer that performs a Google search on the location’s name:-

  1. Right click on the layer in the Layer Properties panel.
  2. Select Properties to open the Properties dialogue box
  3. Select the Actions tab:-
    1. Select the action type; in this case it’s Generic
    2. Name the action
    3. Enter the details of the action. I need to add the path to the web browser wrapped in speech marks. I then need to leave a space and then add the URL to be opened wrapped in speech marks.
    4. Press the Insert Field button to add a fieldname to the action.
    5. The final text should read: “C:/Program Files/Internet Explorer/iexplore.exe” “http://google.com/search?q=%5B% “NAME” %]“
  4. Click the Add to Action List button.

QGIS Layer Actions dialogue

To run the action for a feature, use the information tool to select a feature from the layer; and then select the Action from Identify results pop up:-

QGIS Layer Actions dialogue

Existing actions can be updated by selecting the action and pressing the update selected Action button

GIS Quick Tip – Create an “action” in QGIS

Just found this in QGIS and have had a quick play and really like the way it functions, so wanted to share it with everyone. It’s early days, so once I get to grips with it I will post something a bit more descriptive.

QGIS has Attribute Actions where an action can be performed that uses the value of a feature’s attribute, e.g. opening a pdf or image of an asset. It is possible to run queries or python scripts and capture the results. I’m going to add an action to the Named Place layer that performs a Google search on the location’s name:-

  1. Right click on the layer in the Layer Properties panel.
  2. Select Properties to open the Properties dialogue box
  3. Select the Actions tab:-
    1. Select the action type; in this case it’s Generic
    2. Name the action
    3. Enter the details of the action. I need to add the path to the web browser wrapped in speech marks. I then need to leave a space and then add the URL to be opened wrapped in speech marks.
    4. Press the Insert Field button to add a fieldname to the action.
    5. The final text should read: “C:/Program Files/Internet Explorer/iexplore.exe” “http://google.com/search?q=%5B% “NAME” %]“
  4. Click the Add to Action List button.

QGIS Layer Actions dialogue

To run the action for a feature, use the information tool to select a feature from the layer; and then select the Action from Identify results pop up:-

QGIS Layer Actions dialogue

Existing actions can be updated by selecting the action and pressing the update selected Action button

Have you tried Open Source GIS Software?…Why Not?…

As I write this, I can hear a million IT technicians holding their head and groaning…why? Because they will tell you that open source isn’t safe, it crashes all the time and it’s not supported so what do you do when it has corrupted your hard drive.

It’s this kind of scare mongering that has held QGIS back from being the definitive GIS and why ESRI has flourished. So lets quickly cover those issues briefly;

  • Open Source isn’t safe – Maybe, it has been put together by someone passionate enough about GIS to make it available to the wider community rather than charge them thousands…Considering how I have had software costing thousands crashing my machine, it is hardly a fair statement.
  • Open Source Crashes All the time – Not true, it doesn’t have any more issues than some of the bigger software out there, it’s just that you are more likely to hear when QGIS has a bug than ArcGIS due to the method of support…
  • Open Source isn’t supported – Oh yes it is, this is what makes open source far superior to off the shelf software! If I have a problem with open source software, I get on the internet and there is a huge community ready to help, eager to not only solve the problem but to make it a more efficient software. If I get a problem with off the shelf software, I have to contact their customer support and wait a week for a solution, if there is one, if not then you have to wait until the next “bug release” or fix….

You may be sat there thinking I am bias , that I am an open source advocate or developer, but you’d be wrong, I am just like you, in fact I have been a strong advocate of commercial software until the last few years….Until I found that there were things I needed to do that I could do for free in open source, then as I used open source more and more I found that it was actually pretty flexible and when I asked “why doesn’t it do this?” I would find that it would suddenly appear, thanks to an amazing community.

I’m not saying throw your FME out the window, what I AM saying is download QGIS or GRASS and give it a go, have a look at some of those tasks you find tricky in MapInfo or ArcGIS….You never know, you may like it 🙂

To get you started I put together a little list of Open Source software:

FlowMap
FlowMap is a freeware application designed to analyze and display flow data. This application was developed at the Faculty of Geographical Sciences of the Utrecht University in the Netherlands.
Platforms: Windows OS

GMT Mapping Tools
GMT is a free, public-domain collection of ~60 UNIX tools that allow users to manipulate (x,y) and (x,y,z) data sets (including filtering, trend fitting, gridding, projecting, etc.) and produce Encapsulated PostScript File (EPS) illustrations ranging from simple x-y plots through contour maps to artificially illuminated surfaces and 3-D perspective views in black and white, gray tone, hachure patterns, and 24-bit color.
Platforms: UNIX, Macintosh

GRASS
Geographic Resources Analysis Support System (GRASS) is the public domain GIS software application originally developed by the US Government. GRASS is probably the most well-known open source and original GIS software applications. GRASS is a raster-based GIS, vector GIS, image processing system, graphics production system, data management system, and spatial modeling system. GRASS can be downloaded for free.
Platforms: Linux, Macintosh, Sun Solaris, Silicon Graphics Irix, HP-UX, DEC-Alpha, and Windows OS
Further ResourcesGRASS

gvSIG
gvSIG is an open source GIS application written in Java.
Platforms: Windows, Macintosh, Linux, UNIX

MapWindow GIS
MapWindow GIS is open source GIS application that can be extended through plugins.  The application is built using Microsoft’s .NET
Platforms: Windows

OpenJUMP GIS
OpenJUMP GIS is an open source GIS written in Java through a collaborative effort by volunteers.  Formerly known as JUMP GIS, the application can read shapefiles and GML format files.
Platforms: Windows, Macintosh, Linux, UNIX

Quantum GIS 
Also referred to as QGIS, Quantum GIS is an Open Source Geographic Information System (GIS).
More: Getting Started With QGIS: Open Source GIS
Platforms: Linux, Unix, Mac OSX, and Windows.

SPRING
SPRING is a GIS and Remote Sensing Image Processing system with an object-oriented data model which provides for the integration of raster and vector data representations in a single environment.
Platform: Windows, Linux, UNIX, Macintosh

TNTLite
TNTLite MicroImages, Inc. provides TNTlite as a free version of TNTmips , the professional software for geospatial data analysis. The free TNTlite product has all the features of the professional version, except TNTlite limits the size of Project File objects, and TNTlite enables data sharing only with other copies of TNTlite (export processes are disabled). Can either be downloaded or ordered on CD.
Platforms: Windows

uDig GIS
uDig GIS is a free, open source GIS desktop application that runs on Windows, Linux and MacOS. uDig was designed to use OGC’s OpenGIS standards such as WMS, WFS and more. One-click install allows you to view local shapefiles, remote WMS services and even directly edit your own spatial database geometries.
Platforms: Windows, Linux, Macintosh

uDig GIS

uDig GIS

Open Source Web Mapping

GeoMajas
Written in java, GeoMajas is an open source GIS framework for the web.

GeoServer
Java based open source server software that allows users to edit and share geospatial data and uses open standards to spublish GIS data.

MapGuide Open Source
First introduced as open source by Autodesk in 2005, MapGuide Open Source  allows for the development of web based mapping.

MapFish
An open source mapping development framework for web mapping applications based on the Pylon Pythons web framework.

MapServer
MapServer is an Open Source development environment for building spatially enabled Internet applications. The software builds upon other popular Open Source or freeware systems like Shapelib, FreeType, Proj.4, libTIFF, Perl and others.

OpenLayers
Javascript library that is open source for displaying GIS data within a browser environment.   OpenStreetMap uses OpenLayers for its main map display (aka the “Slippy Map“).

TileMill
Built on open source libraries (Mapniknode.jsbackbone.js,express and CodeMirror).  The Chicago Tribune included TileMill in a series entitled Making Maps using PostGIS, Mapnik, TileMill, and Google Maps.

Open Source GIS Components and Packages

EDBS Reader
A free (GPLed) reader software for the EDBS format has been released: EDBS_extra 2.0. This open source utility is written in ‘C’. The page is mostly in German.

fmaps
GIS/RS application for Linux and Gnome platforms. Open source code is available for downloading from this site.

GeoTools
GeoTools is an open source, Java GIS toolkit for developing standards compliant solutions. It’s modular architecture allows extra functionality to be easily incorporated. GeoTools aims to support OpenGIS and other relevant standards as they are developed.

MITAB
MITAB is an Open Source (i.e. Free) C++ library to read and write MapInfo .TAB (binary) and .MIF/MID files. It is based on the OGR library which is an implementation of the Open GIS Consortium Simple Feature specification.

OpenEV
OpenEV is a library, and reference application for viewing and analysing raster and vector geospatial data. Download for Windows 98/NT/2000, Linux, Irix or Solaris systems.

OpenMap
OpenMap is a FREE JavaBeans open source software component for viewing spatial data. JavaBeans is a component specification for software written in the Java language. In contrast to other GIS software components which offer both data viewing and analysis capabilities, OpenMap is primarily for data viewing and offers very little in the way of analysis functionality.

rmap
rmap is a package that will allow you to generate images of the earth from a distance or fairly zoomed in. The code is a small C binary that reads a datafile of vectors to generate the image.

Tkgeomap
Tkgeomap is a set of extensions to the Tcl/Tk scripting language for manipulating and displaying geographic data.

Topology Framework .NET (TF.NET)
TF.NET represents a managed topology manipulation API capable of handling managed objects representation of topological entities based on other popular APIs, exposing it’s JTS-based common topology manipulation core to them. Supported external managed APIs include: OSGeo Feature Data Objects (FDO) geometries, OSGeo MapGuide Server (FDO-based) geometries and Autodesk ObjectARX geometries (a.k.a. entities) and, most recently, Oracle’s ODP.NET.  Functions provided include: Spatial predicates (based on the DE-9IM model), Overlay functions (intersection, difference, union, symmetric difference), Buffer, Convex hull, Area and distance functions, Topological validity checking, Coordinate systems manipulation (transformations), Topological graphs manipulation, and more. TF.NET libraries are free, licensed under GNU LGPL and available for download from Google Code page.

Vhclmaps
Vhclmaps is a package of map viewers and spatial data servers that work with map databases.

GIS Tips – How to Georeference (give images location) in QGIS using Google Earth

How to georeference a satellite image in QGIS

 1. Open the “Georeferencer” plugin:

The Georeferencer dialog box will appear:

2. Click the “Open raster” icon to add the satellite image.

Navigate to the image, select it, and click “Open”. The image will appear in the dialog box.

The next few steps might take some practice. Do not get discouraged if the process does not seem to work perfectly the first time!

3. Open Google Earth. In Google Earth, open a kml file of one of the data layers that you have opened in QGIS, you will see that I’ve used this point data with pretty yellow dots. If you don’t already have any data just create 3 points spaced around the map but ensure they fall on recognisable features….you’ll see why in a minute!

4. Now we will use Google Earth to help us identify the locations of several points on the image we wish to georeference. The Georeferencer tool will use this information to correctly place the image within our map.

Pick 3 or 4 points  that are located near the edge of the screen. We will use points “17”, “8”, and “7”.

We’ll start with point “17”. Zoom in a little bit in Google Earth.

5. Now zoom in on the same area in the Georeferencer. To do that, use this tool to draw a box around the area: 

Here’s what we now see in the Georeferencer:

6. Let’s get even closer for greater precision. Repeat steps 7 and 8 as many times as need, so that the Google Earth image and the image you are georeferencing are so enlarged that they become pixelated and you can see clearly the individual cells:

7. Now create a reference point in the Georeferencer that corresponds to point “17”. To add a point, click this icon:

Use the point in Google Earth as a reference. When you are confident that you have found the right spot in the image that you are georeferencing, click it. A new dialog box will appear.

8. You have two options for filling in the X and Y coordinates. You may copy and paste the coordinates from Google Earth (right click the point, and select “Properties”) or you may click the “From map canvas” icon, which allows you to click on the point that appears in the QGIS map. If you chose to copy and paste coordinates, remember that X = latitude and Y = longitude.

This is where your use of Google Earth pays off as you have a good Lat/Lon position to relate your image to!

Click “OK”. The point will appear in the image, and the bottom section of the Georeferencer tool will display some descriptive information.

9. Now zoom back out in QGIS and in Google Earth, and repeat steps 7 – 11 for at least two more points.

10. Almost done. We must now provide transformation settings. Click this icon:

When your settings match the settings in the image below, click “OK”. Notice that you will have to choose a location and a name for the new tif image that you are creating.

11. To finish the process, click this icon:

The Georeferencer will now create a new file (a tif image) in the folder you selected and it will also add the image to your map:

This image will never need to be georeferenced again. Every time you open the tif file (not the original file, which is still just an image) in QGIS, the satellite photo will appear in its correct location.