BantamGIS

| |

Guest article submitted by Michael Chamberlain explaining why and how he created his web site, BantamGIS.com.  This article is part of the series entitled “GIS in the Trenches“.  For information about submitting your own article, please consult the GIS in the Trenches submission page.

In the summer of 2010 I created a website (www.bantamgis.com) to catalog and display maps.  It was intended to be a way of organizing the maps I created.  It turned into a set of applications to create, index and quickly display content using thumbnails instead of text in a google suggest style.

The first step was to create a map or series of maps.  This was completed using ArcGIS 9.3 at the view license.  Data was acquired from numerous public sources such as the Bureau of Transportation Statistics, US Census, National Atlas and the Texas Natural Resources Information Service.  A geodatabase was developed to manage the data and map templates were created at various page sizes and orientations.  Annotations were created as needed and stored in the geodatabase.  The finished maps were exported to .pdf and .png.

The .png’s from the mapping step were used to create thumbnails that would be displayed on the webpage.  A second copy of the .png was created with watermark text.  In the beginning IrfanView 4.00 was used for the thumbnails and watermark text.  This was a temporary solution because it involved too many steps and took too much time to determine the correct part of the image to crop when creating the thumbnail.  What I needed was a quick and visual way to create thumbnails and apply the watermark.  This was accomplished by creating a VB Express 2008 program that allows me to click on a part of an image and preview a thumbnail based on the clicked point.  If I like the preview I click an accept button.  Next I click the watermark button.  The output is placed in the same directory of the original image and named accordingly.

The next step was to create an index of the content.  Each map produced received a series of records in the index table that describes the map.  And each map can be described in multiple ways.  For example, a map of world could be indexed by the keywords Continents, Oceans, World, Countries or any number of descriptive words relevant to the map.  The index is sorted by map name and converted from a single table to a series of 26 .xml files (a.xml, b.xml).  A second index is created that I call the startup index.  This is the index of maps displayed when the webpage is first displayed.  This is where I bring new or special maps to the users attention.

Now that everything was ready (maps, thumbnails and index) I turned my attention to the webpage.  I wanted it to be as simple as possible but still be dynamic and easy to use.  The main page consists of a search box, thumbnails from the startup index and a couple of links.  As the user types in the search box JavaScript is used to pull the appropriate index parse the .xml and search for items that match what the user typed.  If the user typed “New” the page would load the n.xml index and return everything in the index that starts with “New”.  The startup index thumbnails would be replaced with thumbnails of maps that start with “New”.  The thumbnails are loaded as links that open the full size sample view with purchase information.

PayPal was used to handle the purchasing because it has a good reputation, doesn’t require a login and allows customization.  Using their customization I created cart items and buttons to pass information about purchases to PayPal.  When the transaction is complete I receive an e-mail notification and send the .pdf to the purchaser’s e-mail account.

Overall I’m happy with the way it turned out.  It keeps me organized and puts everything withing a few clicks.  I plan to add maps on a regular basis and would like to add sample code in various languages to the index.

Share this article


Enter your email to receive the weekly GIS Lounge newsletter: