Skip to content

Vector data, attribute queries, spatial queries

Basic terms

Vector and raster spatial data

  Vector data

Formed by vertices and paths - these are determined by actual coordinates.

The detail is determined by the detail of the vertex coordinates.

Suitable for discretely distributed data (e.g. point locations, land cover categories)

Possible topology problems (gaps and overlaps)

  Raster data covered by following practicals

Formed by a regular grid of pixels – these are determined by pixel coordinates (row/column)

Detail is determined by pixel size (in meters)

Suitable for phenomena changing both continuously (e.g. terrain model, air pollution) and discretely, as well as image data (e.g. satellite)

Contents

Attribute queries

Attribute Query is a method of selecting/filtering elements based on attribute values. It complements the interactive feature selection method from practical 1. The basis is a selection rule - called Expression. ArcGIS Pro allows you to build expressions interactively using a dialog, but to use the full potential of expressions, it is recommended to use SQL code.

Attribute query (over map data): Map Select By Attributes → fill in the dialog... Select features using attributes

The Input Rows field is automatically prepopulated with the layer selected in the map content

Using the you can change the notation between the interactive dialog entry and the SQL expression.

Introduction to query expressions Construct and modify queries

Example to try
testing attribute queries on real data

Layer attributes scheme:
attribute data type description
FEATURECLA String Populated places classification
NAME String Name of the populated place
WORLDCITY Integer Whether the place is classified as a World city,
0=no, 1=yes
MEGACITY Integer Whether the place is classified as a Mega city,
0=no, 1=yes
SOV0NAME String Name of the sovereign country
ADM0NAME String Name of the admin country
ADM1NAME String Name of the First-level administrative devision in a country
LATITUDE Double Latitude
LONGITUDE Double Longitude
POP_MAX Double Estimate of inhabitants of the place with urban agglomeration
POP_MIN Double Estimate of inhabitants of the place without urban agglomeration
TIMEZONE String Name of the timezone

Spatial queries

Spatial Query is a method of selecting/filtering elements of one layer based on their relative position with elements of another layer. The function uses as input the layer of selected elements, the layer for overlay analysis a the relationship for overlay analysis.

IntersectA
Intersect (DBMS)A
ContainsA
Contains ClementiniA
WithinA
Within ClementiniA
Are identical toA
Have their center inA

IntersectA, C
Intersect (DBMS)A, C
WithinA, C
Completely withinA
Within ClementiniA
Have their center inA, C
Boundary touchesC

IntersectA, C
Intersect (DBMS)A, C
WithinA, C
Completely withinA
Within ClementiniA
Have their center inA, C
Boundary touchesC

IntersectA, C, D
Intersect (DBMS)A, C, D
ContainsA, C, D
Completely containsA, D
Contains ClementiniA, D
Have their center inD
Boundary touchesC

IntersectA, C, D, E, F, G, H, I, J
Intersect (DBMS)A, C, D, E, F, G, H, I, J
ContainsG, H
Completely containsG
Contains ClementiniG, H
WithinF, H
Completely withinF
Within ClementiniF, H
Are identical toH
Boundary touchesC, E
Share a line segment withF, G, H, I, J

IntersectA, C, D, E, F, G, H, I, J, K, L, M, N, O
Intersect (DBMS)A, C, D, E, F, G, H, I, J, K, L, M, N, O
WithinA, D, G, H, I, O
Completely withinA
Within ClementiniA, D, G, H, I
Boundary touchesF, G, H, I, K, L, M, N, O
Share a line segment withG, I, J, K, M, O
Crossed by the outline ofC, E, H, L, N
Have their center inA, C, D, E, G, H, I, J, O

IntersectA, B
Intersect (DBMS)A, B
ContainsA, B
Completely containsA
Contains ClementiniA
Have their center inA, D
Boundary touchesB

IntersectA, C, D, E, F, G, H, I, J, K, L, M, N, O
Intersect (DBMS)A, C, D, E, F, G, H, I, J, K, L, M, N, O
ContainsA, D, G, H, I, O
Completely containsA
Contains ClementiniA, D, G, H, I
Boundary touchesF, G, H, I, K, L, M, N, O
Share a line segment withG, I, J, K, M, O
Crossed by the outline ofC, E, H, L, N
Have their center inE, I, L

IntersectA, C, D, E, F, G, H, I, J, K, M
Intersect (DBMS)A, C, D, E, F, G, H, I, J, K, M
ContainsC, E, H, M
Completely containsC
Contains ClementiniC, E, H, M
WithinF, G, H, M
Completely withinF
Within ClementiniF, G, H, M
Are identical toH, M
Boundary touchesD, E, G, H, I, J, M
Share a line segment withD, H, I, M
Crossed by the outline ofA, E, G, J, K
Have their center inC, E, F, G, H, K, L

Select features by location Select Layer By Location (Data Management) Select By Location graphic examples