Enhancing Spatial Data Analysis in QGIS

 
A QGIS attribute table plugin
to describe shapes
 
By Philip Whitten
Supervisor James O’Brien
 
Data
Data
Warehouse
Warehouse
 
A
 
l
a
r
g
e
 
s
t
o
r
e
 
o
f
 
d
a
t
a
 
a
c
c
u
m
u
l
a
t
e
d
 
f
r
o
m
 
a
w
i
d
e
 
r
a
n
g
e
 
o
f
 
s
o
u
r
c
e
s
 
w
i
t
h
i
n
 
a
 
c
o
m
p
a
n
y
 
a
n
d
u
s
e
d
 
t
o
 
g
u
i
d
e
 
m
a
n
a
g
e
m
e
n
t
 
d
e
c
i
s
i
o
n
s
*
 
Relational
Relational
database
database
 
A
 
d
a
t
a
b
a
s
e
 
s
t
r
u
c
t
u
r
e
d
 
t
o
 
r
e
c
o
g
n
i
z
e
 
r
e
l
a
t
i
o
n
s
b
e
t
w
e
e
n
 
s
t
o
r
e
d
 
i
t
e
m
s
 
o
f
 
i
n
f
o
r
m
a
t
i
o
n
*
 
S
p
e
c
i
f
i
e
s
 
h
o
w
 
s
o
m
e
 
o
b
j
e
c
t
 
i
s
 
l
o
c
a
t
e
d
 
i
n
s
p
a
c
e
 
i
n
 
r
e
l
a
t
i
o
n
 
t
o
 
s
o
m
e
 
r
e
f
e
r
e
n
c
e
 
o
b
j
e
c
t
+
 
Spatial
Spatial
Relation
Relation
 
*Oxford Living Dictionaries, Oxford University Press    
+
Wikipedia
 
Problem
 
 I get a lot of spatial data sets from a lot of
sources that I store in relational databases.
 
I spend a lot of time looking for spatial relations
with relational databases, and, I have found that
graphical user interfaces like QGIS or ArcMap
occasionally inhibit the study of spatial
relationships.
 
Solution
 
 Make QGIS more receptive to relational databases
Spatial Datasets - Sets
Spatial Datasets - Relationships
Sets
 
Set Intersection
 
 
 
Empty shapes occur whenever the set operation or topology
means that no geometry exists
 
Many GIS datasets are constrained to a single
shape column
 
You can’t show a spatial relationship in a single dataset without
multiple shape columns!
Empty shapes enable spatial relationships in a single dataset
Set variables
A
null’s in datasets = unknown
 
null’s are always about
 
 
Database hold multiple datasets and can have
multiple users
 
 
Image downloaded on July 20 2018 from: https://www.kbmanage.com/concept/information-database-idb
 
QGIS: a user interface for spatial datasets
 
 
 
 
 
 
W
I
T
H
O
U
T
 
C
O
N
F
I
G
U
R
A
T
I
O
N
 
P
A
R
A
M
E
T
E
R
S
,
I
N
D
E
X
E
S
 
O
R
 
C
O
N
S
T
R
A
I
N
T
S
!
!
!
!
 
 
 
The attribute table in QGIS hides the
Shape attribute!
 
?
 
The Attribute Table Shows Records That Don’t
Have a Shape!!
 
Identified Problems
 
1.
Null
 and empty shapes are passed differently by different QGIS data
providers
2.
There isn’t a published QGIS plugin that highlights those records
that have 
null
 or empty shapes
3.
Many GIS professionals don’t anticipate or check for 
null 
or empty
shapes
4.
Empty shapes were excluded from the original QGIS and GDAL
specifications
5.
The QGIS attribute table hides the shape column/s.
 
Why would a GIS dataset contain null or
empty shapes?
 
Proposed Attribute Table
 
Contains regular attributes
Uses icons to represent number
of features for multipart features.
Identifies Empty and null
features
Performs rudimentary validation
checks
Attributes depend on shape type
(e.g. LineString, CircularString)
Includes summary table
 
Professional Awareness
 
Null and empty shapes are treated as invalid by ESRI software
Many GIS users work in a constrained environment where null and
empty values are prohibited
 
Progress
 
 Create model line datasets in QGIS, Microsoft SQL Server and PostGIS
 Inspect model datasets using script in the QGIS Python Console.
 Learn how to make a QGIS plugin (Python v3.x)
 Learn how to make tables and windows with PyQT5
 Create and populate attribute table via plugin and PyQT5
 Present at conference
 Submit final report
 
 
 
Passing of empty and null well known text
shapes to QGIS
 
QGIS is unable to
instantiate empty Point
shapes
 
F
r
e
e
 
a
n
d
 
O
p
e
n
 
S
o
u
r
c
e
S
o
f
t
w
a
r
e
 
f
o
r
 
G
e
o
s
p
a
t
i
a
l
(
F
O
S
S
4
G
)
"
O
p
e
n
 
S
o
u
r
c
e
 
f
o
r
 
S
u
s
t
a
i
n
a
b
l
e
D
e
v
e
l
o
p
m
e
n
t
D
e
c
e
m
b
e
r
 
2
-
5
,
 
2
0
1
8
Slide Note
Embed
Share

Explore the integration of relational databases with QGIS to facilitate efficient spatial data analysis. Discover the importance of recognizing spatial relationships within data sets and the solutions to enhance QGIS for relational datasets. Overcome challenges and delve into the intersection and subsets of relational datasets for effective decision-making and management. Embrace a comprehensive approach to handling spatial data efficiently.

  • Spatial Data
  • QGIS
  • Relational Databases
  • Data Analysis
  • Spatial Relationships

