SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Making Use of
Query Layers & Spatial Views
Michael Olkin
Town of Amherst, MA
www.amherstma.gov/maps
Technical Talk in Lightning Format
Will this work?
Query Layers & Spatial Views
• Data is Direct from your Databases
• Data Represented via SQL
• Work with ArcGIS for Desktop & Server*
What Are They?
Query Layer
•SQL Query
in ArcGIS
Desktop
Spatial View
•SQL Query
in your
relational
database
What Do They Do?
Query Layer
•Spatial Data
from tabular
sources
•Supports
ST_Geometry
Spatial View
•A View within
a Geodatabase
•Represents
existing spatial
data
Query Layer Use Case
• Scenario
– MassGIS Parcel
Standard unique
centroid-based
“LOC_ID”
– When I split a parcel, I
want to know whether
I need to change the
LOC_ID of the original
parcel
Show the LOC_ID Points via ST_Geometry
SELECT MAP_PAR_ID, LOC_ID,
CAST('POINT (' + CAST(CAST(substring(LOC_ID,3,6) as int) AS varchar) + ' ' +
CAST(CAST(substring(LOC_ID,10,7) as int) AS varchar) + ')' AS geometry) AS SHAPE,
'POINT (' + CAST(CAST(substring(LOC_ID,3,6) as int) AS varchar) + ' ' +
CAST(CAST(substring(LOC_ID,10,7) as int) AS varchar) + ')' as [ReadTheGeometry],
FROM <MyParcelFeatureClass>
X Y
Show the LOC_ID Points via ST_Geometry
SELECT MAP_PAR_ID, LOC_ID,
CAST('POINT (' + CAST(CAST(substring(LOC_ID,3,6) as int) AS varchar) + ' ' +
CAST(CAST(substring(LOC_ID,10,7) as int) AS varchar) + ')' AS geometry) AS SHAPE,
'POINT (' + CAST(CAST(substring(LOC_ID,3,6) as int) AS varchar) + ' ' +
CAST(CAST(substring(LOC_ID,10,7) as int) AS varchar) + ')' as [ReadTheGeometry],
FROM <MyParcelFeatureClass>
X Y
Create a Query Layer in ArcMap
Make a Query Layer with ArcToolbox
Data Management Tools -> Layers & Query Views -> Make Query Layer
Resulting Query Layer
Query Layer in Action
• Amherst Work Orders ArcGIS Online Map
Work Order Software
geocodes & stores X/Y
coordinates in a table
Yay! Query Layer Goodness!
Because every presentation needs a smiling cat
Spatial Views
• Warning! Legacy Solution for GDBs stored in a
RDBMS (ie., ArcSDE)
• More robust than an ArcGIS Desktop Join
• Requires ArcSDE Command Line Tools
(to be installed on the client)
Setting Up a Spatial View
• Command Line (ugh…ok, not so bad)
• Keep it simple on the setup; edit later
• GDB table registry references source feature class
sdetable -o create_view
-T <NewViewName>
-t <TheSpatialTable>,<TheJoinedTable>
-c SHAPE,<TheJoinedTable>.<Field1>,TheSpatialTable.<Field1>
-w "<TheJoinedTable>.<Field1> = TheSpatialTable.<Field1>"
-i sde:sqlserver:<InstanceName>
-D <DatabaseName>
-u <AdminUserName> -p <AdminPassword>
Spatial View: a regular database view
• Edit it in your database, like any other view
SELECT P.SHAPE,
ROW_NUMBER() OVER(ORDER BY c.PID) as OBJECTID,
C.PID,
P.Map_Lot,
C.PIN as MapBlockLot,
C.Location,
C.Number_Char as AddressNum,
C.Street,
C.Owner_Name
FROM <TheSpatialTable> AS P
LEFT OUTER JOIN <TheJoinedTable> AS C
ON P.Map_Lot = C.Map_Lot
SQL Server tsql example: ROW_NUMBER is used here to create a unique OBJECTID
Spatial View: One to Many Join!
• “Fake Out” ArcGIS with a clever query
– ArcGIS draws stacked features for duplicates if each one
has a unique OBJECTID
SELECT P.SHAPE,
ROW_NUMBER() OVER(ORDER BY c.PID) as OBJECTID,
C.PID,
P.Map_Lot,
C.PIN as MapBlockLot,
C.Location,
C.Number_Char as AddressNum,
C.Street,
C.Owner_Name
FROM <TheSpatialTable> AS P
LEFT OUTER JOIN <TheJoinedTable> AS C
ON P.Map_Lot = C.Map_Lot
SQL Server tsql example: ROW_NUMBER is used here to create a unique OBJECTID
ROW_NUMBER() OVER(ORDER BY c.PID) as OBJECTID,
Stacked Parcels with a Spatial View
Yay! Spatial View Goodness!
Because every presentation needs a smiling cat
Making Use of
Query Layers & Spatial Views
Michael Olkin
Town of Amherst, MA
www.amherstma.gov/maps

