<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Spatial Horizons &#187; QGIS</title>
	<atom:link href="http://spatialhorizons.com/category/qgis/feed/" rel="self" type="application/rss+xml" />
	<link>http://spatialhorizons.com</link>
	<description>Exploring Geographic Technologies with GIS, GPS, C#, XNA, and Open Source Tools</description>
	<lastBuildDate>Thu, 18 Sep 2008 19:00:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using QGIS (5) &#8211; Export to MapServer</title>
		<link>http://spatialhorizons.com/2007/10/06/using-qgis-5-export-to-mapserver/</link>
		<comments>http://spatialhorizons.com/2007/10/06/using-qgis-5-export-to-mapserver/#comments</comments>
		<pubDate>Sat, 06 Oct 2007 22:42:10 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Mapserver]]></category>
		<category><![CDATA[QGIS]]></category>

		<guid isPermaLink="false">http://spatialhorizons.com/2007/10/06/using-qgis-5-export-to-mapserver/</guid>
		<description><![CDATA[Our last post for now on QGIS will cover an interesting feature added in the recent versions. A new &#8220;Export to MapServer Map&#8221; command creates a MapServer configuration file (simply called a &#8220;mapfile&#8221;) from an existing QGIS map. That mapfile can be used to then display the data on a website or use it in [...]]]></description>
			<content:encoded><![CDATA[<p>Our last post for now on <a href="http://www.qgis.org/">QGIS</a> will cover an interesting feature added in the recent versions. A new &#8220;Export to MapServer Map&#8221; command creates a MapServer configuration file (simply called a &#8220;mapfile&#8221;) from an existing QGIS map. That mapfile can be used to then display the data on a website or use it in a desktop application. The desktop option is what we will take a look at because we will now have an easy way to create a mapfile that we can use with some of our <a href="http://spatialhorizons.com/2007/06/24/mapscript-and-xna-1/">MapServer/XNA tutorials</a> we demonstrated in the past.</p>
<p><strong>Python Installation</strong></p>
<p>The Export to MapServer tool will only work if the Python programming language is installed on your computer.  The latest version (2.5.1) of Python is required so we first need to download and  install it <a href="http://www.python.org/download/releases/2.5.1/">here</a>.</p>
<p><strong>Open a QGIS Map</strong></p>
<p>After the installation, go ahead and open a QGIS map. We will continue to use the world map project created in the <a href="http://spatialhorizons.com/2007/09/23/using-qgis-3-more-layer-symbology/">previous posts</a>.  As a reminder, we have two layers in our map &#8211; a vector layer showing country outlines and a raster background image.</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/qgis_raster_aligned.jpg" alt="QGIS Map" /></p>
<p><span id="more-111"></span><br />
<strong>Export to MapServer</strong></p>
<p>Under the File menu option, select the &#8220;Export to MapServer Map&#8221; item:</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/10/qgis_export2mapserver.jpg" alt="Export to MapServer" /></p>
<p>The window that opens requires you to input some information before creating the mapfile. First you need to select a location for the new mapfile. Then pick the QGIS project file that you will be creating it from (it does not automatically use the currently open project in QGIS).  Provide a map name, enter the size, and make sure the units drop-down box matches the map&#8217;s units. Our map is only in longitude/latitude units so we chose dd (decimal degrees). We will skip the box covering the Web Interface Definition so our filled out menu looks like this:</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/10/qgis_export2mapserver2.jpg" alt="Export to MapServer" /></p>
<p>Press Ok to run the export and the mapfile will be created.</p>
<p><strong>Viewing the Mapfile</strong></p>
<p>Find the created mapfile and open it in your favorite text editor. The mapfile is a structured document that contains groups of elements that begin with a name (e.g., MAP, PROJECTION, LAYER) and end with END.  It also contains single-line attributes using the key-value syntax (e.g., NAME &#8216;World Map&#8217;, TRANSPARENCY 100, OUTLINECOLOR 0 0 0).  It is very similar to an XML file but without the brackets and slashes.</p>
<p>For a complete reference on the syntax of mapfiles, check out their <a href="http://mapserver.gis.umn.edu/docs/reference/mapfile">help</a> page on the web. Even without reading the help file, most of the mapfile can be understood by simply glancing at the text. For example, our world raster image appears in the mapfile like this:</p>
<pre>LAYER
    NAME 'world_raster'
    TYPE RASTER
    DATA 'M:\\World\\world_raster.tif'
    METADATA
      'wms_title' 'world_raster'
    END
    STATUS DEFAULT
    TRANSPARENCY 100
    PROJECTION
    'proj=longlat'
    'ellps=WGS84'
    'datum=WGS84'
    'no_defs'
    END
  END</pre>
<p>It is easy to determine the between the LAYER and END tags, the raster is described with it&#8217;s name, type, file location, and projection information.</p>
<p>Our shapefile of world countries is slightly longer but similar:</p>
<pre>LAYER
    NAME 'world_adm0'
    TYPE POLYGON
    DATA 'M:\\World\\world_adm0.shp'
    METADATA
      'wms_title' 'world_adm0'
    END
    STATUS DEFAULT
    TRANSPARENCY 100
    PROJECTION
    'proj=longlat'
    'ellps=WGS84'
    'datum=WGS84'
    'no_defs'
    END
    CLASS
       NAME 'world_adm0'
       STYLE
         SYMBOL 0
         SIZE 6
         OUTLINECOLOR 0 0 0
         COLOR 144 50 207
       END
    END
  END</pre>
<p>The major difference between this and the raster file is the addition of a CLASS and STYLE element. They define the coloring of the countries using the OUTLINECOLOR and COLOR attributes. </p>
<p>Sometimes our mapfile doesn&#8217;t exactly match how QGIS had it displayed. In our QGIS map, we displayed the countries with a transparent fill so only the black outlines showed on the map.  To make our exported mapfile match that, we need to remove the &#8220;COLOR 144 50 207&#8243; line and save the mapfile.</p>
<p><strong>Testing the Mapfile</strong></p>
<p>There are various ways our mapfile could be tested in another application. The coolest example would be to go back to our <a href="http://spatialhorizons.com/2007/06/24/mapscript-and-xna-1/">Mapscript/XNA tutorials</a>. The result of these tutorials was a C# program that uses <a href="http://msdn2.microsoft.com/en-us/xna/default.aspx">XNA</a> as the graphics engine and Mapscript (Mapserver&#8217;s API) to generate map images from a mapfile (download the project&#8217;s source code in this <a href="http://spatialhorizons.com/2007/07/08/mapscript-and-xna-3/">post</a>).</p>
<p>In our program, we simply need to change the line of code where our mapfile path is defined to point to our new mapfile created from the QGIS export.</p>
<p>
<pre lang="csharp">mapserver = new shMapserver(@"M:\World\world_mapfile.map", 600, 600);</pre>
</p>
<p>Running the program will prove that our new mapfile works and allow us to zoom around the world.</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/10/xna_with_world_mapfile.jpg" alt="World Mapfile in XNA" /></p>
<p><strong>Conclusion</strong></p>
<p>QGIS is a free, easy-to-use, software program for viewing and exploring geographic data.  The reason for discussing it in some depth is that if we want to start developing our own mapping applications, we need to begin acquiring GIS data and making our own maps. QGIS also gives us an easy way to produce MapServer mapfiles as we demonstrated above.</p>
]]></content:encoded>
			<wfw:commentRss>http://spatialhorizons.com/2007/10/06/using-qgis-5-export-to-mapserver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using QGIS (4) &#8211; Raster Images</title>
		<link>http://spatialhorizons.com/2007/09/26/using-qgis-4-raster-images/</link>
		<comments>http://spatialhorizons.com/2007/09/26/using-qgis-4-raster-images/#comments</comments>
		<pubDate>Wed, 26 Sep 2007 18:42:43 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[QGIS]]></category>

		<guid isPermaLink="false">http://spatialhorizons.com/2007/09/26/using-qgis-4-raster-images/</guid>
		<description><![CDATA[
Geographic data can be separated into 2 types: vector and raster data.  We&#8217;ve already introduced vector data (points, lines, and polygons) in our previous posts on QGIS. We now need to briefly discuss raster images and how to use them.
In  terms of GIS, raster images (often referred to as just &#8220;rasters&#8221;) are pixel-based [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/raster_sample.jpg" alt="Raster Image Sample" /></p>
<p>Geographic data can be separated into 2 types: vector and raster data.  We&#8217;ve already introduced vector data (points, lines, and polygons) in our <a href="http://spatialhorizons.com/2007/09/09/using-qgis-1-introduction/">previous posts</a> on QGIS. We now need to briefly discuss raster images and how to use them.</p>
<p>In  terms of GIS, <a href="http://www.sli.unimelb.edu.au/gisweb/GISModule/GIST_Raster.htm">raster images</a> (often referred to as just &#8220;rasters&#8221;) are pixel-based images of places on the earth. They are often captured from cameras on satellites or airplanes and the pictures can be taken in color, black and white, or include <a href="http://www.datafinder.org/metadata/bg/orthos2005_markhurd_sample_mrsid_cir.jpg">infrared</a> wavelengths.  </p>
<p><span id="more-115"></span></p>
<p>It should be noted that there are numerous methods for creating rasters from non-aerial sources, including <a href="http://en.wikipedia.org/wiki/Spatial_interpolation">spatial interpolation</a> and <a href="http://en.wikipedia.org/wiki/Vector_to_raster">vector-to-raster</a> conversions.</p>
<p><strong>What is a World File?</strong></p>
<p>Raster images by themselves are are not very useful unless you know where on the earth&#8217;s surface it was taken. So most raster files have an accompanying <a href="http://en.wikipedia.org/wiki/World_file">world file</a> that describes both where the image is located and the geographic size of each pixel.  A quick demonstration will hopefully illustrate how the world file is used.</p>
<p>First, let&#8217;s return to our countries of the world map we setup in QGIS in the <a href="http://spatialhorizons.com/2007/09/23/using-qgis-3-more-layer-symbology/">last post</a>. The countries symbology was changed to outline each polygon in black and have a transparent interior (select the &#8220;No Fill&#8221; option in the Fill Patterns box in the layer properties menu).</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/qgis_countries_hollow.jpg" alt="Countries of the World" /></p>
<p>What if we wanted to add a raster image of the world to create a better looking map?  Fortunately, we already have a raster image we used in previous projects that was downloaded from the <a href="http://commons.wikimedia.org/wiki/World_map">Wikipedia Commons</a>.  We downloaded the image, resized it to 600&#215;300 and exported it to a TIFF file [click <a href="http://spatialhorizons.com/downloads/world_raster.tif">here</a> to download the revised image].</p>
<p>In QGIS, a raster can be added by going to the <strong>Layer&#8230;Add a Raster Layer</strong> menu option so if you were to add the world raster without a world file, this is what happens:</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/qgis_raster_misaligned.jpg" alt="Raster Misaligned in QGIS" /></p>
<p><strong>Creating the World File</strong></p>
<p>To align the image correctly, we need to create an accompanying world file using a text editor. Create a blank text file with the same name as the image except save it with the &#8220;.tfw&#8221; file extension (short for tiff world file).</p>
<p>The world file needs 6 lines, each with a specific piece of information (see <a href="http://en.wikipedia.org/wiki/World_file">Wikipedia&#8217;s entry</a> or <a href="http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&#038;d=17489">ESRI&#8217;s support page</a> for more information).</p>
<pre>Line 1: Pixel size in X direction
Line 2: Y-axis rotation
Line 3: X-axis rotation
Line 4: Negative of the Pixel size in Y direction
Line 5: X coordinate of the CENTER of upper-left most pixel
Line 6: Y coordinate of the CENTER of upper-left most pixel</pre>
<p>Determining those 6 values requires us to know some information beforehand about our raster image. First, the image coordinates are in longitude (X) and latitude (Y). And since it covers the entire world, we know that in the X direction, there are 360 degrees (-180 to 180) and 180 degrees (-90 to 90) in the Y direction.  Mapping this out looks like this:</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/02/latlon_map.jpg" alt="World Map with Longitude and Latitude" /></p>
<p>Remembering our image is 600 pixels wide by 300 pixels high, we can now solve for the 6 world file lines.</p>
<pre>Line 1: Pixel size in X direction =
        360 degrees / 600 pixels = 0.6 degrees per pixel
Line 2: Y-axis rotation = 0
Line 3: X-axis rotation = 0
Line 4: Negative of the pixel size in Y direction =
        180 degrees / 300 pixels = -0.6 degrees per pixel</pre>
<p>It is important to note that lines 5 and 6 ask for the CENTER of the pixel. The upper-left corner of the image is (-180, 90) but we need to know the center of that pixel so a slight calculation needs to occur. Since we already calculated the geographic size of each pixel in lines 1 and 4, we just need to add or subtract half of those values.</p>
<pre>Line 5: X coordinate of center of upper-left pixel =
        -180 degrees + (0.6  / 2) = -179.7
Line 6: Y coordinate of center of upper-left pixel =
        90 degrees - (0.6 / 2) = 89.7</pre>
<p>So our finished world file looks like this:</p>
<pre>0.6
0.0
0.0
-0.6
-179.7
89.7</pre>
<p>Click <a href="http://spatialhorizons.com/downloads/world_raster.tfw">here</a> to download the world file.</p>
<p><strong>Adding the Raster in QGIS</strong></p>
<p>Now with both a raster image and a valid world file in the same directory on your hard drive, remove the misaligned raster and re-add it. QGIS (and most other GIS programs) will automatically locate the world file and perform the necessary adjustments to display the image correctly in the map.</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/qgis_raster_aligned.jpg" alt="Raster aligned in QGIS" /></p>
<p>The good news is almost any raster you download will come with a world file so it&#8217;s rare you will ever have to actually create one yourself. It is important to know what world files are, how they are named, and the concepts behind the calculations. </p>
<p><strong>World Files and Map Projections</strong></p>
<p>World files are closely related to important concept in GIS called <a href="http://en.wikipedia.org/wiki/Map_projections">projections</a>. Projections can be confusing and at times difficult to grasp to those less familiar with geography and GIS. All our of examples at Spatial Horizons have used the &#8220;<a href="http://en.wikipedia.org/wiki/Plate_carr%C3%A9e_projection">Equirectangular projection</a>.&#8221;  Also called the &#8220;geographic projection&#8221;, this projection treats longitude and latitude values simply as X and Y, making mapping simple and easy to understand. The trade-off to using this most basic of projections is the distortions produced make distance measurements and area calculations inaccurate. We may address projections in more detail in a future post.</p>
]]></content:encoded>
			<wfw:commentRss>http://spatialhorizons.com/2007/09/26/using-qgis-4-raster-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using QGIS (3) &#8211; More Layer Symbology</title>
		<link>http://spatialhorizons.com/2007/09/23/using-qgis-3-more-layer-symbology/</link>
		<comments>http://spatialhorizons.com/2007/09/23/using-qgis-3-more-layer-symbology/#comments</comments>
		<pubDate>Sun, 23 Sep 2007 14:22:26 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[QGIS]]></category>

		<guid isPermaLink="false">http://spatialhorizons.com/2007/09/23/using-qgis-3-more-layer-symbology/</guid>
		<description><![CDATA[This post continues a look at the basics of GIS using the mapping program Quantum GIS (QGIS). We&#8217;ve already covered how to install and use QGIS in a previous post.  In addition, we also introduced shapefiles, including how to download and use them in QGIS. Before moving on to another topic, it is worth [...]]]></description>
			<content:encoded><![CDATA[<p>This post continues a look at the basics of GIS using the mapping program <a href="http://www.qgis.org/">Quantum GIS (QGIS)</a>. We&#8217;ve already covered how to install and use QGIS in a <a href="http://spatialhorizons.com/2007/09/09/using-qgis-1-introduction/">previous post</a>.  In addition, we also <a href="http://spatialhorizons.com/2007/09/17/using-qgis-2-layer-symbology/">introduced</a> shapefiles, including how to download and use them in QGIS. Before moving on to another topic, it is worth demonstrating another example of downloading a shapefile and setting up it&#8217;s symbology in QGIS. </p>
<p><strong>Data Download</strong></p>
<p>Shapefiles generally come in three types &#8211; points, lines, and polygons. Our previous examples have used line shapefiles but this time we will download a polygon shapefile.  For example, we downloaded a countries of the world shapefile found <a href="http://www.cipotato.org/diva/data/MoreData.htm">here</a> that looks like this when loaded into QGIS:</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/qgis_countries.jpg" alt="Countries of the World Shapefile" /></p>
<p><span id="more-110"></span></p>
<p><strong>Layer Symbology</strong></p>
<p>To make the map more colorful, right-click on the layer name and select <strong>Properties</strong>. Under the <strong>Symbology</strong> tab, select <strong>Unique Value</strong> as the Legend Type and chose <strong>Name</strong> as the Classification Field. Each country polygon is then randomly assigned a color after pressing <strong>Ok</strong>.</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/qgis_countries_colored.jpg" alt="Countries of the World Shapefile" /></p>
<p><strong>Labeling</strong></p>
<p>We&#8217;ve avoided the topic of labeling so far because QGIS has limited labeling capabilities (improved labeling is <a href="http://blog.qgis.org/?q=node/23">coming</a> in future releases).  If you go back to the Layer&#8217;s properties, select the <strong>Labels</strong> tab, and then check the box to display labels, the map looks something like this:</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/qgis_countries_labels.jpg" alt="Countries with Labels" /></p>
<p>Zooming in closer reduces some of the overlap but country names are displayed several times if the country has multiple polygon shapes. It is possible to generate label placement positions in other programs and then use them in QGIS but that process is more complex and isn&#8217;t really relevant to our objectives.  Labeling aside, QGIS is still a free and easy-to-use GIS program that will help us compile data for our own mapping applications.</p>
<p>Next time will we introduce raster images and how to use them in QGIS. </p>
]]></content:encoded>
			<wfw:commentRss>http://spatialhorizons.com/2007/09/23/using-qgis-3-more-layer-symbology/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using QGIS (2) &#8211; Layer Symbology</title>
		<link>http://spatialhorizons.com/2007/09/17/using-qgis-2-layer-symbology/</link>
		<comments>http://spatialhorizons.com/2007/09/17/using-qgis-2-layer-symbology/#comments</comments>
		<pubDate>Mon, 17 Sep 2007 22:55:18 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[QGIS]]></category>

		<guid isPermaLink="false">http://spatialhorizons.com/2007/09/17/using-qgis-2-layer-symbology/</guid>
		<description><![CDATA[Our first post on using QGIS introduced the software along with how to download shapefiles, one of the most common GIS formats. Now we will explore how to use QGIS to make a better looking map.
Data Download
This time we are going to download a roads shapefile from the State of Michigan&#8217;s Center for Geographic Information. [...]]]></description>
			<content:encoded><![CDATA[<p>Our <a href="http://spatialhorizons.com/2007/09/09/using-qgis-1-introduction/">first post</a> on using <a href="http://www.qgis.org/">QGIS</a> introduced the software along with how to download shapefiles, one of the most common GIS formats. Now we will explore how to use QGIS to make a better looking map.</p>
<p><strong>Data Download</strong></p>
<p>This time we are going to download a roads shapefile from the State of Michigan&#8217;s <a href="http://www.mcgi.state.mi.us/mgdl/?rel=ext&#038;action=cext">Center for Geographic Information</a>.  They offer downloads by county so go ahead and select a county and then chose to download the &#8220;MI Geographic Transportation&#8221; zip file.  This zip file contains 3 shapefiles (named stroads, allroads, and railroad) but we will just use the &#8220;allroads&#8221; shapefile.  For our example, we used the roads shapefile from the <a href="http://www.mcgi.state.mi.us/mgdl/?rel=cext&#038;action=Washtenaw">Washtenaw County transportation file</a>.</p>
<p><strong>Roads Symbology</strong></p>
<p>Open QGIS and add the allroads shapefile.</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/qgis_roads_plain.jpg" alt="QGIS Roads Plain" /></p>
<p><span id="more-105"></span><br />
To make a map that looks good, we first need to add some color and style (&#8221;symbology&#8221;) to the roads.  Remember our <a href="http://spatialhorizons.com/2007/09/09/using-qgis-1-introduction/">last post</a> discussed how each GIS feature has associated information (&#8221;attributes&#8221;) that is stored in the shapefile.  The Michigan roads has an attribute named LEGALSYST that will allows us to categorize the roads. </p>
<p>The downloaded data also comes with a metadata PDF that describes the possible attribute values for LEGALSYST.  Looking there, we find that:</p>
<p>1 = State Trunkline<br />
2 = County Primary<br />
3 = County Local<br />
4 = City Major<br />
5 = City Minor<br />
7 = Unknown</p>
<p>Back in QGIS, right-click on the layer name, select <strong>Properties</strong> and then select the <strong>Symbology</strong> menu tab.  In the <strong>Legend Type</strong> drop-down box, select <strong>Unique Value</strong> and chose LEGALSYST in the classification field.  The vertical box on the right side is then automatically filled with all the possible the attribute values.  It should look like this:</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/qgis_symbology.jpg" alt="QGIS Symbology" /></p>
<p>Now we can select each value and set a color and width.  For example, since 1 represents highways, we selected a red color with 3 as the outline width. Both the County Primary(2) and City Major(4) categories were set to a tan color and a width of 2 while all the other categories were set to gray and a 1 width. Pressing <strong>Ok</strong> will then apply the symbology:</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/qgis_roads_colored.jpg" alt="QGIS Roads Colored" /></p>
<p>Zooming in shows the symbology in better detail:</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/qgis_roads_colored2.jpg" alt="QGIS Roads Colored" /></p>
<p>The map itself can be saved as a project in QGIS by selecting <strong>File&#8230;Save Project</strong> to ensure the custom symbology of our streets layer is saved.</p>
<p>Feel free to explore the symbology options in more detail because we can use these maps created in QGIS for a variety of purposes.</p>
]]></content:encoded>
			<wfw:commentRss>http://spatialhorizons.com/2007/09/17/using-qgis-2-layer-symbology/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using QGIS (1) &#8211; Introduction</title>
		<link>http://spatialhorizons.com/2007/09/09/using-qgis-1-introduction/</link>
		<comments>http://spatialhorizons.com/2007/09/09/using-qgis-1-introduction/#comments</comments>
		<pubDate>Sun, 09 Sep 2007 00:23:45 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[QGIS]]></category>

		<guid isPermaLink="false">http://spatialhorizons.com/2007/09/09/using-qgis-1-introduction/</guid>
		<description><![CDATA[We&#8217;ve briefly mentioned QGIS before but it is worth a more in-depth look now.  Some of our upcoming projects will require downloading and using GIS data so QGIS is a great program for viewing the data.  In their own words,
Quantum GIS (QGIS) is a user friendly Open Source Geographic Information System (GIS) that [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve briefly mentioned <a href="http://www.qgis.org/">QGIS</a> <a href="http://spatialhorizons.com/category/qgis/">before</a> but it is worth a more in-depth look now.  Some of our upcoming projects will require downloading and using GIS data so QGIS is a great program for viewing the data.  In their own words,</p>
<p class="shquote">Quantum GIS (QGIS) is a user friendly Open Source Geographic Information System (GIS) that runs on Linux, Unix, Mac OSX, and Windows. QGIS supports vector, raster, and database formats. QGIS is licensed under the GNU General Public License. QGIS lets you browse and create map data on your computer. It supports many common spatial data formats (e.g. ESRI ShapeFile, geotiff).</p>
<p>Let&#8217;s quickly describe how to install QGIS, download data, and make a basic map.  This post is primarily for those who have not used GIS software or data before.</p>
<p><strong>QGIS Installation</strong></p>
<p>Download the current release (v0.8.1) of QGIS <a href="http://qgis.org/index.php?option=com_content&#038;task=view&#038;id=65&#038;Itemid=71">here</a> and run the installation program. They recommend installing it to a file path without spaces (e.g. C:\QGIS) to enable <a href="http://download.qgis.org/qgis/">GRASS</a> functionality which we may use later on.</p>
<p>Running QGIS opens a blank map:</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/qgis_blankmap.jpg" alt="QGIS Blank Map" /></p>
<p><span id="more-81"></span></p>
<p><strong>Data Download</strong></p>
<p>We now need to download some GIS data to add to our map. Probably the most common vector data format is a <a href="http://en.wikipedia.org/wiki/Shapefile">Shapefile</a> and there are lots of places on the web to download them for free.  In the US, many state governments provide Shapefiles for geographic information such as roads, county boundaries, lakes, etc.  Do a search for your state name and GIS (e.g. &#8220;Michigan GIS&#8221;, &#8220;California GIS&#8221;) or browse <a href="http://www.gispilot.com/">www.gispilot.com</a> for links.</p>
<p>Once you&#8217;ve found a Shapefile, download and unzip it to a location on your hard drive.  You&#8217;ll immediately notice that the Shapefile is actually composed of several (3 or more) files.  For example, we went to the <a href="http://www.edc.uri.edu/rigis/data/transportation.aspx">Rhode Island GIS web site</a> and downloaded the &#8220;Roads &#8211; All&#8221; Shapefile.  After unzipping, there were 7 files named ROAD with different extensions  &#8211; ROADS.shp, ROADS.shx, ROADS.dbf, etc. These files collectively are referred to as a &#8220;Shapefile&#8221;.</p>
<p><strong>Mapping</strong></p>
<p>Back in QGIS, go to Layer&#8230;Add a Vector Layer or just press the V key.  Navigate to the location of the downloaded Shapefile and notice that only 1 file name appears.  In our example, &#8220;ROADS.shp&#8221; is shown so double-click on it to add it to the map. The roads are drawn in the map and the name appears in the legend on the left-hand side:</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/qgis_roadsmap.jpg" alt="QGIS Roads Map" /></p>
<p>Use the Map Navigation toolbar to explore the data:</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/qgis_toolbar.jpg" alt="QGIS Map Navigation Toolbar" /></p>
<p>Zoom in and use the Identify button to select a road feature.</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/qgis_identifytool.jpg" alt="QGIS Identify Tool" /></p>
<p>Upon selecting a feature, an identify window appears showing database information (&#8221;attributes&#8221;) about the road.</p>
<p><img src="http://spatialhorizons.com/wp-content/uploads/2007/09/qgis_identifyresult.jpg" alt="QGIS Identify Result" /></p>
<p>In our example, the road segment identified is named ATWOOD AVE and is located in PROVIDENCE county.  Most of the other attributes are numbers so often additional research is needed to determine what they represent. Some GIS data will provide metadata documenting the attribute values.  In the next post, we will use those attributes to classify the roads into groups and color them differently.</p>
<p>The next post will also introduce some more GIS data concepts that we will then incorporate in our custom mapping applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://spatialhorizons.com/2007/09/09/using-qgis-1-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QGIS on a UMPC</title>
		<link>http://spatialhorizons.com/2006/12/11/qgis-on-a-umpc/</link>
		<comments>http://spatialhorizons.com/2006/12/11/qgis-on-a-umpc/#comments</comments>
		<pubDate>Mon, 11 Dec 2006 00:06:12 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[QGIS]]></category>
		<category><![CDATA[UMPC]]></category>

		<guid isPermaLink="false">http://spatialhorizons.com/?p=6</guid>
		<description><![CDATA[This week I took a look at Quantum GIS (QGIS) on a UMPC.  QGIS is an open source mapping application that is free to use.  First I installed QGIS version 0.7.3 on a Samsung Q1 without any problems.  Then I setup a test map that consisted of some vector data that is [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">This week I took a look at <a target="_blank" href="http://qgis.org/">Quantum GIS (QGIS)</a> on a UMPC.  QGIS is an open source mapping application that is free to use.  First I installed QGIS version 0.7.3 on a <a target="_blank" href="http://www.samsung.com/uk/products/mobilecomputing/ultramobile/np_q1_v000suk.asp">Samsung Q1</a> without any problems.  Then I setup a test map that consisted of some vector data that is freely available from the <a target="_blank" href="http://www.michigan.gov/cgi">Michigan Center for Geographic Information</a>.</p>
<p class="MsoNormal"><img width="407" height="290" alt="QGIS on a Q1" id="image7" src="http://spatialhorizons.com/wp-content/uploads/2006/12/q1_w_qgis.JPG" /></p>
<p class="MsoNormal"><span id="more-6"></span></p>
<p class="MsoNormal"><!--[if !supportEmptyParas]--></p>
<p class="MsoNormal">The program launched successfully and ran as smooth as it does on a desktop environment.  Some of the menus were extending off the screen so while setting up the map, I increased the Q1â€™s resolution to 800 by 600.</p>
<p>Navigating the map works well with the stylus &#8211; maybe even more intuitive than using a mouse.</p>
<p><img width="403" height="300" id="image8" alt="QGIS on a Q1 with Stylus" src="http://spatialhorizons.com/wp-content/uploads/2006/12/q1_w_qgis2.JPG" /></p>
<p class="MsoNormal">In general, QGIS offers some beneficial features.  Users can bookmark locations of interest, select features onscreen, and view attribute tables of all the layers.  But by far the best feature is the ability to create and edit datasets.  Shapefiles can be created, attributes can be added, and points, lines, or polygons can be digitized right on the map.</p>
<p class="MsoNormal">In short, QGIS on a Q1 is a great solution.  The mobility of the Q1 combined with the ever-expanding functionality of QGIS makes this combination a viable option for many mobile applications.  It may lack some of the depth and polish of an ESRI application, but any shortcomings are offset by the editing capabilities and new features being added with every version.</p>
]]></content:encoded>
			<wfw:commentRss>http://spatialhorizons.com/2006/12/11/qgis-on-a-umpc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
