Showing posts with label google maps. Show all posts
Showing posts with label google maps. Show all posts

Thursday, August 28, 2008

ArcMap to Google Map Polygons

ArcMap2GMap: download
+ (not yet tested for 9.3)
Samples:
+ Presidential Election Data 2004
+ Hodge Podge Sample of Stuff From My Computer
+ Health Resources

Finally completed a major update for the ArcMap2GMap script that exports ArcMap layers to a standalone Google Map webpage.

This latest update now includes support for choropleth polygon layers using the gPolygon object. Previous versions included support for point and line geometries. The choropleth map is hard-coded to generate 4 equal interval classes based on the attribute selected by the user, but we do have plans on providing more flexibility with this in the future. I want to whole-heartedly thank my GRA, Shivkumar Chandrashekhar, for all of his assistance with this project.

This version includes all features of previous versions, including:
  • multi-layer support
  • geocoding
  • proximity searching (top 10 closest visible points displpayed)
  • driving directions
Students at our university are restricted from registering DLLs, so we could not compile the VBA forms. This means the MXD provided in the download must still be used.

The major issue we needed to resolve to include this polygon support was the complexity of the vertices in a polygon shapefile. Even the simples polygon shapefiles may have thousands of vertices that will timeout any browser on virtually any computer. We have two point reduction methods in place to help resolve this.
  1. First, each polygon feature's vertices are filtered through a Douglas Peucker Algorithm. The code for this can be viewed in the DP.py script.
  2. Second, after the algorithm is run, each polygon feature class is dissolved using ArcMap's geoprocessing dissolve tool. This effectively removes shared boundaries by features with identical color representation.
We are holding an open workshop on campus on September 24. If anyone tries out the script and has any comments, please leave them here or if you do not want them on the permanent blog record, leave them in the IM client to the right.

Thursday, September 20, 2007

Sho’ah’s (שואה) Lasting Impact: Mapping Jewish Migration


Sho’ah’s (שואה) Lasting Impact: Mapping Jewish Migration: http://gis.uta.edu/maus/

As we did last year with Mapping the Afghan Population in the US ( see background), the Information Literacy Librarian and I teamed up to create a project that will integrate numeric and spatial resources into the freshman English Composition courses.

All sections of Freshman Composition I (app. 60) are reading Maus: A Survivor's Tale, by Art Spiegelman. As of this moment, 17 sections have signed up to bring their class in to use the interactive map we designed. This is a whole lot of students who will get exposed to detailed aspects of GIS and geography. I love it.

The Lesson: GIS & Information Literacy
The lesson, from which we hope to publish results, is measuring the ability of interactive GIS and multimedia to enhance students' ability to select a research topic/question. The students first read a bio from Holocaust survivor Madeline Deutsch and write a research topic. Then, we add two additional immersive layers of information. First we play a brief multimedia clip of Madeline describing her ordeal and its aftermath. Second, we lead them through an exercise where they explore Madeline's life before, during, and after the war using the interactive map we created.

We met with the first two classes this morning and our impression is that it was very successful. The instructor agreed and seemed very enthusiastic, which is always a good thing.

Other Uses?
Of course. I am currently working with numerous faculty on campus who teach or whose research interests include WW II or the Holocaust. However, it was the certainty of exposing so many freshman to these types of resources that made this project one of our highest priorities last summer. Perhaps researchers and/or educators outside of our fair university may have a use as well.

Data Sources
Jewish population figures were gathered from the American Jewish Society Yearbook. Big thanks to Texas Christian University Library for loaning them to us. The map features were gathered from historical maps available from the U.S. Holocaust Museum. Historical world shapefiles provided by ThinkQuest.org.

What's Under the Hood?
Technically, the GIS data is stored in an SDE database (Oracle) and is being published as a web service via ArcIMS. Using ASP.NET and the Google Maps API, we integrate the ArcIMS layers with Google Maps and voila...

(Same thanks as last year.)

Updates from the interface used last year with Mapping the Afghan Population:
  1. Drop-down menu for all features selected to activate individual pins
  2. Integrate HTML markup into Google info-windows
  3. 'Loading' animation during ASP.NET postback
  4. Restructured XML database to speed server-side processing
  5. Added ability to zoom to a particular X,Y,Zoom level when a particular background map is selected