Weitere ähnliche Inhalte

Was ist angesagt?

Rpp b.inggris smp vii sem 2 12. my idol
Rpp b.inggris smp vii sem 2   12. my idolRpp b.inggris smp vii sem 2   12. my idol
Rpp b.inggris smp vii sem 2 12. my idolRasyid Al-Ghazaly
 
kontrak belajar p5 gaya hidup berkelanjutan.pptx
kontrak belajar p5 gaya hidup berkelanjutan.pptxkontrak belajar p5 gaya hidup berkelanjutan.pptx
kontrak belajar p5 gaya hidup berkelanjutan.pptxAbahAde1
 
Perhitungan Alokasi Waktu
Perhitungan Alokasi Waktu Perhitungan Alokasi Waktu
Perhitungan Alokasi Waktu Kristalina Dewi
 
Personal letter kelas xi
Personal letter kelas xiPersonal letter kelas xi
Personal letter kelas xiyusyrtwo
 
4.4 model pembelajaran bahasa inggris berbasis projek baru
4.4 model pembelajaran bahasa inggris berbasis projek baru4.4 model pembelajaran bahasa inggris berbasis projek baru
4.4 model pembelajaran bahasa inggris berbasis projek baruErwin Abdillah
 
RPS EVALUASI PEMBELAJARAN DI SD MINA.docx
RPS EVALUASI PEMBELAJARAN DI SD MINA.docxRPS EVALUASI PEMBELAJARAN DI SD MINA.docx
RPS EVALUASI PEMBELAJARAN DI SD MINA.docxMINA117232
 
Application letter
Application letterApplication letter
Application letterYudhie Indra
 
REPORT TEXT for grade 11 High School
REPORT TEXT for grade 11 High SchoolREPORT TEXT for grade 11 High School
REPORT TEXT for grade 11 High SchoolSyarifaaahh
 
LK 3.1 Best Practices_Prio Dwisantosa.pdf
LK 3.1  Best Practices_Prio Dwisantosa.pdfLK 3.1  Best Practices_Prio Dwisantosa.pdf
LK 3.1 Best Practices_Prio Dwisantosa.pdfPrioDwisantosa2
 
Diktat fin al kls 8
Diktat fin al kls 8Diktat fin al kls 8
Diktat fin al kls 8totok aris
 
RPP cHAPTER 4 COME TO MY BIRTHDAY, PLEASE!
RPP cHAPTER 4 COME TO MY BIRTHDAY, PLEASE!RPP cHAPTER 4 COME TO MY BIRTHDAY, PLEASE!
RPP cHAPTER 4 COME TO MY BIRTHDAY, PLEASE!anisa lia
 
Soal ulangan harian kelas 11 (narrative)
Soal ulangan harian kelas 11 (narrative)Soal ulangan harian kelas 11 (narrative)
Soal ulangan harian kelas 11 (narrative)Evi ZorImah
 
