The Design and Implementation of a Web-Based GIS for Political Redistricting Using Open Source Geospatial Foundation (OSGEO) Technologies
Total Page:16
File Type:pdf, Size:1020Kb
The Design and Implementation of a Web-based GIS for Political Redistricting Thesis Presented in Partial Fulfillment of the Requirements for the Degree Master of Arts in the Graduate School of The Ohio State University By Wei Chen Graduate Program in Geography The Ohio State University 2009 Thesis Committee: Prof. Ningchuan Xiao, Co-Advisor Prof. Mei-Po Kwan, Co-Advisor Prof. Daniel Sui Copyright by Wei Chen 2009 Abstract The World Wide Web (www) has dramatically changed our way of producing, utilizing and consuming information, especially geospatial information in recent years. Web-based GIS (Geographic Information Systems) are designed to provide Web users analytical tools to assist their spatial decisions making process. With the advantages such as platform independence, customizability and cost effectiveness, Open Source Geospatial (OSGEO) software has been more adopted to develop Web-based GIS applications. Also, the increased availability of spatial functionalities in OSGEO software has opened many possibilities towards the implementation of a more powerful, interactive and collaborative Web-based GIS platform which is favorably referred to as the GeoWeb. However, compared with proprietary systems current open source based online GIS systems have several limitations. For example, most of them do not provide customizable web mapping service and spatial data processing service. However, these two types of services are essential to effectively filter spatial information and explore area of interest. This research introduces a framework of implementing a Web-based GIS using Open Source Software, including Postgresql/PostGIS, MapServer, and OpenLayers. On the server side, Postgresql/PostGIS is used to store and process spatial data. MapServer is adopted to provide Web Mapping Service (WMS). Server side scripting language PHP is ii employed to dynamically generate map file from PostGIS for MapServer to render. On the client side, OpenLayers provides the programming interface to incorporate layers from different data sources into a same DOM container. Web-based GIS for political redistricting, as an example, has been developed to demonstrate both merits and demerits of adopting this framework. Initial results of the demonstration show that the integration of PostGIS, MapServer and PHP could facilitate query based map generation and make mapping of massive spatial data efficient. Query based Web Mapping Service is capable to dynamically generate map and legend images. Spatial data handling functions in PostGIS are suitable for developing user interactive functions for querying, measuring and processing spatial data. Users could use the implemented Web-based political redistricting GIS to explore census, devise and evaluate new plan, and compare different plans. This framework based on open environment can be adapted to applications with similar requirements. The application implemented in this research can be access through gis.osu.edu/redistricting. Key Words: Web-based GIS, Political Redistricting, Open Source Geospatial (OSGEO), Public Participation iii Dedication I dedicate this thesis to my parents. Without their unconditional love and consistent support, the completion of this thesis would not be possible. iv Acknowledgments I would like to acknowledge and express my sincerest gratitude to the following persons who have given me help during the completion of this Master’s thesis: Dr. Mei-Po Kwan, my co-advisor, for her many cares on my living and professional planning at the beginning of my study, her mentor in my professional development, her gratuitous help in revising a competition paper and the previous version of the thesis, and her sincere suggestions on developing research questions and the final version of the thesis. Dr. Ningchuan Xiao, my co-advisor, for his help in shaping the thesis topic and the structure of the writing, his constructive suggestions and guide on the design and implementation of the system, his gratuitous help on the revision and formatting of the document, and his kindness for reminding me of graduation issues. Mr. Louis So, my supervisor at Asset Strategies Group, for his guide of doing user need analysis and suggestions about how to make technology useful to the industry. v My friends, Quji Ma, Yuan Gao and Dingmou Li, for their suggestions in many technical issues. My American friend Dennis Shimer and department colleagues Shanshan Cai, Shiguo Jiang, Lili Wang, for their support and wishes. All other Department of Geography faculty members, especially Daniel Sui, for their comments and suggestions. Department of Geography staffs, especially Diane, Stephanie and Maggie, for their help in setting up the dependence room. Most especially to my Mom, Dad and my wife, for their forever support and encouragement to me. vi Vita Jul. 2007.................................................. B.S. Geography, Nanjing Normal University Sept. 2007 to Dec. 2008.......................... Graduate Teaching Associate, Department of Geography, The Ohio State University Mar. 2009 to Aug. 2009........................... Graduate Research Associate, Department of Geography, The Ohio State University Fields of Study Major Field: Geography vii Table of Contents Abstract ........................................................................................................................... ii Dedication ...................................................................................................................... iv Acknowledgments........................................................................................................... v Vita ................................................................................................................................ vii Table of Contents ......................................................................................................... viii List of Tables .................................................................................................................. x List of Figures ................................................................................................................ xi CHAPTER 1: Introduction ............................................................................................. 1 CHAPTER 2: Literature Review of Web-based GIS ..................................................... 6 CHAPTER 3: The Framework of Implementing Web-based GIS for Political Redistricting .................................................................................................................. 15 CHAPTER 4: Database Design .................................................................................... 25 CHAPTER 5: User Interface ........................................................................................ 42 CHAPTER 6: Implementation ...................................................................................... 47 CHAPTER 7: Results ................................................................................................... 66 CHAPTER 8: Conclusions ........................................................................................... 76 REFERENCE ................................................................................................................ 81 Appendix A: SQL Scripts for Creating Postgresql Database Tables ............................ 87 viii Appendix B: SQL Scripts for Creating Database Views .............................................. 96 Appendix C: Sample Map File ..................................................................................... 98 Appendix D: User’s Manual ....................................................................................... 101 Appendix E: 1990s Districting Principles Used by Each State .................................. 103 ix List of Tables Table 1. TIGER/Line®Shapefiles attribute table structure ............................................... 26 Table 2. Number of vertex of different levels of census geography objects .................... 33 Table 3. Summary level and part flag for census units ..................................................... 37 Table 4. Traditional districting principles ......................................................................... 62 Table 5. Redistricting Principles by States ..................................................................... 103 x List of Figures Figure 1. Comparison between classic web application model and Ajax based application model................................................................................................................................. 21 Figure 2. Framework of implementing Web-based GIS using OSGEO software ............ 24 Figure 3. Referential relationships diagram between database tables .............................. 39 Figure 4. Main interface of Web-based redistricting GIS ................................................. 42 Figure 5. Exploring census interface ................................................................................ 44 Figure 6. Redistricting interface ....................................................................................... 45 Figure 7. Evaluation interface ........................................................................................... 46 Figure 8. Point based choropleth map of population by county ....................................... 67 Figure 9. Polygon based choropleth map of population by county .................................. 68 Figure 10. User drawn feature of defining