Friday, April 06, 2007

Texas Redistricting & Workshop - Texas Redistricting

# Google Map: Redistricting in Texas

# Workshop Materials: CD Image (350mb)


Held our library's 3rd and final workshop of the semester, entitled Congressional Redistricting in Texas: The Maps & The Demographics. It was a blast as we had 15 students, 4 staff, and 2 faculty members attending. Everyone seemed to have a good time.

The 2-hour workshop was organized into three sections.
  1. Dr. Jose Gutierrez, political science faculty, first gave an outstanding 30-minute introduction to the redistricting process in Texas, with an emphasis on the 2003 Texas redistricting and the 2006 Supreme Court decision that required the Texas legislature to redesign District 23. Jose is a fantastic speaker and it I learned a lot.
  2. Spent approximately 30 minutes exploring local voting results and congressional district boundaries using the UT Arlington Library: Texas Redistricting interactive map. Using the same interface design as Mapping the Afghan Experience and the developing Texas Time Machine. The Texas Redistricting Google Map (image above) incorporates voter tabulation district (VTD) election data from the 2000 & 2004 presidential elections, and the 2006 gubernatorial election. There are app. 8,500 VTDs in Texas, so the data allows for local analysis. Not quite as numerous as block groups (app. 14,500 in Texas), but still quite small.
  3. Spent the remaining 45 minutes using ArcMap.
    1. First, we showed everyone how to use the spatial join function to find the % Hispanic population (from block group Census data) in the infamous District 23 in the 108th Congress (before the 2003 redistricting), the 109th Congress (results of the 2003 redistricting), and the 110th Congress (results of the Supreme Court demand to redraw the Congressional district boundaries. This was quite effective as the percentage dropped over 10% from the 108th to the 109th.

    2. Second, we ran through an exercise where participants adjusted the 109th Congressional Districts based on their preferences, whether they be biased or impartial. No programming was necessary for this automation. I was able to create it rather quickly using ArcMap's Model Builder. I implemented an extremely simple algorithm making use of ArcMap's built-in mean center function and then creating a simple voronoi polygon map. Now, our campus has not yet upgraded to ArcGIS 9.2, so I used the euclidian allocation function instead of the voronoi map functions included in 9.2.
So, where did all of this great data come from? Mostly from the Texas Legislative Council's Redistricting FTP Site. Note that Firefox has some issues with this FTP site, so if you use a browser to access FTP, use IE. For more details about data sources, see the workshop handout, which is basically a bibliography of relevant data sources.

Monday, January 29, 2007

ArcMap2GMap v.2


Just completed a major revision of ArcMap2GMap, the Python script that converts shapefiles from ArcMap to the HTML/JavaScripts necessary to overlay the layers on top of a Google Map. To download the file, see the ArcScripts entry. See here for the initial release of ArcMap2GMap last year.

An example of a webpage generated by ArcMap2GMap can be viewed here.

The scripts, VBA, HTML, and JavaScripts were written by myself and Kaushal Gala, my GRA who has since gone on to bigger and brighter things.

Here is a brief description (see the readme file for more details):

ArcMap2GMap converts shapefiles to Google Map overlays, including all HTML and JavaScript files necessary to run. The generated HTML file includes the following functionality: multiple layers visible/invisible, geocoding, proximities (top 10 closest visible points), and driving directions.

Converts point shapefiles, polyline shapefiles, and polygon shapefiles. Handles polygons with multipart and/or donut holes (inner circles). Options include the ability to simplify polylines (and polygons) to minimize the number of vertices Google Maps needs to render.

To Run:

Extract the contents directly to the C:\ drive. This will create the following directory: C:\ArcMap2GMap. Then launch the C:\ArcMap2GMap\ArcMap2GMap.mxd ArcMap project file.

Requires ArcGIS Desktop 9.1 Not tested yet on 9.2.

Developed by the University of Texas at Arlington Library: GIS Program (http://library.uta.edu/gis). Please direct all comments to gislib@uta.edu.