YAMIN_LK. 2.2 Menentukan Solusi.pdf
YAMIN_LK. 2.2 Menentukan Solusi.pdfYAMIN_LK. 2.2 Menentukan Solusi.pdf
YAMIN_LK. 2.2 Menentukan Solusi.pdfYamin S. Pd
 
Program Tahunan Bhs Inggris Kls XII SMA
Program Tahunan Bhs Inggris Kls XII SMAProgram Tahunan Bhs Inggris Kls XII SMA
Program Tahunan Bhs Inggris Kls XII SMANila Suyanti
 
Analytical exposition text
Analytical exposition textAnalytical exposition text
Analytical exposition textNopi Tri Utami
 

Was ist angesagt? (20)

Rpp b.inggris smp vii sem 2 12. my idol
Rpp b.inggris smp vii sem 2   12. my idolRpp b.inggris smp vii sem 2   12. my idol
Rpp b.inggris smp vii sem 2 12. my idol
 
kontrak belajar p5 gaya hidup berkelanjutan.pptx
kontrak belajar p5 gaya hidup berkelanjutan.pptxkontrak belajar p5 gaya hidup berkelanjutan.pptx
kontrak belajar p5 gaya hidup berkelanjutan.pptx
 
Perhitungan Alokasi Waktu
Perhitungan Alokasi Waktu Perhitungan Alokasi Waktu
Perhitungan Alokasi Waktu
 
Personal letter kelas xi
Personal letter kelas xiPersonal letter kelas xi
Personal letter kelas xi
 
Report Text
Report TextReport Text
Report Text
 
4.4 model pembelajaran bahasa inggris berbasis projek baru
4.4 model pembelajaran bahasa inggris berbasis projek baru4.4 model pembelajaran bahasa inggris berbasis projek baru
4.4 model pembelajaran bahasa inggris berbasis projek baru
 
RPS EVALUASI PEMBELAJARAN DI SD MINA.docx
RPS EVALUASI PEMBELAJARAN DI SD MINA.docxRPS EVALUASI PEMBELAJARAN DI SD MINA.docx
RPS EVALUASI PEMBELAJARAN DI SD MINA.docx
 
Application letter
Application letterApplication letter
Application letter
 
REPORT TEXT for grade 11 High School
REPORT TEXT for grade 11 High SchoolREPORT TEXT for grade 11 High School
REPORT TEXT for grade 11 High School
 
T ugas tap (kasus)
T ugas tap (kasus)T ugas tap (kasus)
T ugas tap (kasus)
 
LK 3.1 Best Practices_Prio Dwisantosa.pdf
LK 3.1  Best Practices_Prio Dwisantosa.pdfLK 3.1  Best Practices_Prio Dwisantosa.pdf
LK 3.1 Best Practices_Prio Dwisantosa.pdf
 
Diktat fin al kls 8
Diktat fin al kls 8Diktat fin al kls 8
Diktat fin al kls 8
 
RPP cHAPTER 4 COME TO MY BIRTHDAY, PLEASE!
RPP cHAPTER 4 COME TO MY BIRTHDAY, PLEASE!RPP cHAPTER 4 COME TO MY BIRTHDAY, PLEASE!
RPP cHAPTER 4 COME TO MY BIRTHDAY, PLEASE!
 
Soal ulangan harian kelas 11 (narrative)
Soal ulangan harian kelas 11 (narrative)Soal ulangan harian kelas 11 (narrative)
Soal ulangan harian kelas 11 (narrative)
 
YAMIN_LK. 2.2 Menentukan Solusi.pdf
YAMIN_LK. 2.2 Menentukan Solusi.pdfYAMIN_LK. 2.2 Menentukan Solusi.pdf
YAMIN_LK. 2.2 Menentukan Solusi.pdf
 
Program Tahunan Bhs Inggris Kls XII SMA
Program Tahunan Bhs Inggris Kls XII SMAProgram Tahunan Bhs Inggris Kls XII SMA
Program Tahunan Bhs Inggris Kls XII SMA
 
