Skip to content

Vector data, attribute queries, spatial queries

Spatial data is any type of data that directly or indirectly references a specific geographical area or location. A location can be represented not only by a combination of coordinates (X + Y, latitude + longitude, etc.), but also by, for example, an address (of arbitrary detail). The two most common data formats used to store (geo)spatial data are vector and raster.

Spatial data types

  • Vector data


    • represent elements of the real world using basic geometric elements: points, lines and surfaces (called polygons)

    • the detail of the data is determined by the detail of the coordinates of the vertices of the geometric feature

    • suitable for modelling and analysis of discrete objects (e.g. location of points, land cover categories)

    • suitable for map creation, length measurements, geometric calculations

    • possible problems with topology (gaps and overlaps)

    • basic vector data formats are Esri Shapefile, GeoJSON, GeoPackage or KML/GML

  • Raster data


    • represent real world elements in the form of a regular grid made up of pixels (from picture element)

    • the detail of the data is determined by the spatial resolution of the grid, i.e. the size of the pixel edge (in meters)

    • suitable for modeling and analysis of continuous phenomena (elevation, temperature, precipitation)

    • used for image data (e.g. satellite imagery)

    • raster datasets can become potentially very large

    • basic raster data formats are GeoTIFF, JPEG, PNG or GIF

Difference in graphical representation of vector and raster data

Difference in graphical representation of vector and raster data (Geletič et al. 2019)

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