SlideShare a Scribd company logo
Census and Spatial Data in SQL Server 2008:
        Designing Tools for Hazard
          Mitigation and Analysis
          Scott Rae and David Raybuck
          North Central Texas Council of Governments
NCTCOG Region




                12,800 square miles
                16 counties
                225 cities
                134 school districts
                29 special districts
NCTCOG Emergency
          Management Roles
Functions
Mitigation
Response
Rapid Access to Data

Methods
 Reporting
 Mapping
 Real-Time Analysis
Data Issues

Quality
Reliability
Efficiency to Build New Data Sets
Efficiency to Maintain New Data Sets
Dynamic Interaction
Automation of Data Flow
Speed
Data Needs

Storm Events
Flood Plains
Earthquakes
Drought
Structure Values by Category
Live Radar Data
Live Storm Events
Census
Radius Summaries (emeritus)
Circa 2001-2010
Census Block Centroids
Census Block Centroids
Radius Summary Antiques

 GIS Recordset (Loop Sum)
 GIS Constructed Query (Loop Query Build)
 SQL Algebra
Selecting by Circle using TSQL




    power((power(( @ptdx - [xcoord]),2) +
    power((@ptdy -[ycoord]),2)),0.5) <
    @bufferstring
SQL 2008 Spatial




update test2008.dbo.TxGeo_Logrecno set geo9=
geography::STPointFromText('POINT(' +
STR(Longitude, 20, 16) + ' ' + STR(Latitude, 20, 16) + ')',
4326)
SQL 2008 Spatial
      Selecting by Polygon
set @g =
geography::STGeomFromText('POLYGON ((-
96 31.4,-97 32.1,-97.1 32.1,-97.5 31.7 ,-97.8
31.7, -96 31.4))', 4326);

SELECT * FROM dbo.txgeo_B
WHERE (@g.STIntersects(geog)) = 1
Census and spatial data in sql server 2008 designing tools for hazard mitigation and analysis
Rapid On-the-Fly Reporting
             Queries by Geometry
             Queries by Attribute

Web Users                           SQL Server




            SQL Reporting Services
Advantages

Speed
Indexing
Expand to Millions of Records
No Geodatabase or GIS Objects Overhead
TSQL
Spatial types on Spatial Types
Polygon Updating




                                                                                Housing Units in
 Updated     Area Impacted Storm Direction      Storm Speed   Persons in Path
                                                                                     Path

7:12:00 PM   855.36 sq miles   East-southeast     32 mph         36,468             13,346

7:22:00 PM   770.81 sq miles            East      25 mph          33,074            12,187

7:38:00 PM   644.52 sq miles            East      33 mph          12,001             4,544

7:50:00 PM    156 sq miles              East      21 mph           954                407
Managing Data Flows into SQL 2008
                   .NET/TSQL

                   XML/HTTP
 Partner Servers
                               SQL 2008
                   .NET/TSQL



 Programmers
                                          FME Workbench
                   .NET/TSQL



   Web Editors
Web Editing of Spatial Features
Census and spatial data in sql server 2008 designing tools for hazard mitigation and analysis
Census and spatial data in sql server 2008 designing tools for hazard mitigation and analysis
The Logic



Inferring numeric polygon values from
  another polygon layer
If I have population by Census block…
…what is the population of this triangle?
Census and spatial data in sql server 2008 designing tools for hazard mitigation and analysis
Census and spatial data in sql server 2008 designing tools for hazard mitigation and analysis
The ArcGIS Way

1. Calculate original area into source field
2. ArcToolbox Intersect source with target
3. Calculate new area into result field
4. Calculate overlap % (result area / original area)
5. Multiply this % by value(s) to infer
6. Summary Statistics     Sum (group by Unique ID
   of target)
The SQL Server 2008 Way
SELECT Target.UniqueID, SUM(PercentOfTarget
  * SourceValue) FROM
(
  SELECT Source.UniqueID, Target.UniqueID,
  Source.SourceValue,
  Source.geom.STIntersection(Target.geom).ST
  Area() / Target.geom.STArea() AS
  PercentOfTarget FROM Target INNER JOIN
  Source on
  Source.geom.STIntersects(Target.geom) = 1
)
GROUP BY Target.UniqueID
The Grid



Optimizing for the web
Bing Maps Tile Quadkeys




 Length of the key in digits indicates the level of detail (aka zoom level)
 Each quadkey starts with the quadkey of the parent grid (the next
 largest square containing it)
Census and spatial data in sql server 2008 designing tools for hazard mitigation and analysis