refleksi diri.pdf
refleksi diri.pdfrefleksi diri.pdf
refleksi diri.pdf
 
PPT MODUL 2.pptx
PPT MODUL 2.pptxPPT MODUL 2.pptx
PPT MODUL 2.pptx
 
Report text
Report textReport text
Report text
 
Analytical exposition text
Analytical exposition textAnalytical exposition text
Analytical exposition text
 

Andere mochten auch

IPSE QA Freelancer Awards - We are the Makers
IPSE QA Freelancer Awards - We are the MakersIPSE QA Freelancer Awards - We are the Makers
IPSE QA Freelancer Awards - We are the MakersDavid Walker
 
Digibury - Lifelong Learning through the Idiom of Westeros
Digibury - Lifelong Learning through the Idiom of WesterosDigibury - Lifelong Learning through the Idiom of Westeros
Digibury - Lifelong Learning through the Idiom of WesterosDavid Walker
 
Making enterprise mobility a success.
Making enterprise mobility a success.Making enterprise mobility a success.
Making enterprise mobility a success.Olive Communications
 
Η εκπόνηση πολιτιστικού χάρτη της Αθήνας με αφορμή την επίσκεψη σχολείων της ...
Η εκπόνηση πολιτιστικού χάρτη της Αθήνας με αφορμή την επίσκεψη σχολείων της ...Η εκπόνηση πολιτιστικού χάρτη της Αθήνας με αφορμή την επίσκεψη σχολείων της ...
Η εκπόνηση πολιτιστικού χάρτη της Αθήνας με αφορμή την επίσκεψη σχολείων της ...1epal-ag-anarg
 
Digibury Weekender - lifelong learning through the idiom of Westeros
Digibury Weekender - lifelong learning through the idiom of WesterosDigibury Weekender - lifelong learning through the idiom of Westeros
Digibury Weekender - lifelong learning through the idiom of WesterosDavid Walker
 

Andere mochten auch (19)

IPSE QA Freelancer Awards - We are the Makers
IPSE QA Freelancer Awards - We are the MakersIPSE QA Freelancer Awards - We are the Makers
IPSE QA Freelancer Awards - We are the Makers
 
Chhaiya
ChhaiyaChhaiya
Chhaiya
 
Diwali sms
Diwali smsDiwali sms
Diwali sms
 
учебная
учебнаяучебная
учебная
 
To be or not to be...a certified GISP
To be or not to be...a certified GISPTo be or not to be...a certified GISP
To be or not to be...a certified GISP
 
Buying Planimetric Data with ITS53
Buying Planimetric Data with ITS53Buying Planimetric Data with ITS53
Buying Planimetric Data with ITS53
 
Drones in Academia - Challenges and Opportunities
Drones in Academia - Challenges and OpportunitiesDrones in Academia - Challenges and Opportunities
Drones in Academia - Challenges and Opportunities
 
Digibury - Lifelong Learning through the Idiom of Westeros
Digibury - Lifelong Learning through the Idiom of WesterosDigibury - Lifelong Learning through the Idiom of Westeros
Digibury - Lifelong Learning through the Idiom of Westeros
 
Advice sms
Advice smsAdvice sms
Advice sms
 
Cute sms
Cute smsCute sms
Cute sms
 
презентация
презентацияпрезентация
презентация
 
Forget sms
Forget smsForget sms
Forget sms
 
Making enterprise mobility a success.
Making enterprise mobility a success.Making enterprise mobility a success.
Making enterprise mobility a success.
 
Anniversary sms
Anniversary smsAnniversary sms
Anniversary sms
 
Data Management in Emergency Prevention and Response
Data Management in Emergency Prevention and ResponseData Management in Emergency Prevention and Response
Data Management in Emergency Prevention and Response
 
Public Safety Implications of Publishing Floorplans
Public Safety Implications of Publishing FloorplansPublic Safety Implications of Publishing Floorplans
Public Safety Implications of Publishing Floorplans
 
