Uploaded by Joshua Castillo

GIS Lectures

advertisement
Questions:
1. What is the total area (square feet) of
land exactly within 175 meters of all
the stations?
2. What is the total area (square feet) of
land exactly within 175 meters of all
the stations per each land-use?
3. What is the total area (square feet) of
land exactly within 175 meters of each
station per each land-use?
•
write down the steps required to
calculate the areas
Question 1:
1. What is the total area (square feet) of
land within 175 meters of all the
stations?
Question 1:
1) Buffer : 175 meters, Buffer_175, ALL
2) Clip:
LandParcels as input feature,
Buffer_175 as Clip,
Output: LandParcels_clip1
3) Add Field:
Name: AREA, type: LONG
4) Calculate Geometry : Area - Feet
Question 1:
Question 2:
2. What is the total area (square feet) of
land within 175 meters of all the
stations per each land-use?
Question 2:
There are two ways:
i)
using Summarize on the Clipped layer
that we have created in Question 1
[Summarize LandUse field and make
sure to check the SUM of AREA field]
ii) Disssolve the Clipped Layer based on
LandUse field and Add Layer again and
Calculate the geometry.
Question 2:
Question 3:
3. What is the total area (square feet) of
land within 175 meters of each station
per each land-use?
Question 3:
3. What is the total area (square feet) of
land within 175 meters of each station
per each land-use?
Question 3:
1) Buffer : 175 meters, Buffer_175_N,
Dissolve : NONE
2) Intersect: LandParcels and
Buffer_175_N
3) Dissolve: base on two conditions:
LandUse and Number_ID
4) Add Field and Calculate Geometry
Spatial Analysis –
Geoprocessing Review I
Outline
•
•
•
•
•
•
•
•
Add Field
Dissolve
Merge
Buffer
Clip
Intersect
Union
Export Attribute Table
Spatial Analysis –
Geoprocessing Review I
• We will review vector geoprocessing using a series of
questions:
• How many land parcels are there within LandParcels Layer?
• How many different “LandUse” Categories are there ?
•
30 polygons – 6 Land Use Category
How many Land Parcels
1. Right-Click on Layer > Open Attribute Table
2. By looking at the line of (0 out of 30 Selected)
How many Land Use category?
1. Selection > Select By Atributes
2. Select LandParcels then
LandUse and Unique Values
Unique Values of LandUse
How many Land Use category?
1. Selection > Select By Atributes
2. Select LandParcels then
LandUse and Unique Values
Unique Values of
LandUse
How many Land Parcels with
Commercial Land Use?
1. Selection > Select By Atributes
2. Select LandParcels then
LandUse and Unique Values
3. Enter the following Expression:
LandUse = 'Commercial'
Calculate the AREA of each Land Parcel
based on Square Feet
Add Field
1. Right-Click on Layer > Open Attribute Table
Add Field
1. Right-Click on Layer > Open Attribute Table
2. Click on Table Options > Add Field
3. Select Long Integer as Type- and SQF as Name
Add Field
1. Right-Click on Layer > Open Attribute Table
2. Click on Table Options > Add Field
3. Select Long Integer as Type- and SQF as Name
Add Field
1. Right-Click on Layer > Open Attribute Table
2. Click on Table Options > Add Field
3. Select Long Integer as Type- and SQM as Name
•
NOTE: Field Type
Add Field – Calculate Area (Geometry)
1.
2.
3.
4.
5.
6.
Right-Click on Layer > Open Attribute Table
Click on Table Options > Add Field
Select Long Integer – SQM
Right-Click on SQM Field and select Calculate Geometry
Click Yes
Select Property : Area and Use Coordinate system of the data
source.
7. Select Square Meter
8. Click OK
Add Field – Calculate Area (Geometry)
Add Field – Calculate Area (Geometry)
What is the Average AREA of Land parcels in
our study area?
Field Statistics
1. Right-Click on SQM Field (column)
2. Click on Statistics
Field Statistics
1. Right-Click on SQM Field
(column)
2. Click on Statistics
Create a Table to show Number of Land
Parcels in for each Land Use.
Field Summarize
• Summarize creates a stand alone table
• Finds unique values in a field
• Counts how many features/rows with that unique value exists
• Summarize can give us the Statistics for each unique value
What is the Average AREA of Land parcels in
our for each Land Use?
Geoprocessing:
1.
2.
3.
4.
Setting the Environment
Disable Background Processing
Make sure to store the Relative Path
Save the Map Document
Geoprocessing: Setting the Environment
1. Geoprocessing
2. Environments
Geoprocessing: Setting the Environment
1. Geoprocessing
2. Environments
Dissolve 1 – Simple Dissolve
1. Click Geoprocessing > Dissolve
2. Select LandParcels for Input Features
3. For Output feature Class browse to your folder and save it as
Dissolve_1
4. Click OK
Dissolve 1 – Simple Dissolve
•
All features have been dissolved into one polygon feature.
Dissolve 2 –Dissolve base on Fields
1. Click Geoprocessing > Dissolve
2. Select LandParcels for Input Features
3. For Output feature Class browse to your folder and save it as
Dissolve_2
4. In Dissolve_Field window check LandUse– This time we would like
to dissolve our features if they have same land-use
5. Click OK
Dissolve 2 –Dissolve base on Fields
•
All features with same LandUse value (land-use) have been dissolved into ONE
feature – accordingly we have 6 features (although a few of them are Multipart
Features like Industrial lands with three portions)
Dissolve 3 –Dissolve base on Fields
1. Click Geoprocessing > Dissolve
2. Select LandParcels for Input Features
3. For Output feature Class browse to your folder and save it as
Dissolve_3
4. In Dissolve_Field window check LandUse– This time we would like
to dissolve our features if they have same land-use
5. Uncheck “Create multipart features”
6. Click OK
Dissolve 3 –Dissolve base on Fields
•
Dissolves features based on LandUse if they share a border.
Merge
1. Add LandParcels_Extra Layer to your map. We would like to
Merge (combine) LandParcels and LandParcels_Extra feature
datasets into one single layer called LandParcels_Merge.
2. Click on Geoprocessing > Merge
3. Select LandParcels and LandParcels_Extra layer as Input Dataset.
4. Browse to your folder and save the Output dataset as
LandParcels_Merge
5. Click OK
Merge
•
Open table of attributes for LandParcel_Merge. Now we have 37 features
combined – 30 features from LandParcels and 7 feature from LandParcels_Extra
Buffer 1 – Simple Buffer
1. Turn on your Stations layer. We would like to create a buffer of
175 meters around each station– We have 4 stations with unique
ID numbers. The points have been categorized in two Types of A
and B. Check the Table of Attributes for Stations layer.
2. Click on Geoprocessing > Buffer
3. Select Stations for Input Features
4. Save your Output feature class as Buffer_1
5. For Distance, select Linear Unit and type 175 and select Meter
for your unit.
6. Clcik OK.
Buffer 1 – Simple Buffer
Buffer 1 – Simple Buffer
•
ArcGIS will create individual buffer areas for each Station/Point. Each buffer
polygon will inherit the attributes of the Station(i.e. Number_ID and Type).
Also a field showing the buffer distance has been added to the table
(BUFF_DIST)
Buffer 2 –Buffer based on Distance in a Field
1. One of the attributes of Stations Layer is Buf_Dis Field. Now we
would like to create buffer for each Station based on the value
within Buf_Dis field
2. Click on Geoprocessing > Buffer
3. Select Stations for Input Features
4. Save your Output feature class as Buffer_2
5. For Distance, select Field and from drop down menu select
Buf_Dis field.
6. Click OK.
Buffer 2 –Buffer based on Distance in a Field
•
ArcGIS will create individual buffer areas for each Station based on the buffer
distance within the Buf_Dis field.
Buffer 3 –Buffer Dissolve ‘ALL’
1. Now we would like to dissolve all buffers into one single feature
(polygon) – get rid of overlapping areas.
2. Click on Geoprocessing > Buffer
3. Select Stations for Input Features
4. Save your Output feature class as Buffer_3
5. For Distance, select Linear Unit and type 175 and select Meter
for your unit.
6. For Dissolve Type select ALL
7. Click OK.
Buffer 3 –Buffer Dissolve ‘ALL’
•
ArcGIS will create a buffer area for each Stations and will dissolve all the
buffers then, accordingly we will have one feature as our buffer polygon.
Buffer 4 –Buffer Dissolve ‘LIST’
1. Here we would like to dissolve the buffer areas (polygons) based
on one attribute of Stations which is TYPE of the Stations.
2. Click on Geoprocessing > Buffer
3. Select Stations for Input Features
4. Save your Output feature class as Buffer_4
5. For Distance, select Linear Unit and type 175 and select Meter for
your unit.
6. For Dissolve Type select LIST and in Dissolve Field check TYPE
7. Click OK.
Buffer 4 –Buffer Dissolve ‘LIST’
•
ArcGIS will create buffers for each point and will dissolve them based on TYPE
attribute of each polygon, accordingly we will have two features polygon Type A
and B.
Clip – Using Buffer-1
1. Here we would like to extract those parts of LandParcels that
overlay with Buffer_1 layer
2. Click on Geoprocessing > Clip
3. Select LandParcels for Input Features
4. Select Buffer_1 for Clip feature
5. Browse to your folder and save the clip as Clip_1.
6. Click OK
•
Clipped layer will inherit all the attributes of INPUT FEATURE
layer
Clip – Using Buffer-1
•
ArcGIS will extract LandParcels that overlay with Buffer_1 layer. We will get
exactly same result if we clip LandParcels with Buffer_3 layer.
Clip – Using Buffer-3
1. Here we would like to extract those parts of LandParcels that
overlay with Buffer_3 layer
2. Click on Geoprocessing > Clip
3. Select LandParcels for Input Features
4. Select Buffer_3 for Clip feature
5. Browse to your folder and save the clip as Clip_2.
6. Click OK
•
Clipped layer will inherit all the attributes of INPUT FEATURE
layer
Intersect
1. Here we would like to find out the geometric intersection of
LandParcels layer and Buffer_1
2. Click on Geoprocessing > Intersect
3. Select LandParcels and Buffer_1 as input features
4. Save the Intersect for your Output Feature Class as Intersect_1.
5. Click OK
•
Intersect layer will inherit all the attributes of all layers within
intersect process (LandParcels and Buffer_1)
Intersect
Intersect
•
Intersect layer will inherit all the attributes of all layers within
intersect process (LandParcels and Buffer_1)
•
IMPORTANT NOTE: Beware of overlapping regions.
Union
1. Here we would like to find out the geometric union of
LandParcels layer and Buffer_1
2. Click on Geoprocessing > Union
3. Select LandParcels and Buffer_1 as input features
4. Save the Intersect for your Output Feature Class as Union.
5. Click OK
•
Union layer will inherit all the attributes of all layers within
union process (LandParcels and Buffer_1)
Union
Coordinates Systems and Projections
Outline
• Coordinate Systems and Projections
• Geodesy
• Geoids
• Ellipsoids
• Geographic Coordinate Systems
• Magnetic North vs. True North
• Datums
• Projections
• Applying Coordinate Systems and Projections
Coordinate Systems and Projections
• Coordinates define the location, extent and shape of geographic
objects.
How to pinpoint a location on the surface of
the earth?
How to pinpoint a location on the surface of
the earth?
• We are using a pair of coordinate values
• We are using a reference system that uses latitude and
longitude to define the locations of points on the surface of
the earth.
How to pinpoint a location on the surface of
the earth?
• We are using a pair of coordinate values
• We are using a reference system that uses latitude and
longitude to define the locations of points on the surface of
the earth.
• This reference system is :
Geographical Coordinate System [GCS]
Geographical Coordinate System [GCS]
• This reference system is :
Geographical Coordinate System [GCS]
• Longitude and latitude are angles measured from the earth's
center to a point on the earth's surface. The angles often are
measured in degrees.
Geographical Coordinate System [GCS]
• By putting latitude and longitude together into what is
called geographic coordinate, we can pinpoint a location on
the earth’s surface.
• Sierra Hall Northridge: 34º 14’ 18’’ N, 118º 31’ 51’’W
Geographical Coordinate System [GCS]
• How to write latitude and longitude values:
1) Babylonian Sexagesimal System:
• Sierra Hall Northridge(with N-S and W-E signs):
• 34º 14’ 18’’ N, 118º 31’ 51’’W
• Sierra Hall Northridge(with negative - sign):
• 34º 14’ 18’’, -118º 31’ 51’’
• (-) sign for Southern (S) and Western (W) hemispheres
Geographical Coordinate System [GCS]
• How to write latitude and longitude values:
1) Degrees Minutes and Seconds
2) Decimal Degrees
• Decimal degrees = dd + mm/60 + ss/3600
• Sierra Hall Northridge
• 34º 14’ 18’’=34 + 14/60 + 18/3600 = 34.2983º
• - 118º 31’ 51’’= 118 + 31/60 + 51/3600= -118.5308
This is just a sign to show Western hemisphere, not to be
included in the calculation for decimal degree.
The Graticule
• The network / arrangements of parallels and meridians.
• Parallels: equally spaced east-west lines drawn on maps.
• From parallels which ones have a name?
• Equator, tropic of Cancer and tropic of Capricorn
• Meridians: set of north-south line that are equally spaced
at the equator and converge at the north and south
poles.
• Prime Meridian?
• International Meridian Conference (1884): Greenwich
The Graticule
• The network / arrangements of parallels and meridians.
• It is imaginary on the earth, but is drawn on globes and
maps for reference.
Components of
Geographical Coordinate Systems [GCS]
1.
2.
3.
4.
Angular Unit of Measurements
Prime Meridian – Equator
Spheroid (or Ellipsoid)*
Datum*
Components of
Geographical Coordinate Systems [GCS]
1. Angular Unit of Measurements
• Latitude and Longitude: measurements that
are relative to the center of the earth
2. Prime Meridian – Equator
3. Spheroid (or Ellipsoid)*
4. Datum*
Components of
Geographical Coordinate Systems [GCS]
1. Angular Unit of Measurements
2. Prime Meridian – Equator
• Define the origins for calculating Latitude and
Longitude
3. Spheroid (or Ellipsoid)*
4. Datum*
Components of
Geographical Coordinate Systems [GCS]
1. Angular Unit of Measurements
2. Prime Meridian – Equator
3. Spheroid (or Ellipsoid)*
• Shape of the earth
4. Datum*
The earth as an oblate ellipsoid (Spheroid)
• The earth rotation about its polar axis, introduces outward
centrifugal forces perpendicular to the axis of rotation.
• The amount of force varies between zero at each pole to a
maximum at the equator.
• Centrifugal force = mass x velocity2 x distance from axis of rotation
The earth as an oblate Ellipsoid (Spheroid)
• The earth is not a perfect sphere but an oblate ellipsoid.
Different oblate ellipsoids (spheroid)
• Clark 1866 ellipsoid
• Was the best fit for North America in the 19th century and
was used as the basis for topographic maps produced in
Canada, Mexico and the United States (late 18th century
to 1970s)
• World Geodetic System of 1984 (WGS) – [GRS 1980]
• Replaced Clark 1866 ellipsoid in North America and is
used as the basis of latitude and longitude on map
throughout the world.
Ellipsoid
Semi-major axis
Airy 1830,
6377563.396
Modified Airy
6377340.189
Australian National
6378160
Bessel 1841 (Namibia)
6377483.865
Bessel 1841
6377397.155
Clarke 1866,
6378206.4
Clarke 1880,
6378249.145
Everest (Malay. & Sing)
6377304.063
Everest (Pakistan)
6377309.613
Modified Fischer 1960
6378155
Krassovsky 1940
6378245
GRS 80
6378137
South American 1969
6378160
WGS 72
6378135
WGS 84
6378137
* Internationally recognized ellipsoids.
Different oblate ellipsoids (spheroid)
Different oblate ellipsoids (spheroid)
• The earth is not a perfect spheroid. The earth's surface
is not perfectly symmetrical, so the semi-major and
semi-minor axes that fit one geographical region do not
necessarily fit another one.
• The most southerly point on the minor axis (the South
Pole) is closer to the major axis (the equator) than is
the most northerly point on the minor axis (the North
Pole).
Earth: the Geoid
• Even using a Spheroid the map accuracies will not be perfect
because the actual shape of the earth is represented by the
Geoid.
Earth: the Geoid
• Even using a Spheroid the map accuracies will not be perfect
because the actual shape of the earth is represented by the
Geoid.
Earth: the Geoid
• Even using a Spheroid the map accuracies will not be perfect
because the actual shape of the earth is represented by the
Geoid.
• The geoid can be described as the shape of the earth would
be if there were only seas and no continents.
Earth: the Geoid
• Even using a Spheroid the map accuracies will not be perfect
because the actual shape of the earth is represented by the
Geoid.
Geoid , a surface of equal gravity (at the point used to define
MSL)
• This imaginary equal gravity surface doesn’t form a
perfect smooth ellipsoid; because the differences in
topography and density affect gravity pull.
Earth: the Geoid
• To achieve a more accurate map, the spheroid is moved until
the geoid at the area being mapped corresponds best with
spheroid surface.
Components of
Geographical Coordinate Systems [GCS]
1.
2.
3.
4.
Angular Unit of Measurements
Prime Meridian – Equator
Spheroid (or Ellipsoid)*
Datum*
• The combination of the spheroid and the
location where its center is placed is called a
datum.
Datum
• 1920s – 1980s these control points were surveyed relative to
the surface of Clark 1866 ellipsoid; forming North America
Datum of 1927 (NAD)
• Clark 1866  NAD 27
• By the early 1980s, and development of GRS 80 and WGS 84
ellipsoid, a new horizontal reference datum created, the
North American datum of 1983 (NAD 83)
• GRS 80  NAD 83
Map Projection
• Geometrical transformation of the earth’s spherical or
ellipsoidal surface onto a flat map surface.
• A systematic and orderly representation of the earth’s grid
upon a plane.
Map Projection
• Projected Coordinate System (PCS)
• Defines locations on a flat map based on x,y coordinates
Map Projection
• During the process of converting the spherical glob into a flat
screen , we get distortion.
• All projections have distortion.
Map Projection Classification
• Two approaches commonly used to classify the projection:
1) Based on their geometrical distortion
2) Based on the nature of surface used to construct
projection (projection surface)
Map Projection Classification
• Two approaches commonly used to classify the projection:
• Based on their geometrical distortion
• Distance
• Shape
• Direction
• area
• Based on the nature of surface used to construct
projection (projection surface)
Map Projection Classification
• Two approaches commonly used to classify the projection:
1) Based on their geometrical distortion
2) Based on the nature of surface used to construct
projection (projection surface)
• A plane
• A cone
• A cylinder
Map Projection Properties
1)
2)
3)
4)
Scale
Completeness
Correspondence relations
Continuity
Map Projection Properties
1) Scale
• The stated map scale is only true along points and
lines of tangency
Map Projection Properties
2) Completeness
• the ability of map projection to show the entire
earth
Orthographic projection
Gnomonic projection
Map Projection Properties
3) Correspondence relations
• Are there point to point correspondence in a map
projection – each point on the earth
corresponding to a point on the map projection
Map Projection Properties
4) Continuity
• Continuous spherical surface must be interrupted
at some points or along some line.
• These breaks in continuity form the map border
on a map projection.
Map Projection Classification
• Projections categories based on geometric distortion:
1) Equal-area projection: Displays an area at its proper
relative size.
2) Conformal projection: preserves shape.
3) Equidistance projection: preserve scale and thus
distance.
4) Azimuthal projection (True Direction): maintain
accurate directions.
Identical tiny circles on the generation
globe are projected to a flat map.
Polar aspect azimuthal equidistance
world project tangent at the pole
Projected or Unprojected ?
• In GIS your data will be either
• Unprojected
or
• Projected
Projected or Unprojected ?
• In GIS your data will be either
• Unprojected
• Unprojected data means that it is simply stored in
a defined Geographic Coordinate System (GCS) =
Latitude , longitude values in decimal degrees.
• Projected
• Projected data means that a map projection has
been applied to your dataset
Map Projection Classification
• Projection properties
• Equal-area projection:
• Mollweide Projection
Map Projection Classification
• Projection properties
• Equal-area projection:
• Alber Equal Area Conic
Map Projection Classification
• Projection properties
• Conformal / Orthomorphic projection: Mercator
Map Projection Classification
• Projection properties
• Equidistante projection: projections that preserve linear
scale for some part of the map – Polar Azimuthal
Equidistant
Map Projection Classification
• Projection properties
• Azimuthal projection (True Direction): preserving the
direction azimuth.
• Polar Gnomonic
Projected Coordinate Systems [PCS]
• In ArcGIS , when you project your data , the dataset will have
PCS in addition to GCS.
• Projected Coordinate Systems have a linear unit of
measurement [for example meter or feet].
Projected Coordinate Systems [PCS]
• It is extremely important to understand the difference
between Define Projection and Project tool in ArcGIS.
• The only time you use Define Projection is when your
dataset is missing Spatial Reference.
Projected Coordinate Systems [PCS]
• The only time you use Define Projection is when your
dataset is missing Coordinate System [Unknown].
Vector Analysis I
• Ratio Policy in ArcGIS
• Calculating Centroids locations for polygons
• Joining and Relating Tables
1) What is the Total AREA (SQF) of
all land parcels?
• Use geoprocesing Map Document within Ratio Policy Folder to
answer the following question
1) What is the total AREA (SQF) of all land parcels?
Question
1) What is the total AREA (SQF) of all land parcels?
1) Add a field [SQF, Double]
2) Calculate Geometry – US SQUARE FEET
3) Statistics : SUM = 9,076,376
Question
• Use geoprocesing Map Document within Ratio Policy Folder to
answer the following question
2) What is the total AREA (SQF) of land parcels within 90
Yards of Power_Line2? Write down the major steps you
have to take to answer this question.
2) Total AREA (SQF) of land parcels within
90 Yards of Power_Line2?
•
•
•
•
•
Select Power_Line2
Buffer : 90 Yards
Clip: LandParcels using Buffer
Re-Calculate Geometry
Statistics : SUM = 2,500,097
1) Total AREA (SQF) of land parcels within
90 Yards of Power_Line2?
• Geometry calculation or re-calculation is one of the main
functionalities of GIS systems.
Question
• Use geoprocesing Map Document within Ratio Folder to answer
the following questions .
1) To ensure safety and control probable fire, the city has to
cut the trees within 90 Yards of Power_Line2. Estimate
how many trees must be cut. Explained your initial
assumption.
1) Approximate total Number of trees
within 90 Yards of Power_Line2?
• Attributes [not geometric] can be estimated using Ratio Policy
method in ArcGIS
• Ratio Policy method assumes that the attribute is distributed
equally within our region.
RATIO Policy
• RATIO POLICY
AREA: 1000 sqf
AREA: 500 sqf
Population: 500
Population: 250
1) Approximate total Number of trees
within 90 Yards of Power_Line2?
• To apply Ratio Policy:
Make Feature Layer of the layer that contains the attribute in
question [e.i. Number of tree]
If you create a feature layer of LandParcels, and check the
Ratio Policy for a field {N_Trees} all feature classes that will
produce using this layer will have the correct ratio (number)
for N_Trees.
2) Approximate total Number of trees
within 90 Yards of Power_Line2?
2) Approximate total Number of trees
within 90 Yards of Power_Line2?
2) Approximate total Number of trees
within 90 Yards of Power_Line2?
2) Approximate total Number of trees
within 90 Yards of Power_Line2?
2) Approximate total Number of trees
within 90 Yards of Power_Line2?
2) Approximate total Number of trees
within 90 Yards of Power_Line2?
2) Approximate total Number of trees
within 90 Yards of Power_Line2?
Question
• Use geoprocesing Map Document within Ratio Folder to answer
the following questions.
2) Approximate number of people [ population ] living within
ONE mile of HWY 5 in California.
Calculate Polygons’ Centroids
• In mathematics and physics, the centroid or geometric center
of a two-dimensional region is, informally, the point at which a
cardboard cut-out of the region could be perfectly balanced on
the tip of a pencil (assuming uniform density and a uniform
gravitational field).
Calculate Polygons’ Centroids
• Find the centroid of polygons :
• Feature to Point Tool
• http://desktop.arcgis.com/en/arcmap/latest/tools/datamanagement-toolbox/feature-to-point.htm
Database Management & Geodatabases
Attribute Data
• Use to capture non-spatial aspects of an entity.
• Most often contained in a table
• Attributes can be categorized as – Level of measurement
• Nominal: Provide descriptive info. Ex. Color, names,
types of soil. No implied order, size of quantity.
• Ordinal: Imply rank order or scale. Does not represent
differences in scale. Ex. Descriptive (short, medium, long)
or numeric (1-100).
• Interval/Ratio: Where both order and absolute
differences in magnitude are represented. Ex. Length,
weight, height or depth.
Attribute Data
• Use to capture non-spatial aspects of an entity.
• Most often contained in a table
• Attributes can be categorized as – Level of measurement
• Interval/Ratio: Where both order and absolute
differences in magnitude are represented. Ex. Length,
weight, height or depth.
• Interval measurement has a an arbitrary starting point
instead of an absolute zero (Celsius temperature)
Database in Computers
• Structured collection of information or
• Collection of files
• Ordered
• Organized
Database in Computers
•
•
•
•
Tables
Records
Fields
Keys
Database in Computers
•
•
•
•
Tables
Records
Fields
Keys
Database Management System (DBMS)
• DBMS (Database Management System):
• A specialized computer program for organizing and
manipulating data
Database Management System (DBMS)
• DBMS (Database Management System):
• A specialized computer program for organizing and
manipulating data
Database Management System (DBMS)
• DBMS (Database Management System):
• A specialized computer program for organizing and
manipulating data
• Note: A database is the organized collection of data, often created or
manipulated with the help of a DBMS. The terms Database and DBMS
should not be used interchangeably.
Database Components
• Data definition language
• Define the structure of the database
• Data manipulation language
• Manage and retrieve information in the database
Functions of Database
•
•
•
•
•
•
Define the structure of the database
Insert data
Delete data
Modify data
Inquiry about data
Join/Relate Tables
Non-Relational Database – Flat Files
Relational Database
Relational Database
• Advantages:
•
•
•
•
Reduces redundancy
Allows for dynamic queries
Uses SQL (structured query language)
Good security
Relational Database – Table Relationship
• One-to-One Relationship
Relational Database – Table Relationship
• One-to-Many & Many-to-One Relationship
Joining and Relating Tables
• Joining Tables: Appends the attributes from one table onto
another based on a field (key) common to both.
Joining and Relating Tables
• Joining Tables: Appends the
attributes from one table onto
another based on a field (key)
common to both.
• FIPS – Federal Information
Processing Standard
Joining and Relating Tables
• Relating Tables: Defines a relationship between two tables - also
based on a common field (key) - but doesn't append the
attributes of one table to the other. Instead, you can access the
related data when necessary.
Joining and Relating Tables
• Tables are linked through Keys.
• Keys are items or fields that meet certain requirements (data
format and length) and are used to index the records.
• Note: Misspelling or spaces in key values can create problems
with your join or relate process.
• Example: Northridge vs Nothridge or NewMexico vs New Mexico.
Joining and Relating Tables
• To obtain info about a key field, go to Layer Properties and click
on the Fields tab.
Joining and Relating Tables
• After joining a table, you can preserve the join by right-clicking
on the shapefile or feature class and selecting Data…Export Data.
Geodatabase
• The geodatabase is a container for storing spatial and attribute
data and the relationships that exist among them
• Format introduced by ESRI with ArcGIS® software
• Primary format we will be working with in this class.
Geodatabase
• The geodatabase is a container for storing spatial and attribute
data and the relationships that exist among them
• Format introduced by ESRI with ArcGIS® software
Geodatabase
• Geodatabases can consist of:
• Feature Datasets
• Feature Classes
• Annotation Feature Classes
• Raster Datasets
• Nonspatial Tables
Types of Geodatabase
• Personal Geodatabases: Stored within Microsoft Access. Holds
up to 2 GB of data.
• File Geodatabases: Stored as folders in a file system. Each
dataset holds up to 1 TB of data. Fast performance, less
restrictive editing locks and supported by many platforms.
• ArcSDE Geodatabases: Stored in a relational database using
Oracle, Microsoft SQL Server, IBM DB2, or IBM Informix. Requires
the use of ArcSDE software. Unlimited in size and numbers of
users.
Geodatabase Behavior Schemas
• A schema defines the physical structure of the geodatabase along
with the rules, relationships, and properties of each dataset in
the geodatabase.
• Users often share their schemas with others.
• http://support.esri.com/en/downloads/datamodel
Geodatabase Behavior Domains
• A list or range of valid attributes for an attribute that limits
values. Helps to limit user error.
• Range Domains
• Example: Pipe diameter (range = 1-5 feet)
• Coded Value Domains
• Example: Vegetation Type (Tree, Scrub or Grass).
ArcGIS TIPS
• Creating a Geodatabase
• In ArcCatalog:
• Navigate to the folder you want to create the GDB in.
• Right click and select New…
• Select either File or Personal Geodatabase.
• Right-click on or in the GDB to create new feature
datasets, classes or tables.
• You can import your shapefile in geodatabase
ArcGIS TIPS
• Add Field and Calculate Field Demonstration
Ratio Policy in ArcGIS
Question
• Use geoprocesing Map Document within Ratio Folder to answer
the following question:
1) To ensure safety and control probable fire, the city has to
cut the trees exactly within 90 Yards of Power_Line2.
Estimate (approximate) how many trees must be cut.
Explained your initial assumption.
Ratio Policy
• allows attributes that are involved in splitting (like
intersection or clip) to have their values change relative to the
area that they represent. Selecting RATIO means the attributes
of the resulting features are a ratio of the original feature's
value.
• The ratio is based on the ratio in which the original geometry
is divided. If the geometry is divided equally, each new
feature's attribute gets one -half the value of the original
object's attribute.
RATIO Policy
• RATIO POLICY
AREA: 1000 sqf
AREA: 500 sqf
Population: 500
Population: 250
Ratio Policy
• The underling assumption in Ratio Policy is that the attribute
at hand has an equal spatial distribution within the area.
• Process:
1) Make Feature Layer [add _RP to the name of the new
layer}
2) Select the attribute that you would need the ratio policy
to apply
3) Create a new Ratio Policy layer
4) Use the new Ratio Policy layer in your splitting
geoprocessing like Clip or Intersect.
1) Estimate number of trees exactly within
90 Yards of Power_Line2?
• Geometry recalculation adds to the complexity of the process
and is the source of confusion for GIS analysts.
1) Estimate number of trees exactly within
90 Yards of Power_Line2?
• Geometry recalculation adds to the complexity of the process
and is the source of confusion for GIS analysts.
• If you create a layer of LandParcels, and check the Ratio Policy
for a field {N_Trees} all feature classes that will be produced
using this layer [in clip or intersect] will have the ratio
(number) for Trees.
• This ratio will be based on the size of the output geometry.
1) Estimate number of trees exactly within
90 Yards of Power_Line2?
• Make Feature Layer
1) Estimate number of trees exactly within
90 Yards of Power_Line2?
1) Estimate number of trees exactly within
90 Yards of Power_Line2?
1) Estimate number of trees exactly within
90 Yards of Power_Line2?
1) Estimate number of trees exactly within
90 Yards of Power_Line2?
1) Estimate number of trees exactly within
90 Yards of Power_Line2?
1) Estimate number of trees exactly within
90 Yards of Power_Line2?
1) Estimate number of trees exactly within
90 Yards of Power_Line2?
Question
• Use geoprocesing Map Document within Ratio Folder to answer
the following questions.
2) Approximate number of people [ population ] living
exactly within ONE mile of HWY 5 in California.
Spatial Analysis – Vector Data
Outline
• Selections :
• Select By Attribute
• Select By Location
• Vector based Reclassification
Selection By Attribute:
Attribute Query
• Identifying or select a subset of features [or Table Record]
that meet one or several conditions or criteria.
Selection By Attribute:
Attribute Query
• Identifying or select a subset of features [or Table Record]
that meet one or several conditions or criteria.
• To do so we will need to build Query Expressions
• Query expressions in ArcGIS adhere to standard SQL
expressions.
Selection By Attribute:
Attribute Query
• Identifying or select a subset of features [or Table Record]
that meet one or several conditions or criteria.
• To do so we will need to build Query Expressions
• Query expressions in ArcGIS adhere to standard SQL
expressions.
Selection By Attribute:
Attribute Query
SELECT * FROM forms the first part
of the SQL expression and is
automatically supplied for you.
Selection By Attribute:
Attribute Query
SELECT * FROM forms the first part
of the SQL expression and is
automatically supplied for you.
Query expressions use the general
form that follows a
Select * From <Layer or dataset> WHERE:
Selection By Attribute:
Attribute Query
Query expressions use the general
form that follows a
Select * From <Layer or dataset> WHERE:
Select all Features
within this Layer which meet the
following condition(s)
Selection By Attribute:
Attribute Query
• Here is the general form for ArcGIS query expressions:
<Field_name> <Operator> <Value or String>
• For compound queries, the following form is used:
<Field_name> <Operator> <Value or String> <Connector> <Field_name> <Operator> <Value or String> ...
• Optionally, parentheses () can be used for defining the order
of operations in compound queries
Selection By Attribute:
Attribute Query – Relational Operators
• Relational Operators
• Selection conditions are formalized using Relational
Operators:
• Less than <
• Greater than >
• Equal to =
• Lass than or equal <=
• Greater than or equal >=
• Not equal to <>
Selection By Attribute:
Attribute Query – Relational Operators
Selection By Attribute:
Attribute Query – Boolean Operators
• Boolean Operators
• Use OR, AND and NOT to select features.
• Most often used to combine Relational conditions and create
compound spatial selection.
Selection By Attribute:
Attribute Query – Boolean Operators
• Boolean Algebra
• AND operator requires conditions on both sides of the
operation be ‘true’ - typically decreases selection sets.
Selection By Attribute:
Attribute Query – Boolean Operators
• Boolean Algebra
• OR operator requires only one condition be ‘true’ - typically
increase or add to selections.
• NOT is a negation operation. i.e. select records that do not
equal a specified condition.
Selection By Attribute:
Attribute Query – Boolean Operators
• Boolean Algebra
• OR operator requires only one condition be ‘true’ - typically
increase or add to selections.
• NOT is a negation operation. i.e. select records that do not
equal a specified condition.
• You must use NOT in front of, BEFORE the condition that
you would like to negate.
Selection By Attribute:
Attribute Query – Boolean Operators
Selection By Attribute:
Attribute Query
• Select by Attributes
• To preserve the result of a
query you can:
1. Temporarily Save the Selection:
Right click the layer and choose
Selection… Create Layer from
Selected Features.
2. Permanently Save the
Selection: Right-click the layer
and choose Data… Export Data
(Saves to a new shapefile or
feature class).
Selection By Attribute:
Attribute Query - Using LIKE in a query
• Use the LIKE operator (instead of the = operator) to build a
partial string [TEXT] search.
• % means that anything is acceptable in its place: one
character, a hundred characters, or no character.
• Alternatively, if you want to search with a wildcard that
represents one and only one character, use _.
Selection By Attribute:
Attribute Query - Using LIKE in a query
Selection By Attribute:
Attribute Query - Using IN in a query
• Use IN within your query expression to selecting multiple
values from the attribute table [one field]
• What is the population of the following zipcodes:
Selection By Attribute:
Attribute Query - Using IN in a query
• What is the population of
• the following zipcodes:
Selection By Attribute:
Attribute Query - Using BETWEEN in a query
• Use the BETWEEN operator to select features based on a given
interval of an attribute. In this case the interval is INCLUSIVE.
• How many zipcodes are there with population more than or
equal to 13046 and less than or equal 15000?
Selection By Attribute:
Attribute Query - Using BETWEEN in a query
How many zipcodes are there
with population more than or
equal to 13046 and
less than or equal 15000?
Selection By Attribute:
Attribute Query
•
•
•
•
•
•
•
Select the State that its NAME is “California”
Select the States that their AREA is greater than 150,000 sqMiles
Select the States that their NAMEs starts with letter ‘C’
Select the State that its NAME is “Texas”
Select the State that its NAME is NOT “Texas”
Select the States that their AREA is greater than or equal 100,000 sqMiles
Select the States that their AREA is greater than or equal 100,000 sqMiles
with population density greater than 50
• Select the States that their AREA is greater than or equal 100,000 sqMiles
OR the states with population density greater than 50
• Select the States that the SECOND letter in their name is ‘a’
Select the State that its NAME is “California”
Select the States that their AREA is greater than 150,000 sqMiles
Select the States that their NAMEs starts with letter ‘C’
Select the State that its NAME is “Texas”
Select the State that its NAME is NOT “Texas”
Select the States that their AREA is greater than or equal 100,000 sqMiles
Select the States that their AREA is greater than or equal 100,000 sqMiles
with [AND] population density greater than 50
Select the States that their AREA is greater than or equal 100,000 sqMiles
OR the states with population density greater than 50
Select the States that their AREA is greater than or equal 100,000 sqMiles
OR the states with population density LESS THAN OR EQUAL than 50
Select the States that their AREA is greater than or equal 100,000 sqMiles
OR the states with population density greater than 50
Select the States that the SECOND letter in their name is ‘a’
Select By Location
• Spatial Selection Operation / Proximity Functions
• Types of proximity questions:
1.
2.
3.
4.
How close are schools to an oil refinery?
What neighborhoods are far from convenience stores?
Which homes will be affected by freeway noise?
How close are the nearest competing businesses?
Select By Location
• Spatial Selection Operation / Proximity Functions
• In GIS you can select geographical features not only by their
attributes but by their relative locations to other features. We
call this operation Select By Location.
Select By Location
• ArcMap lets select features in one layer based on their location
relative to the features in another layer. These relationships
include intersection, proximity and containment.
Select By Location - Intersection
• Intersect returns any feature in Target Layer that either fully or
partially overlaps the Source Layer.
• How many zipcodes Venice Blvd. is passing through?
Select By Location - Proximity
• In ArcMap we can select features based on their proximity
(distance) to other features. This can be done by using “Are
within a distance of” spatial relationship method in ArcGIS.
• How many stations are within 100 meters of Power_Line 1?
Select By Location - Containment
• Sometimes in spatial analysis we have to select features that are
within another feature(s). These types of selections are done
based on containment spatial relationship. In ArcMap you can
select features using “Are completely within” spatial selection
method.
• How many stations are completely within commercial landuse?
Classification
• Classification will categorize geographic objects based on a
set of conditions.
• Classification may add to or modify the attribute data for each
geographic object.
• Group objects for display or map production.
• Assignment from an existing set of classes to a
new set of classes.
ADD XY DATA
•
Adding point based on their Geographical Coordinates
•
•
Latitude
Longitude
ADD XY DATA : GCS
•
•
Locations Table contains Geographic Coordinates of 10 points.
X Field contains Longitude values and Y Field contains Latitude
values.
•
These Longitude and Latitude values are based on NAD 83
ADD XY DATA : GCS
•
•
Locations Table contains Geographic Coordinates of 10 points.
X Field contains Longitude values and Y Field contains Latitude
values.
•
To map these location we can
•
•
Add a base map
Use Add XY Data Function
ADD XY DATA : GCS
•
It is extremely important to remember that the Description
value is the Coordinate System of the Input Values
[Coordinates of the Points].
ADD XY DATA : GCS
•
ArcGIS initial Description of
the coordinates of the input
data is WRONG. We must set
the description to a GCS, NAD
83.
ADD XY DATA : GCS
•
ArcGIS initial Description of
the coordinates of the input
data is WRONG. We must set
the description to a GCS, NAD
83.
•
We have to Edit the
Description and Select NAD 83
from GCS.
ADD XY DATA : GCS
•
ArcGIS initial Description
of the coordinates of the
input data is WRONG. We
must set the description
to a GCS, NAD 83.
•
We have to Edit the
Description and Select
NAD 83 from GCS.
ADD XY DATA : GCS
•
GCS NAD 83 is the correct
description of the coordinates
of our points.
ADD XY DATA : PCS
•
Using same logic we can map points with projected coordinate
system.
•
Crime_SCV Table presents crime data reported in Santa Clarita
Valley in 2012. However, the X and Y coordinates in this case are
given in the following Coordinate System:
NAD_1983_StatePlane_California_V_FIPS_0405_Feet
WKID: 2229 Authority: EPSG
Geocoding
•
The process of creating Map Features [ for example
points ] from addresses is called geocoding.
Geocoding
•
The process of creating Map Features [ for example, points ]
from addresses is called geocoding.
•
Geocoding Addresses requires :
1. Address Table: a table containing the list of addresses you
want to geocode.
2. Street-Level Reference data: A feature class [line]
containing street names, street type and so on
3. Address Locator: a file that contains reference data and
“geocoding rules”
Geocoding
•
Output of Geocoding is either:
•
Shapefile
•
Geodatabase feature class
Geocoding
•
Create a new Address Locator in ArcCatalog
Geocoding
•
Select Address Locator style as Dual Range
Geocoding
•
Select Roads feature and save the locator
ADD XY DATA
•
Adding point based on their Geographical Coordinates
•
•
Latitude
Longitude
ADD XY DATA : GCS
•
•
Locations Table contains Geographic Coordinates of 10 points.
X Field contains Longitude values and Y Field contains Latitude
values.
•
These Longitude and Latitude values are based on NAD 83
ADD XY DATA : GCS
•
•
Locations Table contains Geographic Coordinates of 10 points.
X Field contains Longitude values and Y Field contains Latitude
values.
•
To map these location we can
•
•
Add a base map
Use Add XY Data Function
ADD XY DATA : GCS
•
It is extremely important to remember that the Description
value is the Coordinate System of the Input Values
[Coordinates of the Points].
ADD XY DATA : GCS
•
ArcGIS initial Description of
the coordinates of the input
data is WRONG. We must set
the description to a GCS, NAD
83.
ADD XY DATA : GCS
•
ArcGIS initial Description of
the coordinates of the input
data is WRONG. We must set
the description to a GCS, NAD
83.
•
We have to Edit the
Description and Select NAD 83
from GCS.
ADD XY DATA : GCS
•
ArcGIS initial Description
of the coordinates of the
input data is WRONG. We
must set the description
to a GCS, NAD 83.
•
We have to Edit the
Description and Select
NAD 83 from GCS.
ADD XY DATA : GCS
•
GCS NAD 83 is the correct
description of the coordinates
of our points.
ADD XY DATA : PCS
•
Using same logic we can map points with projected coordinate
system.
•
Crime_SCV Table presents crime data reported in Santa Clarita
Valley in 2012. However, the X and Y coordinates in this case are
given in the following Coordinate System:
NAD_1983_StatePlane_California_V_FIPS_0405_Feet
WKID: 2229 Authority: EPSG
Question:
•
We would like to create a choropleth map of land parcels,
showing number of pollution-gauging stations within each
parcel. What should we do?
Spatial Join
Spatial Join
•
Joins attributes from one feature to another, based on the
spatial relationship.
Spatial Join : Points to Polygons
•
Joining Points to Polygons:
•
A Count_ field will be added to the
polygon feature class, showing number
of points that fall inside each polygon
Question:
•
Is it possible to get more information from the
Station_Pullotion layer rather than just total number of points
or Stations?
Spatial Join : Points to Polygons
•
Joining Points to Polygons:
•
A Count_ field will be added to the
polygon feature class, showing number
of points that fall inside each polygon
•
We can get more properties of point
layer by checking the “Summarized
Attribute Check boxes”
Spatial Join : Points to Polygons
•
Joining Points to Polygons:
•
We also have the option to create a
polygon feature class and give each
polygon all the attribute of the point
which closest to its borders
•
A “Distance” field will be created to
show the distance between the point
and the polygon border.
•
A distance of zero mean that the point
falling inside the polygon is closest to
its border.
Spatial Join : Points to Lines
•
Joining Points to Line:
•
We can use spatial join and join a set
of pints to a line or a set of line to get
the attributes of the closet point to the
line.
•
A “Distance” field will be created to
show the distance between the point
and the line.
•
A distance of zero mean that the point
is located on the line.
Question:
•
What is the total area (SQUARE FEET)
within 175 meters of all the stations
per each land-use?
•
write down the steps required to
calculate the areas
Question:
•
Apply the process and write down the
areas for each Land-Use:
•
•
•
•
•
•
Commercial
Government
Parks
Residential
Industrial
Waterbody
Question:
1) Buffer : 175 meters, Buffer_175,
Dissolve ALL
2) Clip: LandParcel, Buffer_175 as Clip,
Output: LandParcel_clip
3) Dissolve: Lanparcel_clip, based on
LandUse,
Output: Final
4) Add Field: named SQF, Double
5) Calculate Geometry : Area based on
SQF
Spatial Analysis – ModelBuilder
Outline
• What is a model?
• What is ModelBuilder?
• Why use a model?
• Element Symbols
• How to use ModelBuilder
What is a Model?
•
A model is a collection of geoprocessing operations that
automatically execute in sequence to produce a final output
dataset.
•
Any geoprocessing operation in a model can be modified, then the
model can be run again to quickly refine an analysis or produce
new data that supports an alternative ("what if?") scenario.
What is a Model?
•
A model is represented by a diagram that shows all the processes
and the sequence in which they run. The connecting arrows show
how elements and processes are related to each other.
Example
•
DEM Processing
What is a ModelBuilder?
•
ModelBuilder is an application that you can access through
ArcCatalog or ArcMap in which you create, edit and manage
models.
•
The building block of a model is called a process. A process
consists of a geoprocessing tool.
•
When displayed graphically in a model, the individual parts of a
process are called elements.
What is a ModelBuilder?
Model elements can be in one of three states:
•
•
white elements are
Not Ready to Run
•
colored elements are
Ready to Run
•
elements with a
dropshadow have
finished running.
Has Been Run
Why Use ModelBuilder?
•
Models provide a big-picture view of a project.
•
Models are reusable.
•
Processes run seamlessly and faster.
•
Processes can be run individually.
•
Models make managing intermediate data easy.
•
Models can be shared.
1. Creating a ToolBox
1. Open ArcCatalog and browse to your Week_01 folder.
2. Right-click in a white area and click New > Toolbox
3. A Toolbox will be added to your folder
2. Setting the Environment
•
Now open ModelBuilder.mxd map document with ArcMap.
•
Click on Geoprocessing > Environments
•
Set the Current and Scratch workspace to point to your
Exercise_Data.gdb and Click OK.
3. Setting the Environment
•
Click on ModelBuilder Window icon to open ModelBuilder Window.
•
You can save your model later as GeoProcessing_1 within your
Toolbox. An ArcGIS model can be saved in a Toolbox. Click on Save
button in Model Window and browse to your Toolbox, save it as
GeoProcessing_1.
ModelBuilder Toolbar
Using ModelBuilder
•
Drag tools from the appropriate
toolbox into the model.
•
Double-click on the tool and fill
in the appropriate parameters.
•
When created properly the
elements will turn the
appropriate color:
•
•
•
blue = input layer
yellow = tool
green = output layer
4. Building the Model
•
You can search for geoprocessing tools in Search Tab. Then you can
drag the tool to the Model Canvas.
•
Search for Buffer tool then drag it to the canvas.
4. Building the Model
•
You can search for geoprocessing tools in Search Tab. Then you can
drag the tool to the Model Canvas.
•
Search for Buffer tool then drag it to the canvas.
•
Buffer tool has one input dataset / feature. You can drag Stations
layer to the tool or open then tool by double clicking on it and set
the input feature to Points layer.
•
Set the output feature as Buffer_175
4. Building the Model
•
You can search for geoprocessing tools in Search Tab. Then you can
drag the tool to the Model Canvas.
•
Search for Buffer tool then drag it to the canvas.
•
Buffer tool has one input dataset / feature. You can drag Points
layer to the tool or open then tool by double clicking on it and set
the input feature to Points layer.
•
Set the output feature to Buffer_175
•
The Model is not ready to run yet , the buffer distance is missing.
Set the buffer distance to 175 Meters.
5. Building the Model
•
Add Clip tool to the model.
•
Clip tool has two input dataset. Input Feature and Clip Feature.
•
Set input feature to LandParcels layer and Clip Feature to the
output layer of Buffer tool.
6. Building the Model
•
Now we have to add Dissolve tool.
•
Make sure the input of dissolve is LandParcels_Clip Feature and
Check LandUse in the Dissolve_Field .
•
Call output feature Final.
7. Building the Model
•
Add “Add Geometry Attributes” to the Model Canvas.
•
Save the model.
Open a Saved Model
•
To open a saved model, click on Catalog Tab in ArcMap.
•
Browse to your toolbox and open the toolbox.
•
Right-Click on your model and click Edit
Run a Model
•
Running a Save Model:
1) You can run a model within your model window. You have to
browse to your toolbox and click edit to open your model window.
Click RUN button to run your model.
2) You can run your model as a tool. Browse to your tool box and
click open. The dialog of your tool will open then click OK.
Remove DropShadow
•
A Model with dropshadows is model that “Has been Run”.
•
To remove the drop shadows, validate the entire model by clicking
the Validate Entire Model button on the ModelBuilder toolbar.
•
Validate reset the Model to “Ready to Run” state.
Question:
•
What if we change the model in such a
way that the model asks for buffer
distance, instead of hardcoding the
distance in the model?
Model Parameters
•
Parameters in model can be defined and selected by users. They
create a much more interactive environment when running your
tool
•
Any variable in the model [ distance for example ] can be set as
the model parameter. It means that if you run the model as a
TOOL the model will ask for its value.
8. Making Model Parameter
•
We would like to make Distance within Buffer tool a Model
Parameter. Distance is a Tool Parameter.
•
Right-click on Buffer tool, then Make a Variable > From Parameter
> Distance
•
This will expose Distance as a model variable.
8. Making Model Parameter
•
Right-click on the Variable that you just made and click Rename.
Rename the variable to just Distance.
8. Making Model Parameter
•
Right-click on the Variable that you just made and click Rename.
Rename the variable to just Distance.
•
Right click on Distance variable and click Make a Parameter. This
will make that variable a Model Parameter, and if you run the
model as a tool the tool will ask for its value.
•
NOTE: Make sure Distance variable has no values in its field.
9. Run the Model As a Tool
•
Double-click on your model.
•
Enter 175 for distance field and click OK to run the model.
Intermediate Data
•
When you run a model, output data is created for each process in
the model.
•
Some of the data created is of no use after the model is run since
it was only created to connect to another process that creates
new output - intermediate data
•
Right_Click on output and check for intermediate data
Variable Substitution
•
We can use the value of Distance variable to create the name for
our final output feature.
•
In Model builder you can use in variable in different places using
Variable Substitution.
•
You can put the name of the variable between % signs to use it in
other places [ %Distance% ]
10.Variable Substitution
•
Now we would like to create our final feature and include the
buffer distance in its name. For example if the buffer distance is
175 meter, the name of our output will be Final_175
•
In your model, double-click on Calculate Area to open its dialog.
Call the Output Feature Class Final_%aName%