More Related Content

PPTX
CloudClustering: Toward an Iterative Data Processing Pattern on the Cloud
PDF
Feature Extraction Based Estimation of Rain Fall By Cross Correlating Cloud R...
PDF
Analyzing Larger RasterData in a Jupyter Notebook with GeoPySpark on AWS - FO...
PPTX
Deep Learning on Aerial Imagery: What does it look like on a map?
PPTX
2021 Dask Summit - Using STAC to catalog SpatioTemporal datasets
PDF
Making Elasticity Testing of Cloud-Based Systems Reproducible
PPTX
Find nuclei in images with U-net
PDF
GeoMesa LocationTech DC
CloudClustering: Toward an Iterative Data Processing Pattern on the Cloud
Feature Extraction Based Estimation of Rain Fall By Cross Correlating Cloud R...
Analyzing Larger RasterData in a Jupyter Notebook with GeoPySpark on AWS - FO...
Deep Learning on Aerial Imagery: What does it look like on a map?
2021 Dask Summit - Using STAC to catalog SpatioTemporal datasets
Making Elasticity Testing of Cloud-Based Systems Reproducible
Find nuclei in images with U-net
GeoMesa LocationTech DC

What's hot (20)

PPTX
Improving access to satellite imagery with Cloud computing
PPTX
Cell calculation
PDF
Elastic properties of bulk and low-dimensional materials using Van der Waals ...
PPTX
Ashfaq Munshi, ML7 Fellow, Pepperdata
PDF
Working with OpenStreetMap using Apache Spark and Geotrellis
PDF
Cluster formation over huge volatile robotic data
PPTX
Using Deep Learning to Derive 3D Cities from Satellite Imagery
PPTX
1Spatial Australia: Remote sensing data - instant home delivery
PDF
SWT Final Project Presentation
PPTX
Accelerated Logistic Regression on GPU(s)
PPTX
Vizualize 300 tb in less than 5_seconds
PPTX
Playing the Snake Game with Deep Reinforcement Learning (by Chuyang Liu)
PPTX
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
PDF
OpenWebGlobe - GeoSharing Bern
PDF
Tamara G. Kolda, Distinguished Member of Technical Staff, Sandia National Lab...
PDF
Betting the Company on a Graph Database - Aseem Kishore @ GraphConnect Boston...
PPTX
Blazor performance
PDF
01_NYC Elevator Project Summary
PDF
CVPR2014 reading "Reconstructing storyline graphs for image recommendation fr...
PDF
Data-intensive IceCube Cloud Burst
Improving access to satellite imagery with Cloud computing
Cell calculation
Elastic properties of bulk and low-dimensional materials using Van der Waals ...
Ashfaq Munshi, ML7 Fellow, Pepperdata
Working with OpenStreetMap using Apache Spark and Geotrellis
Cluster formation over huge volatile robotic data
Using Deep Learning to Derive 3D Cities from Satellite Imagery
1Spatial Australia: Remote sensing data - instant home delivery
SWT Final Project Presentation
Accelerated Logistic Regression on GPU(s)
Vizualize 300 tb in less than 5_seconds
Playing the Snake Game with Deep Reinforcement Learning (by Chuyang Liu)
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
OpenWebGlobe - GeoSharing Bern
Tamara G. Kolda, Distinguished Member of Technical Staff, Sandia National Lab...
Betting the Company on a Graph Database - Aseem Kishore @ GraphConnect Boston...
Blazor performance
01_NYC Elevator Project Summary
CVPR2014 reading "Reconstructing storyline graphs for image recommendation fr...
Data-intensive IceCube Cloud Burst
Ad

Viewers also liked (7)

PPTX
SQLBits X SQL Server 2012 Spatial
PDF
יוני ברק הכשרה ביטוח
PDF
Active active sql 2008 r2 cluster - Aviad Deri
PDF
Jnl books: patterns in space and time
PDF
SQL - מודל הנתונים
PPTX
Things you can find in the plan cache
PDF
Windows azure sql_database_security_isug012013
SQLBits X SQL Server 2012 Spatial
יוני ברק הכשרה ביטוח
Active active sql 2008 r2 cluster - Aviad Deri
Jnl books: patterns in space and time
SQL - מודל הנתונים
Things you can find in the plan cache
Windows azure sql_database_security_isug012013
Ad

Similar to Census and spatial data in sql server 2008 designing tools for hazard mitigation and analysis (20)

