Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
QGIS training class 3
1. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Geographic
Information System
QGIS Introduction(3)
microbase.LLC
http://microgeodata.com/
2. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Agenda
1st
2nd
3rd
What’s QGIS?
Basic usage
Basic data management
Spatial Analysis
Spatial data andling
Geocording
Create Vector data
Map Projection
Create KML data
Utilize OSM data
3. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Contents Today
3rd Session
Geocoding
Map Projection
- Coordinate Reference System(CRS) - Projection transformation
Create Point Data
- Delimited layer - OpenLayers Plugin
- ‘On the fly’ CRS transformation
OSM Data
- Create OSM data - OpenStreetMap plugin
Google Earth
- About KML - Export a layer as KML format
6. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Address Geocoding
It is called Address geocoding to find associated geographic coordinates
(often expressed as latitude and longitude) from other geographic data,
such as street addresses, or ZIP codes (postal codes).
Name Address
Hongo campus 7-3-1 Hongo Bunkyo-ku Tokyo-to
Komaba campus 4--6-1 Komaba Meguro-ku Tokyo-to
Kashiwa campus 5-1-5 Kashiwanoha Kashiwa-shi Chiba-ken
GIS projects the
coordinates on map.
X
Y
Name Address Lon Lat
Hongo campus Tōkyō-to, Bunkyō-ku,
Hongō, 7-3-1
139.762723 35.712545
Komaba campus Tōkyō-to, Meguro-ku,
Komaba, 4--6-1
139.677172 35.662492
Kashiwa campus Chiba-ken, Kashiwa-shi,
Kashiwanoha, 5-1-5
139.934642 35.900801
7. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Type of Address Geocoding
Street address Block address
The address commonly seen in Europe
and the United States.
ex) Unter den Linden 6, 10099 Berlin
The address commonly seen in Asian area.
ex)Tōkyō-to, Bunkyō-ku, Hongō, 7-3-1
street
street number
postal code city
pref city block block number
8. Copyright (C) 2013 microbase.LLC All Rights Reserved.
How to conduct geocoding
Google Maps provides geocoding service. Geographic coordinate can
be obtained from Google Maps by clicking “What’s here? on pop-up
menu after right-clicking anywhere on map.
1) Click “What’s here? on pop-up
menu after right-clicking the place
you want to get on map.
2)The coordinates are displayed on web
form. (latitude[Y], longitude[X])
9. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Name Address Lon Lat
Hongo campus Tōkyō-to, Bunkyō-ku, Hongō, 7-3-1
Komaba campus Tōkyō-to, Meguro-ku, Komaba, 4--6-1
Kashiwa campus Chiba-ken, Kashiwa-shi, Kashiwanoha, 5-1-5
Exercise 1
Add “longitude” and “latitude” layer to “sample.csv” in
“lecture3_en” folder using Google Maps.The csv file can be
edited by spreadsheet or text editor.
Longitude(X)
ex) 139.810896
Latitude(Y)
ex) 35.710211
10. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Google Maps API are useful
when you want to process geocoding on a large scale.
https://developers.google.com/maps/documentation/geocoding/?hl=en
Another geocoding services also be available. For more detail, see the below link.
http://blog.programmableweb.com/2012/06/21/7-free-geocoding-apis-google-bing-yahoo-and-mapquest/
12. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Geographic coordinates
A set of numbers of location on the globe is called Geographic
coordinates(ex. longitude, latitude).A common choice of
coordinates is latitude, longitude and elevation.
Position gap sometimes occur when coordinates system of each layer
on QGIS differs from each other even if each layer has same
coordinates..
-31788.8930935
-6433.4151654
-31785.5178796
-6432.6469309
The coordinates differ even at a
same place when the CR differ.
13. Copyright (C) 2013 microbase.LLC All Rights Reserved.
What’s map projection?
• Azimuthal projection
Azimuthal projections have the property that directions from a
central point are preserved and therefore great circles through the
central point are represented by straight lines on the map.
• Cylindrical projection
A map projection in which the surface features of a globe are
depicted as if projected onto a cylinder typically positioned with the
globe centered horizontally inside the cylinder.The Mercator
projection one of the cylindrical ,developed for navigational
purposes, has often been used in world maps.
A map projection is a systematic transformation of the latitudes and
longitudes of locations on the surface of a sphere or an ellipsoid into
locations on a plane.
Because the earth is round, a position gap is inevitable even on any
projection.Therefore a projection should be varied depending on the
intended use such as calculating area, angle and distance.
14. Copyright (C) 2013 microbase.LLC All Rights Reserved.
引用: 国土地理院
http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html
• WGS84 (World Geodetic System)
WGS 84 is the reference coordinate system used by the Global
Positioning System.The coordinate origin of WGS 84 is meant to
be located at the Earth's center of mass.
• JGD2000 (Japanese Geodetic Datum)
JGD2000 is the geodetic datum based on the GRS80 in common
with WGS84. It has been introduced since 2002 instead of the
formerTokyo Datum in order to adapt the coordinate system to
various high-tech tools using GPS/GIS technology more easily.
• Tokyo Datum
Tokyo Datum is the coordinate system based on triangulation
defined by “Meiji” government was basically established in early
20th century.
The following system are generally used in Japan.
Type of Coordinate Reference System
引用: United Nation
http://unstats.un.org/unsd/geoinfo/RCC/docs/rcca8/crp/
8th_UNRCCA_econf.96_CRP9.pdf
15. Copyright (C) 2013 microbase.LLC All Rights Reserved.
How to manage CRS onGIS
Projection is defined in the “.prj” file in case of shape file.“CRS selector” window will
appear on GIS when you load shape file without “prj”.
#prj is one of the set of shape file.
16. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Add ”bunkyo.shp” and “tokyo.shp” in “lecture3_en” folder and
show the map.Then choose WGS84(EPSG:4326) for the
coordinate system of “tokyo.shp”. Former layer shows the
administrative unit of “Bunkyo ward” , the latter shows the
administrative unit of “Tokyo prefecture”.
Exercise 2
17. Copyright (C) 2013 microbase.LLC All Rights Reserved.
ANSWER
Both layers appear but have position gaps.
18. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Check coordinate Reference system(CRS)
Position gaps have occured among “Tokyo” and “Bunkyo” because both
CRS differs from each other.
Open a property of each layer and choose “General Information” tab at
the top of the window. Current layer CRS can be seen there.
Bunkyo layer: Tokyo Tokyo layer: WGS84
19. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Projection transformation
This kinds of position gap sometimes occur when CRS of each layer on QGIS differs
from each other. In order to modify the gap, CRS must be common.
It is called “Projection transformation” to project a layer from one coordinate system
to another CRS.
20. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Projects “Bunkyo” layer fromTokyo(ESPG:4301) to WGS84.
Projection transformation can be done from “Save as”.
CRS can be derived from “CRS
Selector”.
Filter function enable to
find a plugin you want
easily. Input a keyword
about the plugin.
The list of CRS
will appear
depending on
keywords in
filter.
21. Copyright (C) 2013 microbase.LLC All Rights Reserved.
“Bunkyo” layer overlaps with “Tokyo” layer properly.
23. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Create point data
QGIS can load and create point data from a table file with
coordinates fields such as CSV data format. Create point
data from sample.csv you’ve added coordinates fields at
Exercese 1.
X
Y
Name Address Lon Lat
Hongo campus Tōkyō-to, Bunkyō-ku,
Hongō, 7-3-1
139.762723 35.712545
Komaba campus Tōkyō-to, Meguro-ku,
Komaba, 4--6-1
139.677172 35.662492
Kashiwa campus Chiba-ken, Kashiwa-shi,
Kashiwanoha, 5-1-5
139.934642 35.900801
24. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Click the icon of “Add ElimitedText Layer” from the menu.
(or Layer > Add ElimitedText Layer)
1)Choose sample1new.csv which
you added the coordinates.
2) Check the checkbox of
comma( if csv is loaded).
3) Choose the column of coordinates
such as X(longitude) andY(latitude).
A sample imagery about the loading
table can be checked from here.
25. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Then specify CRS (Coordinate reference system) of the table.
Choose WGS84 as CRS.
The coordinates picked
up derive from Google
Maps which support
WGS84.
26. Copyright (C) 2013 microbase.LLC All Rights Reserved.
A layer has been created from CSV file.
#This layer are added just as a temporary file. Save it as a shape file.
Hongo
Kashiwa
Komaba
27. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Add a background imagery so that map view is comprehensive.
Plugin > Fetch Python Plugin
Filter function enable to
find a plugin you want
easily. Input a keyword
about the plugin.
#Internet access is necessary for installing OpenLayers plugin.
28. Copyright (C) 2013 microbase.LLC All Rights Reserved.
After installing the plugin, check whether the plugin is activated or not
on the QGIS Plugin Manager.
Check the checkbox of
OpenLayers Plugin
Plugin > QGIS Plugin Manager
29. Copyright (C) 2013 microbase.LLC All Rights Reserved.
After installing the plugin properly,“OpenLayers plugin” will be added to
“Plugin” menu.Add “OpenStreetMap layer” from the list.
#Internet access is necessary for using OpenLayers plugin.
Another maps such as Google
Maps and Bing Maps also can
be seen.
30. Copyright (C) 2013 microbase.LLC All Rights Reserved.
‘On the fly’ CRS transformation
When mapping the layers which have different CS, one common CS should
be used. QGIS has a useful function for this named ‘On the fly’ CRS
transformation which conducts projection transformation automatically just
for map view.
#‘On the fly’ CRS transformation is just a function for display. Projection transformation is
necessary for analysis usage.
‘On the fly’ CRS
transformation
‘On the fly’ CRS
transformation will
turn on automatically
when Open Layers
Plugin” is launched.
Uncheck the
checkbox and the
function will turn off.
Choose CS just like
projection
transformation.
31. Copyright (C) 2013 microbase.LLC All Rights Reserved.
1) Add “denki.csv” in “lecture3_en” folder on QGIS and
project it from Tokyo(EPSG:4301) to WGS84(EPSG:4362).
Save it as ”denki_wgs1984.shp”.
2) Color the “BUSINESS” field in the attribute table of
“denk_wgs1984” in different colors.This field includes the
name of electronics retail stores such “Big camera”.
3) Add “OpenStreetMap” as a background imagery.
Exercise 3
“denki.csv” includes a list of electronics retail stores in Tokyo.
32. Copyright (C) 2013 microbase.LLC All Rights Reserved.
1) Load “denki.csv” and choose Tokyo(EPSG:4301) as CRS using “Add Elimited
Text Layer”.
ANSWER
33. Copyright (C) 2013 microbase.LLC All Rights Reserved.
1) After adding on QGIS, project it to WGS84(EPSG:4362).
ANSWER
34. Copyright (C) 2013 microbase.LLC All Rights Reserved.
1) The position gap before and after projection transformation can been seen.
ANSWER
35. Copyright (C) 2013 microbase.LLC All Rights Reserved.
2) 3) color each store depending on “BUSINESS” field of “denki” and load
openstreetmap from openlayers plugin.
ANSWER
37. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Create OSM Data
openstreetmap(OSM) is created by volunteers and can be available for
free.The data also can be used on GIS.We’ve already used it as a
background imagery.
Access to openstreetmap.org and try creating open maps!
Create your account
at first!
38. Copyright (C) 2013 microbase.LLC All Rights Reserved.
OpenSteetMap can be edited after log in. Click “Edit with ID(in-browser editor)” from “Edit”
menu at the top of the screen and launch an edit window.
39. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Create vector data on Bing Map as a background imagery.
2)Create vector data while tracing each building
on Bing Maps.
1)Click “Area” in case
creating or editing polygon
data.
40. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Attributes of each feature can be edited after vector data was created.
41. Copyright (C) 2013 microbase.LLC All Rights Reserved.
The vector data you created will be seen several tens of seconds later.
42. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Create building polygon data of your home town
or neighborhood on open street map.
Exercise 4
43. Copyright (C) 2013 microbase.LLC All Rights Reserved.
OSM data can be downloaded and displayed on QGIS using “OpenStreeetMap plugin”.
Download OSM data
Web > OpenStreetMap > Download OSM data
Check the check box of “Open data automatically after
download” and the downloaded OSM data will be
loaded on QGIS automatically.
The extent of downloading OSM is depending on
the map view size. However you can’t download it
on a wide scale
44. Copyright (C) 2013 microbase.LLC All Rights Reserved.
The downloaded OSM data will be divided into 3 types: Point data, Polyline data
and Polygon data sepalately. Generally,The data tend to be saved as “.osm” data
format(xml) and can be converted into any data format.
45. Copyright (C) 2013 microbase.LLC All Rights Reserved.
http://downloads.cloudmade.com/ http://www.geofabrik.de/data/download.html
GeofabrikCloudmade
If you want to download huge amount of OSM data at a time, the
following sites are recommended.These sites provide the compiled data
as a unit in country and area.
46. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Existing study using OSM data
http://www.youtube.com/watch?v=7zaQCza9Z6Q&feature=share&list=UUpPkZWEggV6yiBMl6LmEiZQ
UT, Center for spatial information science
People flow in Manila, Philippines in 1996
People flow animation are created from
huge mobile history data in Person trip
survery. Each detail motion are
interpolated based on OSM data.
47. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Work with GoogleEar th
48. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Google Earth also can load GIS data on it and adopts a data format named KML(Keyhole
Markup Language. KML is XML based markup language and is used for Google Maps too.
QGIS can export a layer as KML.
About KML
※Google Earth is a virtual globe, map and geographical information program that was originally called EarthViewer 3D, and
was created by Keyhole, Inc, a Central Intelligence Agency (CIA) funded company acquired by Google in 2004.
Google Earth is available even
AndroidOS and iOS. If you export
the data as KML, you can show it
on mobile devise.
49. Copyright (C) 2013 microbase.LLC All Rights Reserved.
QGIS can export KML data from layer option “Save as” in the same way as exporting a layer.
Export a layer as KML format
Choose “Keyhole
Markup
Language[KML]” for
“Format”.
Choose WGS84 for
“CRS”.
#Google Earth
supports WGS84.
50. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Double-click an exported KML files and Google Earth will be launched with
the data added.
※Google Earth has to be installed in order to load KML files on Google Earth.
51. Copyright (C) 2013 microbase.LLC All Rights Reserved.
http://opentextmap.org/
kml sharing site by NPO Ino-company
OpenTextMap
For those who want to know Google Earth more
Slideshare
Introduction of Google Earth for educators
http://www.slideshare.net/hiroakisengoku/20130331excercise2
52. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Contents Today
3rd Session
Geocoding
Map Projection
- Coordinate Reference System(CRS)
- Projection transformation
Create Point Data
- Delimited layer - OpenLayers Plugin
- ‘On the fly’ CRS transformation
OSM Data
- Create OSM data - OpenStreetMap plugin
Google Earth
- About KML - Export a layer as KML format
54. Copyright (C) 2013 microbase.LLC All Rights Reserved.
Write a report about regional issues you live or have been
while meeting the following requirements.
-Describe a summary about the area you mention.
-Explain the issues with maps using GIS.
-Design a simple map to see and understand.
-Cite data source.
55. Copyright (C) 2013 microbase.LLC All Rights Reserved.
National Land Numerical Information
http://nlftp.mlit.go.jp/ksj-e/index.html
Free Spatial Data
http://www.diva-gis.org/Data
Useful download site for GIS
National Statistics Center - Regional Statistics
http://www.e-stat.go.jp/SG1/chiiki/Welcome.do?
lang=02