Sei sulla pagina 1di 6

CE 70 GIS and Remote Sensing

Laboratory Activity No. 3

By: Dr. George R. Puno

Name: JANIOLA, JOYZELLE ANN C.

Yr & Sec: BSCE 5

Date Performed: 01/04/2016

Title: Query Analysis in ArcGIS

I. Introduction:

According to Techopedia (2016), query analysis is a process used in databases which make
use of SQL in order to determine how to further optimize queries for performance. Queries are
expressed in a standard way using SQL (sequel). This language is composed of a set of commands
and rules that are used to ask questions of a database. SQL, which has been implemented for nearly
every DBMS, comes in many subtly different flavors depending on the database being queried
(Pratt, M). The software then detects the characteristics of the database being queried and then
modifies it using the appropriate search term.
There are also two types of query the, this is the attribute and spatial query. Attribute
queries ask for information from the tables associated with features or from stand alone tables
associated with the GIS.These attributes can be numeric values, text strings, Boolean values (i.e.,
true or false), or dates. This kind of query is similar to a query made toany database; however,
when using a GIS, the answers (i.e., the features related to the records selected by the process) are
highlighted on the map as well as in the table.
On the other hand, spatial queries are derived directly from the location of features on a
map. Information about the proximity of one parcel to other parcels or other kinds of features, such
as roads, is not contained in an attribute table but is easily learned using a spatial query. For
example, you could ask if one or more features are located within a certain distance of other
features, are contained by another feature, intersect other features, or possess another of the
relationships defined by spatial operators.

II. Objectives: At the end of the activity, the students are expected to;
1. Demonstrate how to do simple query analysis from the attribute table of a given dataset;
2. Familiarize the different properties of a given layer or shapefile;
3. Appreciate the importance of query analysis in extracting data and information from a given
dataset.

III. Methodology:

1. A dataset of region 10 in Mindanao containing the different attribute data was secured.
2. ArcGIS program was opened and add dataset with a file name of region10 was added.
3. When the dataset is already added in the Data View window of the ArcGIS program, the
Properties tab of the layer was opened.

a. Type of data: Shapefile Feature Class


b. Geometry type: Polygon
c. Datum used: D_WGS_1984
d. Prime meridian: Greenwich
e. Projection used: Transverse_Mercator
f. Projected coordinate system used: WGS_1984_UTM_Zone_51N
g. Geographic coordinate system used: GCS_WGS_1984
h. Left extent: 560381.527544 m
i. Right extent: 769579.257514 m
j. Top extent: 1023802.732353 m
k. Bottom extent: 818445.076407 m

4. Open the Attribute Table of the layer, examine it and provide the following information by
filling the blanks below: Explore the program using the Select by Attribute command to answer

the below queries in a quick manner. Read the reference: Asking the Right Question.

a. The total number of barangays in Bukidnon: 464 barangays


b. The largest barangay in terms of hectare in Bukidnon: Busdi, Malaybalay City
c. The smallest barangay in terms of hectare in Bukidnon: Barangay 3, Malaybalay City
d. The number of barangays in the region that begins with letter T: 133 barangays
e. The province with the smallest number of barangays: Camiguin
f. The province with the largest number of barangays: Lanao del Norte
g. The largest municipality in terms of hectares in the region: Malaybalay City
h. The largest province in terms of hectares in the region: Bukidnon
i. The smallest province in terms of hectares in the region: Camiguin
j. The municipality with the smallest perimeter: Lugait
k. The municipality with the largest perimeter: Malaybalay City
l. The most populated province of the region: Misamis Oriental
m. The less populated province of the region: Camiguin
n. The less populated municipality of the region: Binuangan
o. The most populated municipality of the region: Cagayan de Oro City
p. The less populated municipality of Bukidnon: Damulog
q. The most populated municipality of Bukidnon: Malaybalay City
r. The barangays with population >= 1500 and <=1600 and households >= 300 and <= 320.

Kianggat
Bismartz
Alangilan
Binuni
Magoong
Dansalan
Aluna
Tabok
Mapulog