Uploaded on Sep 19, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. A QGIS attribute table plugin to describe shapes By Philip Whitten Supervisor James O Brien

  2. A large store of data accumulated from a wide range of sources wide range of sources within a company and used to guide management decisions* Data Warehouse A database structured to recognize relations between stored items of information* relations Relational database Specifies how some object is located in space in relation relation to some reference object+ Spatial Relation *Oxford Living Dictionaries, Oxford University Press +Wikipedia

  3. Problem I get a lot of spatial data sets from a lot of sources that I store in relational databases. I spend a lot of time looking for spatial relations with relational databases, and, I have found that graphical user interfaces like QGIS or ArcMap occasionally inhibit the study of spatial relationships.

  4. Solution Make QGIS more receptive to relational databases Relational Datasets QGIS Problems Progress Conference

  5. Relational Datasets Spatial Datasets - Sets

  6. Relational Datasets Spatial Datasets - Relationships

  7. Relational Datasets Sets The subset ? = ?,? of the universal set ? = ?,?,?,?,? A B a i o u e ??????? = ??????,??????,?????? ?????? ?? ??????? ??? = 1,2,3

  8. Relational Datasets Set Intersection h ?,?,?,?,? ,?,?,?,?,?,? = ?,? a l e o u i g p ?,?,?,?,? ?,?,? = a l e o f u i y = empty set

  9. ???? ? ???? ? = ? ????????????? ????? (2,1) ???? ? ???? ? = ? ????????????? ???? ? ???? ? = ? ????????????? ????? 1,1 ,(3,1) Empty shapes occur whenever the set operation or topology means that no geometry exists Relational Datasets

  10. Many GIS datasets are constrained to a single shape column You can t show a spatial relationship in a single dataset without multiple shape columns! Relational Datasets

  11. Empty shapes enable spatial relationships in a single dataset Square Squares (shape) ?????? ???? ?????? ??? ? Left square Right square Point Type Points (shape) ?????????? ?1,?2,?4 ?????????? ?3 Blue crosses Red circles ?????? ??????? Point Type Blue crosses Red circles Blue crosses Square Left square Left square Right square Shape Multi????? ?1,?2 ?????????? ?3 ?????????? ?4 Point Type Left square (shape) Multi????? ?1,?2 ?????????? ?3 Right square (shape) ?????????? ?4 ?????????? Relational Datasets Blue crosses Red circles

  12. Relational Datasets Set variables Let x be an element of ? = ?,?,?,?,? A a i o Hence, x = ? , x = ? , x = ? , x = ? , or, x = ? Unknown elements of a set can t be shown on a Venn diagram Unknown elements of a set are denoted as null in most databases. u e

  13. Relational Datasets null s in datasets = unknown Road Id Rd1 Rd2 Rd3 Rd4 Road Name Picton null Appin Road Type Road Lane Lane null Road Id Rd1 Rd2 Rd3 Rd4 Road Id Rd1 Rd2 Rd4 Road Name Picton Appin Road Id Rd1 Rd2 Rd3 Road Type Road Lane Lane

  14. nulls are always about Road Id Rd1 Rd2 Rd3 Rd4 Road Name Picton null Appin Road Type Road Lane Lane null Line null ???? ((2,0),(2,2)) ???? ((1,1),(1,3)) ???? ((0,2),(3,2)) Road Id Rd1 Rd2 Rd3 Rd4 Road Name Picton null Appin Road Type Road Lane Lane null Road Id Rd2 Rd3 Rd4 Line ???? ((2,0),(2,2)) ???? ((1,1),(1,3)) ???? ((0,2),(3,2))

  15. QGIS QGIS: a user interface for spatial datasets

  16. WITHOUT CONFIGURATION PARAMETERS, INDEXES OR CONSTRAINTS!!!! QGIS

  17. QGIS

  18. QGIS The attribute table in QGIS hides the Shape attribute! ?

  19. The Attribute Table Shows Records That Dont Have a Shape!! QGIS

  20. Problems Identified Problems 1. Null and empty shapes are passed differently by different QGIS data providers 2. There isn t a published QGIS plugin that highlights those records that have null or empty shapes 3. Many GIS professionals don t anticipate or check for null or empty shapes 4. Empty shapes were excluded from the original QGIS and GDAL specifications 5. The QGIS attribute table hides the shape column/s.

  21. Proposed Attribute Table Contains regular attributes Uses icons to represent number of features for multipart features. Identifies Empty and null features Performs rudimentary validation checks Attributes depend on shape type (e.g. LineString, CircularString) Includes summary table Key Name Shape Number of Points Valid 1 Blue Crosses 3 2 Red Circles 1 3 Green Stars Empty 0 4 Yellow Triangles null null Type Empty or null All Valid Number of records Number of parts Dataprovider MultiPoint Yes Yes 4 4 mssql Progress

  22. Progress Progress Create model line datasets in QGIS, Microsoft SQL Server and PostGIS Inspect model datasets using script in the QGIS Python Console. Learn how to make a QGIS plugin (Python v3.x) Learn how to make tables and windows with PyQT5 Create and populate attribute table via plugin and PyQT5 Present at conference Submit final report

  23. Passing of empty and null well known text shapes to QGIS Geometry Postgis Sql Server QGIS is unable to instantiate empty Point shapes Empty null Empty null Point Invalid null Invalid null Line Empty null null null Polygon Empty null null null CurvePolygon ? ? No No Progress

  24. Conference Free and Open Source Free and Open Source Software for Geospatial Software for Geospatial (FOSS4G) (FOSS4G) "Open Source for Sustainable Development December 2-5, 2018

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#