Professional Documents
Culture Documents
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 youd 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. 1218'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
CONVEX
HULL(S)
BUFFER(S)
INTERSECT
UNION
SYMMETRICAL
DIFFERENCE
CLIP
DIFFERENCE
DISSOLVE
PURPOSE
Create minimum convex hull(s) for an input layer, or based
on an ID field.
Create buffer(s) around features based on distance, or
distance field.
Overlay layers such that output contains areas where both
layers intersect.
Overlay layers such that output contains intersecting and
non-intersecting areas.
Overlay layers such that output contains those areas of the
input and difference layers that do not intersect.
Overlay layers such that output contains areas that intersect
the clip layer.
Overlay layers such that output contains areas not
intersecting the clip layer.
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
CHECK GEOMETRY
EXPORT/ADD
GEOMETRY
COLUMNS
POLYGON
CENTROIDS
DELAUNAY
TRIANGULATION
VORONOI POLYGONS
SIMPLIFY
GEOMETRY
DENSIFY GEOMETRY
MULTIPART TO
SINGLEPARTS
SINGLEPARTS TO
MULTIPART
POLYGONS TO LINES
LINES TO POLYGONS
EXTRACT NODES
PURPOSE
Check polygons for intersections, closed-holes, and fix
node ordering.
Add vector layer geometry info to point (XCOORD,
YCOORD), line (LENGTH), or polygon (AREA, PERIMETER)
layer.
Calculate the true centroids for each polygon in an input
polygon layer.
Calculate and output (as polygons) the delaunay
triangulation of an input point vector layer.
Calculate voronoi polygons of an input point vector layer.
Generalize lines or polygons with a modified DouglasPeucker algorithm.
Densify lines or polygons by adding vertices
Convert multipart features to multiple singlepart
features. Creates simple polygons and lines.
Merge multiple features to a single multipart feature
based on a unique ID field.
Convert polygons to lines, multipart polygons to multiple
singlepart lines.
Convert lines to polygons, multipart lines to multiple
singlepart polygons.
Extract nodes from line and polygon layers and output
them as points.
TOOL
DEFINE
PROJECTION
JOIN
ATTRIBUTES
BY LOCATION
SPLIT VECTOR
LAYER
MERGE
SHAPEFILES
TO ONE
CREATE
SPATIAL
INDEX
PURPOSE
Specify the CRS for shapefiles whose CRS has not been defined.
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 input layer into multiple separate layers based on input
field.
Merge several shapefiles within a folder into a new shapefile
based on the layer type (point, line, area).
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 maps
2. Digitizing from existing GIS data
3. Digitizing from scanned images uploaded into a GIS
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 arent 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.
Source:
http://docs.qgis.org/1.8/html/en/docs/user_manual/working_with_vector/editing_geo
metry_attributes.html
https://qgis.readthedocs.org/en/latest/docs/index.html
2 Raster Tools
Georectification
Sometimes youll have raster data that you want to use from scanned maps,
satellite images, or aerial photographs. Normally, scanned maps wont contain
spatial reference information. Sometimes aerial photography and satellite imagery
will have spatial reference information, but sometimes the data wont align with the
rest of your data. In these cases, youll 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 georeference
2. Add control points to link the raster dataset positions to known positions in
map coordinates
3. 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.
assessment of accuracy for the transformation, but that does not mean it is an
accurate registration of the data.
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 listthe rasters 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 audiences 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.
2.
3.
4.
5.
6.
***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.
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?
o
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 -
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