s. The barangays with hectares >= 1000 and <=1400 and households >= 2000 and <= 3000.

No listed barangay has the listed attributes above.

IV.

Observations and Discussions:


1. What is dataset?
A dataset is a collection of data. A collection of data is called dataset. A dataset
commonly corresponds to the contents of a single database table, or a single
statistical data matrix, where every column of the table represents a particular
variable, and each row corresponds to a given member of the data set in question. The
dataset lists values for each of the variables, such as height and weight of an object,
for each member of the dataset and each value is known as a datum. It comprise data
for one or more members, corresponding to the number of rows.
A DataSet can read and write data and schema as XML documents. The data
and schema can then be transported across HTTP and used by any application, on any
platform that is XML-enabled. You can save the schema as an XML schema with
the WriteXmlSchemamethod, and both schema and data can be saved using
the WriteXml method. To read an XML document that includes both schema and data,
use the ReadXml method.
One example of a dataset is buk_mun shapefile. This particular data set
contains the municipalities of Bukidnon including its area, population and the
barangays in each municipality.

2. What is query, query expression, and query table?


A query is a form of questioning. It can also mean a request for information
about something. While, query expressions are used in ArcGIS to select a subset of
features and table records. Query expressions in ArcGIS adhere to standard SQL
expressions. The query table object is another potent option for loading data. Query
table object works by processing data requests through an internal Web Query object.
The query table object contains a connection parameter pointing, to an internet
resources. Query table also contains destination parameter where the data must be
placed. The query table is where the different data and boolean operators are listed
from a certain dataset. This is also where one can create the query expression for a
certain data by using unique attributes.
3. What is standard query language (SQL)?

Structured Query Language (SQL) is a set of defined expressions and syntax


used to query and manipulate data in relational database management systems
(RDBMS).
In the context of the geodatabase, SQL can be used to access, create, and update
simple data; in other words, data that does not participate in any geodatabase
functionality such as networks, topology, terrains, parcel fabrics, schematics,
relationship classes, geodatabase domains, or geodatabase replication.

4. Explain what is Boolean Expression.


Boolean expressions are also called comparison expressions, conditional
expressions, and relational expressions. Boolean expression also known as logical
operators, take logical operands, and they also return Boolean values. A Boolean value
can be just one of two possibilities: true or false. All expressions that contain relational
operators , such as the less than sign (<), are Boolean. The operators: AND, OR, XOR,
NOR, and NOT are also Boolean operators (Webopedia, 2016).
If an expression equates to a nonzero value, that expression is considered to be
true.
If an expression equates to zero, that expression is considered to be false.
For example, the expression 10 < 25 is a Boolean expression because the result is
TRUE.

5. Is the municipality with the largest hectare the same with municipality with largest
perimeter?
The municipality with the largest hectare also corresponds to the municipality with the
largest perimeter, because as the area of an object increases it perimeter also increases.

V.

Conclusion and Recommendations:

Firstly, a simple analysis can be done by making a query expression out of the data that is
particularly needed. This is an example of a query analysis: POPULATION LIKE >= 1500 AND
POPULATION LIKE <=1600 AND HOUSEHOLDS >= 300 AND HOUSEHOLDS<= 320.
Secondly, there are also different properties for a given layer or shapefile. These properties include
the geometry type, type of data, datum used, projection used, projected coordinate system,
geographic coordinate system, left extent, right extent, top extent, and bottom extent. Lastly, query
analysis is a very important tool GIS as it allows fast retrieval of specific data from a set of data.

To further improve the activity, the student must first know about the query expression so
that the activity will become much easier to perform.
VI.

References:
Veer, E. M. 2005. JavaScript for Dummies, 4th Edition. Wiley Publishing, Inc., 111
River Street Hoboken, NJ 07030-5774.
ArcMap 10.1, Help Menu

Terefe, A. 2010. Application and use of GIS in Small Sanitation Project in Developing
Countries, p 14
Query Analysis. Retrieved from https://www.techopedia.com/definition/30357/queryanalysis.

Potrebbero piacerti anche