Η εκπόνηση πολιτιστικού χάρτη της Αθήνας με αφορμή την επίσκεψη σχολείων της ...
Η εκπόνηση πολιτιστικού χάρτη της Αθήνας με αφορμή την επίσκεψη σχολείων της ...Η εκπόνηση πολιτιστικού χάρτη της Αθήνας με αφορμή την επίσκεψη σχολείων της ...
Η εκπόνηση πολιτιστικού χάρτη της Αθήνας με αφορμή την επίσκεψη σχολείων της ...
 
Identifying Top Massachusetts Crash Corridors
Identifying Top Massachusetts Crash CorridorsIdentifying Top Massachusetts Crash Corridors
Identifying Top Massachusetts Crash Corridors
 
Digibury Weekender - lifelong learning through the idiom of Westeros
Digibury Weekender - lifelong learning through the idiom of WesterosDigibury Weekender - lifelong learning through the idiom of Westeros
Digibury Weekender - lifelong learning through the idiom of Westeros
 

Ähnlich wie Making Use of Query Layers & Spatial Views

Dive into spark2
Dive into spark2Dive into spark2
Dive into spark2Gal Marder
 
Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...
Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...
Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...Christian Tzolov
 
Converting a Rails application to Node.js
Converting a Rails application to Node.jsConverting a Rails application to Node.js
Converting a Rails application to Node.jsMatt Sergeant
 
Apache Drill talk ApacheCon 2018
Apache Drill talk ApacheCon 2018Apache Drill talk ApacheCon 2018
Apache Drill talk ApacheCon 2018Aman Sinha
 
Migrating on premises workload to azure sql database
Migrating on premises workload to azure sql databaseMigrating on premises workload to azure sql database
Migrating on premises workload to azure sql databasePARIKSHIT SAVJANI
 
What's New for Cartography in ArcGIS 10.2
What's New for Cartography in ArcGIS 10.2What's New for Cartography in ArcGIS 10.2
What's New for Cartography in ArcGIS 10.2Aileen Buckley
 
No sql solutions - 공개용
No sql solutions - 공개용No sql solutions - 공개용
No sql solutions - 공개용Byeongweon Moon
 
BDAS Shark study report 03 v1.1
BDAS Shark study report  03 v1.1BDAS Shark study report  03 v1.1
BDAS Shark study report 03 v1.1Stefanie Zhao
 
Structuring Spark: DataFrames, Datasets, and Streaming
Structuring Spark: DataFrames, Datasets, and StreamingStructuring Spark: DataFrames, Datasets, and Streaming
Structuring Spark: DataFrames, Datasets, and StreamingDatabricks
 
Structuring Spark: DataFrames, Datasets, and Streaming by Michael Armbrust
Structuring Spark: DataFrames, Datasets, and Streaming by Michael ArmbrustStructuring Spark: DataFrames, Datasets, and Streaming by Michael Armbrust
Structuring Spark: DataFrames, Datasets, and Streaming by Michael ArmbrustSpark Summit
 
3 Dundee-Spark Overview for C* developers
3 Dundee-Spark Overview for C* developers3 Dundee-Spark Overview for C* developers
3 Dundee-Spark Overview for C* developersChristopher Batey
 
SQL Pass Through and the ODBC Interface
SQL Pass Through and the ODBC InterfaceSQL Pass Through and the ODBC Interface
SQL Pass Through and the ODBC Interfacejrhampt
 
Intro to Spark
Intro to SparkIntro to Spark
Intro to SparkKyle Burke
 
Postgres vs Mongo / Олег Бартунов (Postgres Professional)
Postgres vs Mongo / Олег Бартунов (Postgres Professional)Postgres vs Mongo / Олег Бартунов (Postgres Professional)
Postgres vs Mongo / Олег Бартунов (Postgres Professional)Ontico
 
