gis basics 2 - supportingdocument

15
BASIC MAPPING TOOLS AND MAKING A BASEMAP 1. Vector Tools Joining Tables Oftentimes you will have data that comes in a tabular format – say an excel file (.xls) or .csv file that you want to link with spatial data. For example, you can link a table containing information on barangay population to a shapefile that shows barangays. To associate non-spatial data with spatial data to use in your analysis, you link the tables through a function called “Joins” or “Joining Tables.” When making a join, your spatial data must have in common one row of data. For example, your shapefile should contain a row of barangay names and your excel file should contain a row of barangays and the data you’d like to associate with it. Remember, the linking of this data is temporary. Decimal Degrees to Degrees Minutes Seconds Many times you will receive coordinates in Degrees, Minutes and Seconds (DMS). Usually, GIS software requires these to be input as decimal degrees and/or provides outputs in decimal degrees, which is another way of expressing DMS. The following explains how to convert between decimal degree and DMS. Conversion from Decimal Degree to DMS 1. The whole units of degrees will remain the same (i.e. in 121.135° longitude, start with 121°). 2. Multiply the decimal by 60 (i.e. .135 * 60 = 8.1). 3. The whole number becomes the minutes (8'). 4. Take the remaining decimal and multiply by 60. (i.e. 0.1 * 60 = 6). 5. The resulting number becomes the seconds (6"). Seconds can remain as a decimal. 6. Take your three sets of numbers and put them together, using the symbols for degrees (°), minutes (‘), and seconds (") (i.e. 121°8'6" longitude) Conversion from DMS to Decimal Degree Decimal Degrees =Degrees + (Minutes/60) + (Seconds/3600) 1. Add Degrees to Minutes/60

Upload: june-reyes

Post on 14-Dec-2015

222 views

Category:

Documents


2 download

DESCRIPTION

BASIC MAPPING TOOLS AND MAKING A BASEMAP1. Vector ToolsJoining TablesOftentimes you will have data that comes in a tabular format – say an excel file (.xls) or .csv file that you want to link with spatial data. For example, you can link a table containing information on barangay population to a shapefile that shows barangays. To associate non-spatial data with spatial data to use in your analysis, you link the tables through a function called “Joins” or “Joining Tables.”When making a join, your spatial data must have in common one row of data. For example, your shapefile should contain a row of barangay names and your excel file should contain a row of barangays and the data you’d like to associate with it. Remember, the linking of this data is temporary. Decimal Degrees to Degrees Minutes SecondsMany times you will receive coordinates in Degrees, Minutes and Seconds (DMS). Usually, GIS software requires these to be input as decimal degrees and/or provides outputs in decimal degrees, which is another way of expressing DMS. The following explains how to convert between decimal degree and DMS. Conversion from Decimal Degree to DMS1. The whole units of degrees will remain the same (i.e. in 121.135° longitude, start with 121°).2. Multiply the decimal by 60 (i.e. .135 * 60 = 8.1).3. The whole number becomes the minutes (8').4. Take the remaining decimal and multiply by 60. (i.e. 0.1 * 60 = 6).5. The resulting number becomes the seconds (6"). Seconds can remain as a decimal.6. Take your three sets of numbers and put them together, using the symbols for degrees (°), minutes (‘), and seconds (") (i.e. 121°8'6" longitude) Conversion from DMS to Decimal DegreeDecimal Degrees =Degrees + (Minutes/60) + (Seconds/3600)1. Add Degrees to Minutes/602. Add the value result in step 1 to Seconds/3600 to get decimal degreesCreating Shapefile from XY coordinatesIn GIS software, you can create a vector data file from a table of X and Y coordinates. Your X coordinate will be longitude while your Y coordinate will represent latitude. It is important that you know what projection or geographic coordinate system the source data is in. Geoprocessing ToolsGeo-processing tools allow you to carry out a number of functions on vector data. In QGIS, they are found in the Vector menu under Geo-processing tools.ToolPurposeConvex hull(s)Create minimum convex hull(s) for an input layer, or based on an ID field.Buffer(s)Create buffer(s) around features based on distance, or distance field.IntersectOverlay layers such that output contains areas where both layers intersect.UnionOverlay layers such that output contains intersecting and non-intersecting areas.Symmetrical differenceOverlay layers such that output contains those areas of the input and difference layers that do not intersect.ClipOverlay layers such that output contains areas that intersect the clip layer.DifferenceOverlay layers such that output contains areas not intersecting the clip layer.DissolveMerge features based on input field. All features with identical input values are combined to form one single feature.Geometry ToolsGeometry tools allow you to carry out a number of functions on vector data related to the geometry or shape of the vector data you have. In QGIS, they are found in the Vector menu under Geometry tools.ToolPurposeCheck geometryCheck polygons for intersections, closed-holes, and fix node ordering.Export/Add geometry columnsAdd vector layer geometry info to point (XCOORD, YCOORD), line (LENGTH), or polygon (AREA, PERIMETER) layer.Polygon centroidsCalculate the true centroids for each polygon in an input polygon layer.Delaunay triangulationCalculate and output (as polygons) the delaunay triangulation of an input point vector layer.Voronoi PolygonsCalculate voronoi polygons of an input point vector layer.Simplify geometryGeneralize lines or polygons with a m

TRANSCRIPT

BASIC MAPPING TOOLS AND MAKING A BASEMAP1. Vector Tools

Joining Tables

Oftentimes you will have data that comes in a tabular format – say an excel file (.xls) or .csv file that you want to link with spatial data. For example, you can link a table containing information on barangay population to a shapefile that shows barangays. To associate non-spatial data with spatial data to use in your analysis, you link the tables through a function called “Joins” or “Joining Tables.”

When making a join, your spatial data must have in common one row of data. For example, your shapefile should contain a row of barangay names and your excel file should contain a row of barangays and the data you’d like to associate with it. Remember, the linking of this data is temporary.

Decimal Degrees to Degrees Minutes Seconds

Many times you will receive coordinates in Degrees, Minutes and Seconds (DMS). Usually, GIS software requires these to be input as decimal degrees and/or provides outputs in decimal degrees, which is another way of expressing DMS. The following explains how to convert between decimal degree and DMS.

Conversion from Decimal Degree to DMS1. The whole units of degrees will remain the same (i.e. in 121.135° longitude, start with 121°).2. Multiply the decimal by 60 (i.e. .135 * 60 = 8.1).3. The whole number becomes the minutes (8').4. Take the remaining decimal and multiply by 60. (i.e. 0.1 * 60 = 6).5. The resulting number becomes the seconds (6"). Seconds can remain as a decimal.6. Take your three sets of numbers and put them together, using the symbols for degrees (°), minutes (‘), and seconds (") (i.e. 121°8'6" longitude)

Conversion from DMS to Decimal Degree

Decimal Degrees =Degrees + (Minutes/60) + (Seconds/3600)

1. Add Degrees to Minutes/60

2. Add the value result in step 1 to Seconds/3600 to get decimal degrees

Creating Shapefile from XY coordinates

In GIS software, you can create a vector data file from a table of X and Y coordinates. Your X coordinate will be longitude while your Y coordinate will represent latitude. It is important that you know what projection or geographic coordinate system the source data is in.

Geoprocessing Tools

Geo-processing tools allow you to carry out a number of functions on vector data. In QGIS, they are found in the Vector menu under Geo-processing tools.

TOOL PURPOSECONVEX HULL(S) Create minimum convex hull(s) for an input layer, or based on an ID field.BUFFER(S) Create buffer(s) around features based on distance, or distance field.INTERSECT Overlay layers such that output contains areas where both layers intersect.UNION Overlay layers such that output contains intersecting and non-intersecting

areas.SYMMETRICAL DIFFERENCE

Overlay layers such that output contains those areas of the input and difference layers that do not intersect.

CLIP Overlay layers such that output contains areas that intersect the clip layer.DIFFERENCE Overlay layers such that output contains areas not intersecting the clip layer.DISSOLVE Merge features based on input field. All features with identical input values

are combined to form one single feature.

Geometry Tools

Geometry tools allow you to carry out a number of functions on vector data related to the geometry or shape of the vector data you have. In QGIS, they are found in the Vector menu under Geometry tools.

TOOL PURPOSECHECK GEOMETRY Check polygons for intersections, closed-holes, and fix node ordering.EXPORT/ADD GEOMETRY COLUMNS

Add vector layer geometry info to point (XCOORD, YCOORD), line (LENGTH), or polygon (AREA, PERIMETER) layer.

POLYGON CENTROIDS Calculate the true centroids for each polygon in an input polygon layer.DELAUNAY TRIANGULATION

Calculate and output (as polygons) the delaunay triangulation of an input point vector layer.

VORONOI POLYGONS Calculate voronoi polygons of an input point vector layer.SIMPLIFY GEOMETRY Generalize lines or polygons with a modified Douglas-Peucker

algorithm.DENSIFY GEOMETRY Densify lines or polygons by adding verticesMULTIPART TO SINGLEPARTS

Convert multipart features to multiple singlepart features. Creates simple polygons and lines.

SINGLEPARTS TO MULTIPART

Merge multiple features to a single multipart feature based on a unique ID field.

POLYGONS TO LINES Convert polygons to lines, multipart polygons to multiple singlepart lines.

LINES TO POLYGONS Convert lines to polygons, multipart lines to multiple singlepart polygons.

EXTRACT NODES Extract nodes from line and polygon layers and output them as points.

Data Management Tools

Data management tools allow you to carry out a number of functions on vector data related to data management such as defining projections. In QGIS, they are found in the Vector menu under Data Management tools.

TOOL PURPOSEDEFINE PROJECTION

Specify the CRS for shapefiles whose CRS has not been defined.

JOIN ATTRIBUTES BY LOCATION

Join additional attributes to vector layer based on spatial relationship. Attributes from one vector layer are appended to the attribute table of another layer and exported as a shapefile.

SPLIT VECTOR LAYER

Split input layer into multiple separate layers based on input field.

MERGE SHAPEFILES TO ONE

Merge several shapefiles within a folder into a new shapefile based on the layer type (point, line, area).

CREATE SPATIAL INDEX

Create a spatial index for OGR supported formats.

Digitizing Data

Digitizing is one way we get data into GIS. There are three ways that digitizing is done in a GIS:

1. Digitizing from paper maps2. Digitizing from existing GIS data3. Digitizing from scanned images uploaded into a GIS

Digitizing and Editing

When digitizing or editing a map, you should try to use the minimum number of vertices required to retain the complexity of the shape. You can use a reference GIS file to “snap” your features to another feature as a guide. In addition, snapping allows arcs that end within a certain distance to be connected.

In QGIS, snapping tolerance is the distance QGIS uses to search for the closest vertex and/or segment you are trying to connect when you set a new vertex or move an existing vertex. For example, if you set the snapping tolerance to 10 pixels, then it means that a point is snapped to an existing point if it comes nearer than 0.05 units. If you aren’t within the snapping tolerance, QGIS will leave the vertex where you release the mouse button, instead of snapping it to an existing vertex and/or segment. The snapping tolerance setting affects all tools which work with tolerance.

Digitizing from paper maps and scanned images

A paper map can be scanned and opened in through GIS software. Scanning will produce a raster image, which much first be georeferenced. Afterwards, using GIS editing tools it can be digitized into a vector file such as a shapefile.

Digitizing from existing GIS data

You can digitize or edit existing GIS data through a GIS program. This can mean adding attributes and/or vector features to your shapefile.

Creating a new shapefile

You may want to create a new shapefile if you are digitizing a feature or to display new point data. Do this in QGIS by going to the Layer > New > New Shapefile Layer… Remember to define your projection.

Source:

http://docs.qgis.org/1.8/html/en/docs/user_manual/working_with_vector/editing_geometry_attributes.html

https://qgis.readthedocs.org/en/latest/docs/index.html

2. Raster Tools

Georectification

Sometimes you’ll have raster data that you want to use from scanned maps, satellite images, or aerial photographs. Normally, scanned maps won’t contain spatial reference information. Sometimes aerial photography and satellite imagery will have spatial reference information, but sometimes the data won’t align with the rest of your data. In these cases, you’ll need to georeference your data to a coordinate system.

To do this, you will follow this process, which is described in more detail below:

1. Add the raster dataset you want to georeference2. Add control points to link the raster dataset positions to known positions in

map coordinates3. Save the georeferencing information

Control Points

After adding the desired image to be georeferenced, we use ground control points (GCPs) to align the image with the image. This requires us to have 1) source coordinates or a data file of coordinates in the image being rectified and 2) reference coordinates or coordinates of the map or reference image to which the source image is being registered. The goal is having a transformation with the least possible amount of error.

Control points should be identifiable locations that do not change position such as the intersection of a road. In contrast, a river edge would not be a preferable control point because a rivers boundaries may change due to seasonal variations. The control points are used to build a polynomial transformation equation that will convert the raster dataset from the existing location to the spatially correct location. The more ground control points, the better.

Transforming your raster

After the ground control points are added, you can warp or transform the data to match the target coordinate system. In most cases, you will just need to use a linear transformation (requires at least three links or GCPs). If you go with a higher order transformation than linear, the image will become more warped. This is usually unnecessary and optimizes local accuracy, but not global accuracy.

Root mean square error

After every transformation you will get a root mean square error. This error describes the difference between where the from point ended up as opposed to the actual location that was specified. It helps to describe how consistent the transformation is between the different control points. A lower RMS error is an assessment of accuracy for the transformation, but that does not mean it is an accurate registration of the data.

Resampling your georeferenced raster

Usually when you transform your raster, the cell centers of the input raster rarely line up with the cell centers on the output raster. Because of this, you need to resample your raster dataset. Here are the main types of resampling:

1. Nearest Neighbor: this resampling technique does not change any of the values of cells from the input raster dataset. This should be used for nominal or ordinal data where each value represents a class, member, or classification.

2. Bilinear interpolation: uses the value of the four nearest input cell centers to determine the value of the output raster. The new value for the output cell is a weighted average of these four values, adjusted to account for their distance from the center of the output cell in the input raster. This interpolation method results in a smoother-looking surface than can be obtained using nearest neighbor. Elevation, slope, intensity of noise from an airport, and salinity of the

groundwater near an estuary are all phenomena represented as continuous surfaces and are most appropriately resampled using bilinear interpolation.

3. Cubic convolution: this technique is similar to bilinear interpolation, except the weighted average is calculated from the 16 nearest input cell centers and their values. Cubic convolution will have a tendency to sharpen the data more than bilinear interpolation since more cells are involved in the calculation of the output value. Therefore, this resampling method is often used when resampling imagery, such as aerial photography and satellite imagery.

Note that bilinear interpolation or cubic convolution should not be used on categorical data since the categories will not be maintained in the output raster dataset. However, all three techniques can be applied to continuous data, with nearest neighbor producing a blocky output, bilinear interpolation producing smoother results, and cubic convolution producing the sharpest results.

Raster Calculator

The raster calculator allows you to perform calculations based on the raster pixel or cell values. The results are written onto a new raster layer.

The mathematical expression format is traditional. Raster names must be in square brackets ("[]"), followed by symbol "@" and number which denotes band number. It is possible to insert raster name automatically by double-clicking on its name in the raster list—the raster’s first band will be inserted. Inserting the raster name with a different band number is possible by double-clicking on the band number in bands list.

Some common expressions are saved as presets in the raster calculator interface.

Zonal Statistics

With the Zonal Statistics tool you can analyze the results of a thematic classification. It allows to calculate statistics in a raster layer according to zones, which are delineated by polygons. You can calculate the sum, the mean value and the total count of the pixels that are within a polygon. The tool generates output columns in the vector layer with a user-defined prefix.

3. Cartography Basics

Critical Elements to Put in Your Map

Maps should be designed with purpose to facilitate the audience’s understanding of what information is being mapped. Before going into basic principles of cartography, there are critical elements that should be included in every map you make:

1. Coordinate system (can also include datum)***2. Title3. Scale bar for each map frame you use4. Map Legend5. North Arrow6. Information about the creation of the map (i.e. When map was created,

by whom, etc…)

***it is very important to put the coordinate system especially if someone wants to navigate to the area or would like an understanding of the distortions in your map.

Basic Cartography Elements to Consider

Maps should be designed with purpose. They should be designed to meet the level of expertise of your audience. When designing your map think about the following questions:

What information is being mapped? Who will be reading the map?

o Does your audience have special needs? (i.e. large print and color blindness)

Is the map content explained well enough with additional text? What size will the map be? What media will be used to produce the map? (Paper, computer screen, web

page, poster, etc…) What are the time and budget constraints?

Visual Hierarchy

When placing elements of your map onto any kind of media, consider the visual hierarchy. That is, make the most important features most prominent by adjusting position, size, surrounding open space, color contrast, and line weights. Your most important data should be emphasized in the visual hierarchy. Boxes can help to elevate the visual hierarchy of the elements it surrounds.

Example: Original -

Emphasizes parks in Congo forest -

Design elements

Maps can have decorative elements such as drop shadows, line styles for frames, background patterns, colorful logos, and decorative type fonts to name a few. Use these features purposefully because they tend to distract from the important information on the map.

Minimizing Ambiguity

To minimize ambiguity make sure the appropriate labels are placed close to what you are labeling. Also, place objects that are related closer together so that it is intuitive that they belong to that group. You can also use boxes to separate data to minimize ambiguity.

Fonts

Maps will usually contain two font types: a serif font and a sans serif font. Serif fonts are usually used for water or other physical features. A sans serif font is usually used for towns and other cultural features.

Color Choice

Choose colors that reflect natural tendencies (i.e. water is blue), but also support the map hierarchy. Choosing colors is more than what looks prettiest. It can help you emphasize feature sin a visual hierarchy and help your audience intuitively get what is going on in your map. However, be sure to avoid offensive color combinations. If you are photocopying a black and white map, be sure to use contrasting gray tones so that your map elements come out.

Other Notes:

High resolution media can support fine lines and subtle colors. Meanwhile, low resolution media requires big print and contrasting colors.

Map projections should be chosen to minimize distortion in the main map feature

Balancing of white space and alignment of map elements should help to maximize the flow and minimize ambiguity

In summary, the two most important rules are:

1. Keep your map on message by adhering to a sensible hierarchy of map elements.

2. Always keep your audience in mind when choosing what to say and how to say it on your map.