PDF
Spatial functions in MySQL 5.6, MariaDB 5.5, PostGIS 2.0 and others
PDF
Covering the earth and the cloud the next generation of spatial in sql server...
PDF
Representing and Querying Geospatial Information in the Semantic Web
PDF
High-Performance Analysis of Streaming Graphs
PDF
Geoint2017 training open interfaces - luis bermudez
ODP
WMS Performance Shootout 2011
PDF
Geographical Data Management for Web Applications
PDF
Scan Segmentation Approach to Magnify Detection Sensitivity for Tiny Hardware...
PDF
Feature Extraction Based Estimation of Rain Fall By Cross Correlating Cloud R...
PPTX
Magellan FOSS4G Talk, Boston 2017
PDF
NIST-JARVIS infrastructure for Improved Materials Design
PDF
Recent Progress in SCCS on GPU Simulation of Biomedical and Hydrodynamic Prob...
PDF
Big Linked Data Querying - ExtremeEarth Open Workshop
PDF
Challenge@RuleML2015 Modeling Object-Relational Geolocation Knowledge in PSOA...
PDF
Data profiling with Apache Calcite
PDF
Data profiling in Apache Calcite
PDF
Hybrid Predictive Modelling of Geometry with Limited Data in Cold Spray Addit...
PPT
Stockage, manipulation et analyse de données matricielles avec PostGIS Raster
PPSX
Sql Saturday Spatial Data Ss2008 Michael Stark Copy
PDF
Data Profiling in Apache Calcite
Spatial functions in MySQL 5.6, MariaDB 5.5, PostGIS 2.0 and others
Covering the earth and the cloud the next generation of spatial in sql server...
Representing and Querying Geospatial Information in the Semantic Web
High-Performance Analysis of Streaming Graphs
Geoint2017 training open interfaces - luis bermudez
WMS Performance Shootout 2011
Geographical Data Management for Web Applications
Scan Segmentation Approach to Magnify Detection Sensitivity for Tiny Hardware...
Feature Extraction Based Estimation of Rain Fall By Cross Correlating Cloud R...
Magellan FOSS4G Talk, Boston 2017
NIST-JARVIS infrastructure for Improved Materials Design
Recent Progress in SCCS on GPU Simulation of Biomedical and Hydrodynamic Prob...
Big Linked Data Querying - ExtremeEarth Open Workshop
Challenge@RuleML2015 Modeling Object-Relational Geolocation Knowledge in PSOA...
Data profiling with Apache Calcite
Data profiling in Apache Calcite
Hybrid Predictive Modelling of Geometry with Limited Data in Cold Spray Addit...
Stockage, manipulation et analyse de données matricielles avec PostGIS Raster
Sql Saturday Spatial Data Ss2008 Michael Stark Copy
Data Profiling in Apache Calcite

More from Texas Natural Resources Information System (20)

PDF
Txgio presentation rgsm_gps_pearson_062012
PPTX
Usslsc cgsic regional austin 061312
PPTX
Using gps technology at the texas general land
PPTX
Ussls austin civil utility - klein - 061312 - final
PPT
Tx dot gps applications fuegner
PPTX
PPT
Nationwide dgps (ndgps) lt mendoza
PPTX
PPTX
Connected vehicle highway network applications
PPTX
Cgsic presentation humphreys
PPT
Gnss international policy regional cgsic (austin - jun2012)
PDF
From creekology to rocket science the evolution of remote sensing gis in oilg...
PDF
Early warning forecast of an oil spill bp deepwater horizon in the gulf
PDF
We are the music makers and we are the dreamers of dreams
PDF
Volunteered geographic information (vgi) for the national map
PDF
Uav image recognition technology and applications
PDF
Texas high water marks crowd sourcing history, culture, and geography
Txgio presentation rgsm_gps_pearson_062012
Usslsc cgsic regional austin 061312
Using gps technology at the texas general land
Ussls austin civil utility - klein - 061312 - final
Tx dot gps applications fuegner
Nationwide dgps (ndgps) lt mendoza
Connected vehicle highway network applications
Cgsic presentation humphreys
Gnss international policy regional cgsic (austin - jun2012)
From creekology to rocket science the evolution of remote sensing gis in oilg...
Early warning forecast of an oil spill bp deepwater horizon in the gulf
We are the music makers and we are the dreamers of dreams
Volunteered geographic information (vgi) for the national map
Uav image recognition technology and applications
Texas high water marks crowd sourcing history, culture, and geography

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
cuic standard and advanced reporting.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPT
Teaching material agriculture food technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation theory and applications.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Machine learning based COVID-19 study performance prediction
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Assigned Numbers - 2025 - Bluetooth® Document
cuic standard and advanced reporting.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
“AI and Expert System Decision Support & Business Intelligence Systems”
Teaching material agriculture food technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
A Presentation on Artificial Intelligence
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation theory and applications.pdf
Network Security Unit 5.pdf for BCA BBA.
sap open course for s4hana steps from ECC to s4
Machine learning based COVID-19 study performance prediction
MYSQL Presentation for SQL database connectivity
Diabetes mellitus diagnosis method based random forest with bat algorithm
MIND Revenue Release Quarter 2 2025 Press Release
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Digital-Transformation-Roadmap-for-Companies.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx

Census and spatial data in sql server 2008 designing tools for hazard mitigation and analysis

  • 1. Census and Spatial Data in SQL Server 2008: Designing Tools for Hazard Mitigation and Analysis Scott Rae and David Raybuck North Central Texas Council of Governments
  • 2. NCTCOG Region 12,800 square miles 16 counties 225 cities 134 school districts 29 special districts
  • 3. NCTCOG Emergency Management Roles Functions Mitigation Response Rapid Access to Data Methods Reporting Mapping Real-Time Analysis
  • 4. Data Issues Quality Reliability Efficiency to Build New Data Sets Efficiency to Maintain New Data Sets Dynamic Interaction Automation of Data Flow Speed
  • 5. Data Needs Storm Events Flood Plains Earthquakes Drought Structure Values by Category Live Radar Data Live Storm Events Census
  • 9. Radius Summary Antiques GIS Recordset (Loop Sum) GIS Constructed Query (Loop Query Build) SQL Algebra
  • 10. Selecting by Circle using TSQL power((power(( @ptdx - [xcoord]),2) + power((@ptdy -[ycoord]),2)),0.5) < @bufferstring
  • 11. SQL 2008 Spatial update test2008.dbo.TxGeo_Logrecno set geo9= geography::STPointFromText('POINT(' + STR(Longitude, 20, 16) + ' ' + STR(Latitude, 20, 16) + ')', 4326)
  • 12. SQL 2008 Spatial Selecting by Polygon set @g = geography::STGeomFromText('POLYGON ((- 96 31.4,-97 32.1,-97.1 32.1,-97.5 31.7 ,-97.8 31.7, -96 31.4))', 4326); SELECT * FROM dbo.txgeo_B WHERE (@g.STIntersects(geog)) = 1
  • 14. Rapid On-the-Fly Reporting Queries by Geometry Queries by Attribute Web Users SQL Server SQL Reporting Services
  • 15. Advantages Speed Indexing Expand to Millions of Records No Geodatabase or GIS Objects Overhead TSQL Spatial types on Spatial Types
  • 16. Polygon Updating Housing Units in Updated Area Impacted Storm Direction Storm Speed Persons in Path Path 7:12:00 PM 855.36 sq miles East-southeast 32 mph 36,468 13,346 7:22:00 PM 770.81 sq miles East 25 mph 33,074 12,187 7:38:00 PM 644.52 sq miles East 33 mph 12,001 4,544 7:50:00 PM 156 sq miles East 21 mph 954 407
  • 17. Managing Data Flows into SQL 2008 .NET/TSQL XML/HTTP Partner Servers SQL 2008 .NET/TSQL Programmers FME Workbench .NET/TSQL Web Editors
  • 18. Web Editing of Spatial Features
  • 21. The Logic Inferring numeric polygon values from another polygon layer
  • 22. If I have population by Census block…
  • 23. …what is the population of this triangle?
  • 26. The ArcGIS Way 1. Calculate original area into source field 2. ArcToolbox Intersect source with target 3. Calculate new area into result field 4. Calculate overlap % (result area / original area) 5. Multiply this % by value(s) to infer 6. Summary Statistics Sum (group by Unique ID of target)
  • 27. The SQL Server 2008 Way SELECT Target.UniqueID, SUM(PercentOfTarget * SourceValue) FROM ( SELECT Source.UniqueID, Target.UniqueID, Source.SourceValue, Source.geom.STIntersection(Target.geom).ST Area() / Target.geom.STArea() AS PercentOfTarget FROM Target INNER JOIN Source on Source.geom.STIntersects(Target.geom) = 1 ) GROUP BY Target.UniqueID
  • 29. Bing Maps Tile Quadkeys Length of the key in digits indicates the level of detail (aka zoom level) Each quadkey starts with the quadkey of the parent grid (the next largest square containing it)