Building highly scalable data pipelines with Apache Spark
Building highly scalable data pipelines with Apache SparkBuilding highly scalable data pipelines with Apache Spark
Building highly scalable data pipelines with Apache SparkMartin Toshev
 
Sqlite
SqliteSqlite
SqliteKumar
 
Sql Pass Through
Sql Pass ThroughSql Pass Through
Sql Pass Throughjrhampt
 
Structuring Apache Spark 2.0: SQL, DataFrames, Datasets And Streaming - by Mi...
Structuring Apache Spark 2.0: SQL, DataFrames, Datasets And Streaming - by Mi...Structuring Apache Spark 2.0: SQL, DataFrames, Datasets And Streaming - by Mi...
Structuring Apache Spark 2.0: SQL, DataFrames, Datasets And Streaming - by Mi...Databricks
 

Ähnlich wie Making Use of Query Layers & Spatial Views (20)

Couchbas for dummies
Couchbas for dummiesCouchbas for dummies
Couchbas for dummies
 
tw_242.ppt
tw_242.ppttw_242.ppt
tw_242.ppt
 
Dive into spark2
Dive into spark2Dive into spark2
Dive into spark2
 
Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...
Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...
Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...
 
Converting a Rails application to Node.js
Converting a Rails application to Node.jsConverting a Rails application to Node.js
Converting a Rails application to Node.js
 
Apache Drill talk ApacheCon 2018
Apache Drill talk ApacheCon 2018Apache Drill talk ApacheCon 2018
Apache Drill talk ApacheCon 2018
 
Migrating on premises workload to azure sql database
Migrating on premises workload to azure sql databaseMigrating on premises workload to azure sql database
Migrating on premises workload to azure sql database
 
What's New for Cartography in ArcGIS 10.2
What's New for Cartography in ArcGIS 10.2What's New for Cartography in ArcGIS 10.2
What's New for Cartography in ArcGIS 10.2
 
No sql solutions - 공개용
No sql solutions - 공개용No sql solutions - 공개용
No sql solutions - 공개용
 
BDAS Shark study report 03 v1.1
BDAS Shark study report  03 v1.1BDAS Shark study report  03 v1.1
BDAS Shark study report 03 v1.1
 
Structuring Spark: DataFrames, Datasets, and Streaming
Structuring Spark: DataFrames, Datasets, and StreamingStructuring Spark: DataFrames, Datasets, and Streaming
Structuring Spark: DataFrames, Datasets, and Streaming
 
Structuring Spark: DataFrames, Datasets, and Streaming by Michael Armbrust
Structuring Spark: DataFrames, Datasets, and Streaming by Michael ArmbrustStructuring Spark: DataFrames, Datasets, and Streaming by Michael Armbrust
Structuring Spark: DataFrames, Datasets, and Streaming by Michael Armbrust
 
3 Dundee-Spark Overview for C* developers
3 Dundee-Spark Overview for C* developers3 Dundee-Spark Overview for C* developers
3 Dundee-Spark Overview for C* developers
 
SQL Pass Through and the ODBC Interface
SQL Pass Through and the ODBC InterfaceSQL Pass Through and the ODBC Interface
SQL Pass Through and the ODBC Interface
 
Intro to Spark
Intro to SparkIntro to Spark
Intro to Spark
 
Postgres vs Mongo / Олег Бартунов (Postgres Professional)
Postgres vs Mongo / Олег Бартунов (Postgres Professional)Postgres vs Mongo / Олег Бартунов (Postgres Professional)
Postgres vs Mongo / Олег Бартунов (Postgres Professional)
 
Building highly scalable data pipelines with Apache Spark
Building highly scalable data pipelines with Apache SparkBuilding highly scalable data pipelines with Apache Spark
Building highly scalable data pipelines with Apache Spark
 
Sqlite
SqliteSqlite
Sqlite
 
Sql Pass Through
Sql Pass ThroughSql Pass Through
Sql Pass Through
 
Structuring Apache Spark 2.0: SQL, DataFrames, Datasets And Streaming - by Mi...
Structuring Apache Spark 2.0: SQL, DataFrames, Datasets And Streaming - by Mi...Structuring Apache Spark 2.0: SQL, DataFrames, Datasets And Streaming - by Mi...
Structuring Apache Spark 2.0: SQL, DataFrames, Datasets And Streaming - by Mi...
 

Mehr von Northeast Arc Users Group Presentations

Mehr von Northeast Arc Users Group Presentations (6)

8 critical skills you need to be a successful gis professional
8 critical skills you need to be a successful gis professional8 critical skills you need to be a successful gis professional
8 critical skills you need to be a successful gis professional
 
GIS in Higher Education: Realities and Opportunities
GIS in Higher Education: Realities and OpportunitiesGIS in Higher Education: Realities and Opportunities
GIS in Higher Education: Realities and Opportunities
 
Photogrammetry 101
Photogrammetry 101Photogrammetry 101
Photogrammetry 101
 
The Incredible Potential of Unmanned Aerial Systems Technology...and Why You ...
The Incredible Potential of Unmanned Aerial Systems Technology...and Why You ...The Incredible Potential of Unmanned Aerial Systems Technology...and Why You ...
The Incredible Potential of Unmanned Aerial Systems Technology...and Why You ...
 
Geospatial Condition Analysis
Geospatial Condition AnalysisGeospatial Condition Analysis
Geospatial Condition Analysis
 
MAGIC’s Connecticut Digital Air Photography Collection
MAGIC’s Connecticut Digital Air Photography CollectionMAGIC’s Connecticut Digital Air Photography Collection
MAGIC’s Connecticut Digital Air Photography Collection
 

Kürzlich hochgeladen

Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 

Kürzlich hochgeladen (20)

Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 

