2015 foss4g track: the spatial database - lessons from the enterprise and postgis by matthew baker
TRANSCRIPT
![Page 1: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/1.jpg)
Matthew BakerDenver Public Schools
The Spatial DatabaseLessons from the Enterprise...and PostGIS
![Page 2: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/2.jpg)
![Page 3: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/3.jpg)
![Page 4: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/4.jpg)
--View for "reverse" scatterplot--
create view Oct14ScatterES as (Select cast(row_number() over(order by O.ressch asc) as int) as OBJECTID,cast(O.ResSch as int) as ResSch,O.SchNum,O.Students,sch.ABBREVIATION,sch.shapefrom (select oct.RESSCH as ResSch,oct.schNum as SchNum,count(oct.STUDENTNUMBER) as Students FROM [dpsdata].[OctoberCount_Archive] as Oct where oct.RESSCH <> '0' and oct.adjGradeCrd in ('EC','00', '01', '02', '03', '04', '05') and oct.Year = '2014' group by ressch, schNum) as O join [dpsdata].[Schools_Current] as sch on sch.SCHNUM = O.SchNum)
![Page 5: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/5.jpg)
![Page 6: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/6.jpg)
SELECT fz.GEOID_BG , fz.SBRegion , count (case when oct.year = '2009' then 1 end) as [2009] , count (case when oct.Year = '2010' then 1 end) as [2010] , count (case when oct.Year = '2011' then 1 end) as [2011] , count (case when oct.Year = '2012' then 1 end) as [2012] , count (case when oct.Year = '2013' then 1 end) as [2013] , count (case when oct.Year = '2014' then 1 end) as [2014] FROM [dpsdata].[OctoberCount_Archive] as oct join dpsdata.ForecastZones as fz on oct.shape.STIntersects(fz.shape) = 1 where oct.Year >= '2009' and oct.langbkgrd in ('spa', '1380')
group by fz.GEOID_BG, fz.SBRegion
![Page 7: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/7.jpg)
Student Enterprise GIS
![Page 8: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/8.jpg)
![Page 9: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/9.jpg)
![Page 10: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/10.jpg)
![Page 11: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/11.jpg)
ArcSDE
42 Tables
![Page 12: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/12.jpg)
ArcSDE Back End (SQL Server) > 100 'SDE' Tables
Versioning
- adds 3 more tables per versioned feature class
![Page 13: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/13.jpg)
![Page 14: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/14.jpg)
![Page 15: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/15.jpg)
![Page 16: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/16.jpg)
![Page 17: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/17.jpg)
![Page 18: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/18.jpg)
![Page 19: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/19.jpg)
![Page 20: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/20.jpg)
![Page 21: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/21.jpg)
![Page 22: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/22.jpg)
![Page 23: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/23.jpg)
Spatial isn't special.*
![Page 25: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/25.jpg)
Matthew BakerDenver Public Schools
The Spatial DatabaseLessons from the Enterprise...and PostGIS
Matthew Baker is the SR. GIS Analyst at Denver Public Schools
![Page 26: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/26.jpg)
![Page 27: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/27.jpg)
![Page 28: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/28.jpg)
--View for "reverse" scatterplot--
create view Oct14ScatterES as (Select cast(row_number() over(order by O.ressch asc) as int) as OBJECTID,cast(O.ResSch as int) as ResSch,O.SchNum,O.Students,sch.ABBREVIATION,sch.shapefrom (select oct.RESSCH as ResSch,oct.schNum as SchNum,count(oct.STUDENTNUMBER) as Students FROM [dpsdata].[OctoberCount_Archive] as Oct where oct.RESSCH <> '0' and oct.adjGradeCrd in ('EC','00', '01', '02', '03', '04', '05') and oct.Year = '2014' group by ressch, schNum) as O join [dpsdata].[Schools_Current] as sch on sch.SCHNUM = O.SchNum)
![Page 29: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/29.jpg)
![Page 30: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/30.jpg)
SELECT fz.GEOID_BG , fz.SBRegion , count (case when oct.year = '2009' then 1 end) as [2009] , count (case when oct.Year = '2010' then 1 end) as [2010] , count (case when oct.Year = '2011' then 1 end) as [2011] , count (case when oct.Year = '2012' then 1 end) as [2012] , count (case when oct.Year = '2013' then 1 end) as [2013] , count (case when oct.Year = '2014' then 1 end) as [2014] FROM [dpsdata].[OctoberCount_Archive] as oct join dpsdata.ForecastZones as fz on oct.shape.STIntersects(fz.shape) = 1 where oct.Year >= '2009' and oct.langbkgrd in ('spa', '1380')
group by fz.GEOID_BG, fz.SBRegion
![Page 31: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/31.jpg)
Student Enterprise GIS
![Page 32: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/32.jpg)
![Page 33: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/33.jpg)
![Page 34: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/34.jpg)
More details regarding this report-The user can select a distance bandThe user also selects whether or not to include students with multiple address or- only show
students with multiple addressesThe screenshot below shows students with addresses in the 5.1-10 mile band AND their
secondary addresses in other bands. These are shown in yellow. The rest of the school population is in green.
What you don’t see- a grid of all the students fitting the conditions selected in the dropdown. The grid provides additional information such as address, attendance, exact distance. It could also include behavior, etc. That data is available on the map with a ‘hover’ so that you can use the mouse to ‘hover’ over a dot and get all the information about that student.
![Page 35: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/35.jpg)
ArcSDE
42 Tables
![Page 36: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/36.jpg)
ArcSDE Back End (SQL Server) > 100 'SDE' Tables
Versioning
- adds 3 more tables per versioned feature class
![Page 37: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/37.jpg)
![Page 38: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/38.jpg)
![Page 39: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/39.jpg)
![Page 40: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/40.jpg)
![Page 41: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/41.jpg)
![Page 42: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/42.jpg)
![Page 43: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/43.jpg)
![Page 44: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/44.jpg)
![Page 45: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/45.jpg)
![Page 46: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/46.jpg)
![Page 47: 2015 FOSS4G Track: The Spatial Database - Lessons from the Enterprise and PostGIS by Matthew Baker](https://reader033.vdocument.in/reader033/viewer/2022042722/589ed3d31a28ab39498b4599/html5/thumbnails/47.jpg)
Spatial isn't special.*