Upload
hiroaki-sengoku
View
1.323
Download
5
Embed Size (px)
DESCRIPTION
合同会社マイクロベースのQGIS演習資料(ver.1.8)です。ご希望にしたがって研修内容を構成します。研修のご依頼をご希望の方は弊社ホームページよりお問い合わせください。 http://microgeodata.com/ 製作・協力: 仙石裕明・東郷直子・秋山祐樹
Citation preview
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Geographic Information SystemQGIS Introduction(2)
microbase.LLChttp://microgeodata.com/
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Agenda
1st
2nd
3rd
W h a t ’s Q G I S ? B a s i c u s a g e B a s i c d a t a m a n a g e m e n t
S p a t i a l A n a l y s i s S p a t i a l d a t a a n d l i n g
G e o c o rd i n g C re a t e Ve c t o r d a t a A b o u t c o o rd i n a t e s y s t e m C re a t e K M L d a t a U t i l i z e O S M d a t a
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Contents Today
2nd session
1 Spatial Analysis
2 Spatial Data handling
Homework
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Lecture data
lecture1_data
tokyo23
homework2
Copyright (C) 2013 microbase.LLC All Rights Reserved.
1 Spat ia l Ana lys i s
Copyright (C) 2013 microbase.LLC All Rights Reserved.
1.1 Buf fer ing
A buffer in GIS is a zone around a map feature measured in units of distance or time. A buffer is often used for spatial analysis.
make 200m buffer polygons from a highway.
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Add railway.shp in “tokyo23” folder and make 100m buffer polygons from the railways.tokyo23.
2 Input “100” in the form.
3) Check the checkbox of “Dissolve buffer results”.
->An optional dissolve can be performed to combine overlapping buffers.
1) Choose railway.shp as a vector data.
Vector > Geoprocessing Tool > Clip
Copyright (C) 2013 microbase.LLC All Rights Reserved.
A buffer polygon can be created from not only poline data but also point data and polygon data.
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Exerc ise 1
Create 250m buffer polygon data from each station and save it as “station_buffer250.shp”.
Copyright (C) 2013 microbase.LLC All Rights Reserved.
ANSWER
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Integrate features which locate in same extent.
seven elevenセブンイレブンの影
響圏
population in Meguro city seven eleven’s market scale
1 .2 Over lay
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Various kinds of Overlay
Intersect Union Clip
Input
Output
Inersectfeature
Unionfeature
Clipfeature
Output features have each attribute table of input features Just clip features
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Meguro city can be selected by “Select layer by attribute” or “Select Features” from “ku.shp”.
Add “library.shp” and “ku.shp”. Clip libraries only in Meguro city.
Check the check box of “Use only selected features” and you can clip the target layer based on a clip layer which is selected.
Clipfeature
Overlay1: Clip
Vector > Geoprocessing Tool > Clip
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Libraries in only Meguro city are clipped.
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Intersect railways in Meguro ward using “library.shp” and “ku.shp”.Inersectfeature
Overlay1: Intersect
Vector > Geoprocessing Tool > Intersection
Check the check box of “Use only selected features” and you can clip the target layer based on a clip layer which is selected.
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Railways in only Meguro city are intersected.
Copyright (C) 2013 microbase.LLC All Rights Reserved.
1) Choose following features only in Setagaya ward.• dentist.shp• station.shp• road.shp
2) Create following features in Setagaya ward.• 250m buffer polygons from each station.
Exerc ise2
Copyright (C) 2013 microbase.LLC All Rights Reserved.
dentist station road
ANSWER
1)Clip(or intersect) a dentist, a station and a road using “ku.shp” selecting Setagaya ward.
Copyright (C) 2013 microbase.LLC All Rights Reserved.
ANSWER
2) Dentists in the buffers are shown.
Copyright (C) 2013 microbase.LLC All Rights Reserved.
2 Spat ia l Data Handl ing
Copyright (C) 2013 microbase.LLC All Rights Reserved.
2.1Se lect Layer By Locat ion
Features can be selected by not only an attribute but also location.
ExampleSelect a dentist within 500m from a station
Select a ward which a highway go through.
Select a ward which borders on Meguro ward
Select a seven eleven in Meguro ward
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Add “station.shp” and “dentist.shp” in “tokyo23” folder into layer. Choose a dentist within 500m from a station in Tokyo special districts.
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Create 500m buffer polygons from each station.
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Select a dentist within the buffers.
Choose a target layer in “selected features” and an overlapped layer in “intersect features”.
Vector > Research Tool > Select by location “Select by location” covers the following spatial relationship among features.
- within
- contain
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Selected features color yellow.
The result show about 70% dentists locate in the place within 500m from station.
5129 in 6985 are selected. It may take a little while to select features.
Selected rows color blue in the attribute table.
Copyright (C) 2013 microbase.LLC All Rights Reserved.
If more advanced search methods than “Contains” and “Within” are required, the plugin “Spatial Query Plugin” will be useful.
- “Spatial Query Plugin” will appear if the checkbox in “QGIS Plugin Manager” is checked.
- Intersects A intersects B- Contains A contains B- Is disjoint- Equals A equals B- Overlaps A overlaps B- Crosses A crosses B- Touches A touches B- Within A within B
Vector > Spatial Query
Copyright (C) 2013 microbase.LLC All Rights Reserved.
1) Search the ward which intersect the highway.
2) Count the number of a supermarket within 250m from each station
using “station_buffer250.shp” created at Exercise1.
Exerc ise3
Copyright (C) 2013 microbase.LLC All Rights Reserved.
ANSWER
1) the borders which intersect highways.
Copyright (C) 2013 microbase.LLC All Rights Reserved.
467 shops
ANSWER
2) Count the number of a supermarket within 250m from each station.
Copyright (C) 2013 microbase.LLC All Rights Reserved.
2.2 Spat ia l Jo in
Joins attributes from one feature to another based on the spatial
relationship. The target features and the joined attributes from the join
features are written to the output feature class.
a
A cityshop
a
b
c
shop city
a C
b A
c B
B city
C cityb
c
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Add “convenience.shp” in “tokyo23” and save only “seven eleven” as “seven_eleven.shp”. Then join the attribute from “ku.shp” to it.
Check the checkbox of “Take attributes of first located feature”.
Vector > Data Management Tool > Join attributes by location
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Attribute of “ku” is joined to “seven eleven”.
Attributes of “seven eleven” Attribute of “ku”
Copyright (C) 2013 microbase.LLC All Rights Reserved.
a
A city
shop sale
a 2500
b 3000
c 2000
d 1500shop sale city
a 2500 C市b 3000 A市c 2000 B市d 1500 B市
B city
C cityb
c
d
Join type varies depending on how joins between the target features and join features.
city number whole sale
A 1 3000
B 2 3500
C 1 2500
Main target
JOIN_ONE_TO_ONE
JOIN_ONE_TO_MANY
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Add Census of commerce of 500m scale units
(H16_commerce.shp) and Census of population of block
scale unit(pop.shp). Then join the attributes from
“H16_commerce” to “pop”.
Exerc ise4
Copyright (C) 2013 microbase.LLC All Rights Reserved.
A block unit sometimes contains 500m grids and has more than 2 grids. Attribute summary should be “Take summary of interesting features.
HINT
Copyright (C) 2013 microbase.LLC All Rights Reserved.
If you want get an attribute value more accurately among different unit features, It would be one of the method to divide the value based on area of the features.
ANSWER
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Another functions for spatial analysis are available.
Copyright (C) 2013 microbase.LLC All Rights Reserved.
���
)(1)(1
2 i
n
i
XxKnh
xf −= ∑=
)()(3)( 2 hxhxh
xK <−
= ���π
�����
����!��
Spatial interpolation
Kernel density estimation
See geostatistics in more detail.・Kriging interpolation
・Sprine interpolation
・Spatial autocorrelation
etc...
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Path Search
Shortest Path can be detected by Dijkstra method.
Service area analysis
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Contents Today
2nd session
1 Spatial Analysis
2 Spatial Data handling
Homework
Copyright (C) 2013 microbase.LLC All Rights Reserved.
H O M E W O R K
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Data
homework2university.shp
highschool.shp
jr_school.shp
el_school.shp
firestation.shpfire station
elementaryschooljunior highschool
high school
college
Copyright (C) 2013 microbase.LLC All Rights Reserved.
Find the area thought to have high disaster risk in Tokyo special districts.
1) Describe characteristics and reasons of the area thought to have high disaster risk.
2) Create a map about 1) and paste it to your report.
<Hint>The data today and in “homework2” folder may be good for describing the disaster risk!
• population• population density• • school as rescue facility• elevation • public transpotation