Making Use of Query Layers & Spatial Views

  • 1. Making Use of Query Layers & Spatial Views Michael Olkin Town of Amherst, MA www.amherstma.gov/maps
  • 2. Technical Talk in Lightning Format Will this work?
  • 3. Query Layers & Spatial Views • Data is Direct from your Databases • Data Represented via SQL • Work with ArcGIS for Desktop & Server*
  • 4. What Are They? Query Layer •SQL Query in ArcGIS Desktop Spatial View •SQL Query in your relational database
  • 5. What Do They Do? Query Layer •Spatial Data from tabular sources •Supports ST_Geometry Spatial View •A View within a Geodatabase •Represents existing spatial data
  • 6. Query Layer Use Case • Scenario – MassGIS Parcel Standard unique centroid-based “LOC_ID” – When I split a parcel, I want to know whether I need to change the LOC_ID of the original parcel
  • 7. Show the LOC_ID Points via ST_Geometry SELECT MAP_PAR_ID, LOC_ID, CAST('POINT (' + CAST(CAST(substring(LOC_ID,3,6) as int) AS varchar) + ' ' + CAST(CAST(substring(LOC_ID,10,7) as int) AS varchar) + ')' AS geometry) AS SHAPE, 'POINT (' + CAST(CAST(substring(LOC_ID,3,6) as int) AS varchar) + ' ' + CAST(CAST(substring(LOC_ID,10,7) as int) AS varchar) + ')' as [ReadTheGeometry], FROM <MyParcelFeatureClass> X Y
  • 8. Show the LOC_ID Points via ST_Geometry SELECT MAP_PAR_ID, LOC_ID, CAST('POINT (' + CAST(CAST(substring(LOC_ID,3,6) as int) AS varchar) + ' ' + CAST(CAST(substring(LOC_ID,10,7) as int) AS varchar) + ')' AS geometry) AS SHAPE, 'POINT (' + CAST(CAST(substring(LOC_ID,3,6) as int) AS varchar) + ' ' + CAST(CAST(substring(LOC_ID,10,7) as int) AS varchar) + ')' as [ReadTheGeometry], FROM <MyParcelFeatureClass> X Y
  • 9. Create a Query Layer in ArcMap
  • 10. Make a Query Layer with ArcToolbox Data Management Tools -> Layers & Query Views -> Make Query Layer
  • 12. Query Layer in Action • Amherst Work Orders ArcGIS Online Map Work Order Software geocodes & stores X/Y coordinates in a table
  • 13. Yay! Query Layer Goodness! Because every presentation needs a smiling cat
  • 14. Spatial Views • Warning! Legacy Solution for GDBs stored in a RDBMS (ie., ArcSDE) • More robust than an ArcGIS Desktop Join • Requires ArcSDE Command Line Tools (to be installed on the client)
  • 15. Setting Up a Spatial View • Command Line (ugh…ok, not so bad) • Keep it simple on the setup; edit later • GDB table registry references source feature class sdetable -o create_view -T <NewViewName> -t <TheSpatialTable>,<TheJoinedTable> -c SHAPE,<TheJoinedTable>.<Field1>,TheSpatialTable.<Field1> -w "<TheJoinedTable>.<Field1> = TheSpatialTable.<Field1>" -i sde:sqlserver:<InstanceName> -D <DatabaseName> -u <AdminUserName> -p <AdminPassword>
  • 16. Spatial View: a regular database view • Edit it in your database, like any other view SELECT P.SHAPE, ROW_NUMBER() OVER(ORDER BY c.PID) as OBJECTID, C.PID, P.Map_Lot, C.PIN as MapBlockLot, C.Location, C.Number_Char as AddressNum, C.Street, C.Owner_Name FROM <TheSpatialTable> AS P LEFT OUTER JOIN <TheJoinedTable> AS C ON P.Map_Lot = C.Map_Lot SQL Server tsql example: ROW_NUMBER is used here to create a unique OBJECTID
  • 17. Spatial View: One to Many Join! • “Fake Out” ArcGIS with a clever query – ArcGIS draws stacked features for duplicates if each one has a unique OBJECTID SELECT P.SHAPE, ROW_NUMBER() OVER(ORDER BY c.PID) as OBJECTID, C.PID, P.Map_Lot, C.PIN as MapBlockLot, C.Location, C.Number_Char as AddressNum, C.Street, C.Owner_Name FROM <TheSpatialTable> AS P LEFT OUTER JOIN <TheJoinedTable> AS C ON P.Map_Lot = C.Map_Lot SQL Server tsql example: ROW_NUMBER is used here to create a unique OBJECTID ROW_NUMBER() OVER(ORDER BY c.PID) as OBJECTID,
  • 18. Stacked Parcels with a Spatial View
  • 19. Yay! Spatial View Goodness! Because every presentation needs a smiling cat
  • 20. Making Use of Query Layers & Spatial Views Michael Olkin Town of Amherst, MA www.amherstma.gov/maps

Hinweis der Redaktion

  1. This will work with the MassGIS Parcel Standard:SELECTMAP_PAR_ID,LOC_ID,CAST(&apos;POINT (&apos;+CAST(CAST(substring(LOC_ID,3,6)asint)ASvarchar)+&apos; &apos;+CAST(CAST(substring(LOC_ID,10,7)asint)ASvarchar)+&apos;)&apos;ASgeometry)ASSHAPE,&apos;POINT (&apos;+CAST(CAST(substring(LOC_ID,3,6)asint)ASvarchar)+&apos; &apos;+CAST(CAST(substring(LOC_ID,10,7)asint)ASvarchar)+&apos;)&apos;as[ReadTheGeometry],FROM&lt;MyParcelFeatureClass&gt;The “ReadTheGeometry” field is just there in order to illustrate the ST_Geometry syntax for points.
  2. Make sure that you check the “Show advanced options” box &amp; set the proper coordinate system &amp; transformation. The transformation does matter: http://gisobsessed.blogspot.com/2014/04/be-transformative.html
  3. Geometry comes from only one table; cannot create a view that combines multiple geometry sources