Archive for March, 2009

New GPS E-Learning Courses

Posted on March 31, 2009. Filed under: Uncategorized |

GeoSpatial Training Services and Geomattix, LLC have teamed up to provide a series of GPS specific e-learning courses that will be released in April and May.  You can pre-order these great courses now.  Some of the initial offerings including the following courses:

  • Introduction to GPS Technology — (late April release date)
    A general introduction to GPS — what is GPS? What equipment do I need? How do I choose? How to collect data and basic workflows.

    Syllabus

    E-Delivery ($60)
    Buy Now
    Mail Delivery ($75)
    Buy Now

  • Integrating GPS Data with GIS — (late April release date)
    This course focuses on getting the GPS data into a GIS.  What equipment do I need?  How does the equipment dictate the workflow?  Pros and cons of each workflow.  How do I incorporate GPS data collecting into my organization.

    Syllabus

    E-Delivery ($60)

  • Buy NowMail Delivery ($75)

    Buy Now

  • Adding Digital Photos to your GIS — (late April release date)
    Adding digital photos to GIS is much easier with the help of GPS.  This class will look at adding digital photos as attributes to GIS features and also adding georeferenced photos to GIS as layers.  What equipment do I need?  What is the workflow?  How do I work with the photos inside of ArcGIS and Google Earth?

    Syllabus

    E-Delivery ($60)
    Buy Now
    Mail Delivery ($75)

    Buy Now

  • Working with Coordinate Systems in GIS & GPS — (May release date)
    Always a challenge in GIS and doubly so when using GPS to collect GIS data, this class focuses on the importance of coordinate systems.  What is a coordinate system?  Why should I care?  How do I work with them?  What do I need to be aware of when using GPS?  Why won’t my data line up and how can I fix it?

    Syllabus

    E-Delivery ($60)
    contact sales at geospatialtraining.com for ordering information
    Mail Delivery ($75)
    contact sales at geospatialtraining.com for ordering information

  • GPS Mapping with ArcPad — (late April release date)
    What is ArcPad?  Why would I use it?  How do I use it with a GPS unit?

    Syllabus

    E-Delivery ($60)
    Buy Now
    Mail Delivery ($75)

    Buy Now

  • GPS Mapping with Trimble’s TerraSync and Pathfinder Office Software — (late April release date)
    Trimble makes a very user-friendly GPS field application called TerraSyn and its companion office program Pathfinder Office.  This class will help new users get started with the software and walk them through the basic workflow of project design, GPS configuration, field data collection, and post-processing of the data.

    Syllabus

    E-Delivery ($60)
    Buy Now
    Mail Delivery ($75)

    Buy Now

Read Full Post | Make a Comment ( None so far )

Reading XML Files with the Google Maps API

Posted on March 30, 2009. Filed under: Google Maps |

We commonly get questions regarding how information can be read from an XML file and displayed in Google Maps as markers.  In this post I’d like to detail how this is accomplished through the Google Maps API.  By way of example we are going to examine a simple application that displays various historic landmarks from the city of Austin, Texas.  Our XML file, called Landmarks.xml, contains several dozen landmarks in a format as seen in the figure below.

This file contains elements for latitude and longitude which we’ll use to plot the marker along with four attribute elements including the building name, address, ownership type, and the date the structure was constructed.  What we’re going to do in this simple application is read this file, plot out a new instance of GMarker using the <Longitude> and <Latitude> elements for each site, and display the attributes in an info window.  Keep in mind that we are only scratching the surface of what an info window can hold in this example.  We are simply printing text to the info window, but you can also add images, links, and video to your info windows as well.  In addition, the use of a tabbed info window can assist with grouping your information.

We are going to examine a couple different methods that the Google Maps API provides for reading XML files.  To follow along with the code feel free to open Landmarks.xml in your favorite text editor.  You can view the finished application here.

GXmlHttp

The Maps API contains a method called GXmlHttp() which is used to create a browser-neutral XmlHttpRequest() object that works with Internet Explorer, Firefox, and Safari.  As with all instances of XmlHttpRequest, the XML file that you access must be on your local domain.  Cross domain transfers are not allowed unless specifically defined through a proxy server or some other option for working around cross-domain browser restrictions.

In the code example below we open our Landmarks.xml file (which is on our local domain) by calling the open() method on an instance of GXmlHttp that we created with GXmlHttp.create().

The readyState property is then used inside the onreadystatechange event handler to determine the status of the request.  One of five states can be assigned to the readyState property.

0 = uninitialized

1 = loading

2 = loaded

3 = interactive

4 = complete

The state we are interested in is a value of 4 which indicates that the request is complete and we now have a response from the server.

In addition to checking the readyState property we can also check the GXmlHttp.status or GXmlHttp.statusText properties to get confirmation that the transaction completed successfully before performing an operation on the results.  A value of 200 in the status property (as seen in this code example) or ‘OK’ in the statusText property indicates success.  Assuming that we have a readyState value of 4 and a status of 200 we can continue processing the file.

Data returned in the response can be accessed through the responseText or responseXML properties.  The responseText property provides only a string representation of the data while the responseXML property gives us access to data that is returned in a well-formed XML DOM object that can then be parsed using node tree methods and properties. In this case we are using responseXML.  The XML DOM object, called ‘xmlDoc’ in this case, can then be traversed.  In the code below we are creating a list of <Row> elements by using the ‘getElementsbyTagName’ method.

From here we are going to loop through each <Row> using a JavaScript ‘for loop’.  For each row we pull out the values for <Latitude>, <Longitude>, <Building_Name>, <Address>, <Ownership> and <Date_Built>.

With the values for latitude and longitude we create a new instance of GLatLng.

Each of the attributes (Building Name, Address, Ownership Type, and Date of Construction) are pulled for each row and added to a new string value called ‘htmlString’.  Finally, we call the ‘createMarker() method passing in the new instance of GLatLng (‘point’ variable) and our ‘htmlString’ variable.

The ‘createMarker’ method creates a new GMarker for each point and adds the text to an info window for the marker.  This marker is then returned to the calling function where it is placed into an array which will eventually be used with MarkerManager to display each of the points.  MarkerManager is a Google Maps API Utility class that can efficiently add large numbers of markers to the Google Maps display.

GDownloadUrl

A simpler method of reading an XML file is through the use of GDownloadUrl in conjunction with GXml.parse() as seen in the figure below.  GXml.parse() takes a string of XML as its only argument.  In this case, the XML from Landmarks.xml is passed into the variable ‘data’ and then into GXml.parse( ).

GDownloadUrl eliminates the need for ‘readyState’checking.

More Information

To obtain additional information on the Google Maps API please see our e-learning course, “Introduction to the Google Maps API“.  In addition, GeoSpatial Training Services also provides a full set of Google Earth and ESRI  e-learning courses.  Please see our website for more details.

Read Full Post | Make a Comment ( 2 so far )

New GPS E-Learning Courses

Posted on March 25, 2009. Filed under: Uncategorized |

GeoSpatial Training Services and Geomattix are teaming up to provide a series of new GPS e-learning courses to be released in the coming months.  Some of the initial offerings will include the following courses:

  • Introduction to GPS Technology
  • Integrating GPS Data with GIS
  • Adding Digital Photos to your GIS
  • Working with Coordinate Systems in GIS & GPS
  • GPS Mapping with ArcPad
  • GPS Mapping with Trimble’s TerraSync and Pathfinder Office Software

We will be releasing additional information on these courses in the near future.  For more information please contact eric at geospatialtraining.com

Read Full Post | Make a Comment ( None so far )

Density Mapping in Google Maps with HeatMapAPI

Posted on March 11, 2009. Filed under: Google Maps |

In the GIS world heat maps are a graphical representation of point data on a map through the use of colors that indicate the density of some variable such as crime incidents or traffic accidents.  Heat maps let users quickly visualize the density of locations. Being able to understand the density of point locations makes it much easier to see patterns in your data, especially when using colors. In this post we’re going to examine the HeatMapAPI, a JavaScript API for creating heat maps in Google Maps.


2009 Starbucks Store Closures

Introduction
HeatMapAPI can be used over the Internet or as a .NET DLL that runs in a local environment and allows you to integrate heat map images into Google Maps or other GIS systems.  In this post we’re going to use HeatMapAPI to visualize the density of recent Starbucks store closures.  In a recent statement, Starbucks announced the closure of 600+ stores in the United States due to economic conditions.

Preparing the Data
The list of store closures was not geocoded so I copied and pasted the data into the Internet geocoding application Batch Geocode as tab delimited data.  The data contains address, city, and state information in addition to the store number and store name.  After validating the source data the geocoder was run, producing latitude, longitude coordinates for each store location.  For the purposes of a heat map the only information I was really interested in were the latitude, longitude coordinates which I then imported into an XML file that would be read by my simple Google Maps application.

Google Maps API and HeatMapAPI Code
My Google Maps application code is divided into three distinct functions including an initialization function for creating the Google Map, a function for reading the data from the XML file, and finally a function to plot the heat map on top of the Google Map using the store points read from the XML file.  However, before we examine the functions we need to add a reference to the HeatMapAPI and take care of a few other house-keeping details.  At the top of the page we add the following references to the HeatMapAPI.  You can generate a key here for your own evaluation.

In addition, you need to add two hidden fields to your page as seen below.

The initialize() function seen below simply creates an instance of GMap2 (Google Map), centers and scales the map, sets the interface to the new Google Maps interface, and calls the initHeatmap() function.

The initHeatMap() function creates a new instance of GEOHeatmap and sets the size in pixels which is equal to the size of our Google Map (500 x500).  Next, a call to addMarkersFromXML() loads the Starbucks stores from our XML file into a global variable called ‘batch’.  The ‘batch’ variable is then assigned to the HMMapdata hidden variable that we defined earlier.  The setBoost() and setDecay() methods on GEOHeatmap are then called.  In this case we simply use the default values, but you may want to check the documentation for more details on how these methods can be used to alter the results of your heat map.  Finally, we call the GEOHeatmap.getURL method and render the map through a call to the HMGoogleOverlay constructor.  This new heat map is then placed on top of the Google Map through the GMap2.addOverlay method.

The results can be seen in the figures below.

See more information on the HeatMapAPI.

More Information
To obtain additional information on the Google Maps API please see our e-learning course, “Introduction to the Google Maps API“.  In addition, GeoSpatial Training Services also provides a full set of Google Earth and ESRI  e-learning courses.  Please see our website for more details.

Read Full Post | Make a Comment ( 6 so far )

“Mastering KML” E-Learning Course Update

Posted on March 4, 2009. Filed under: Uncategorized |

GeoSpatial Training Services is pleased to announce the April 1st update of our e-learning course “Mastering KML for Google Earth“.  This course is designed to teach you both basic and advanced KML concepts that will enable you to develop geographic output for the Google Earth platform.

New skills acquired through this course:

  • Learn how KML is used by Google Earth and other Earth browsers to display geographic data
  • Create Placemarks, Paths, Polgyons
  • Attach descriptive information to Placemarks in the form of Balloons
  • Symbolize your geographic data with Styles
  • Overlay raster images and photos on the Google Earth terrain
  • Add legends and logos
  • Control the Google Earth Camera
  • Create dynamic data feeds with Network Links
  • Use Regions for displaying large data sets
  • Use KML Generation tools
  • Package, distribute and enable Internet searching of your KML files

Course Modules
Here is the full syllabus.

In addition, this course contains 10 exercises designed to enhance your understanding of this topic.

Read Full Post | Make a Comment ( None so far )

The New Google Maps Interface

Posted on March 3, 2009. Filed under: Google Maps |

The Google Maps default interface was recently updated to a new styling which you can easily implement in your Google Maps application. The GMap2 class has seen the recent addition of a new ‘setUIToDefault()’ method that will automatically update your application to the default interface found at maps.google.com. In addition, adding this line of code will ensure that any future changes implemented in the user interface at maps.google.com will be reflected in your application without any additional changes.

This function includes default controls and functionality that are dependent upon the size of your map.

Maps 300 x 400 pixels or smaller

• GMenuMapTypeControl
• GSmallZoomControl3D



Maps Larger than 300 x 400 pixels

• GLargeMapControl3D
• GMapTypeControl
• GScaleControl

Here is a simple example of the concepts.

In both cases the scroll wheel zoom, and double click zoom will be enabled, and a GKeyboardHandler is added to the map.

In addition to the GMap2.setUIToDefault() method, you can also use an instance of the new GMapUIOptions class for fine grained control of the new interface. For instance, the following code block get an instance of GMapUIOptions, disables double click zoom, and removes the scale control. The GMap2.getDefaultUI() method gets an instance of GMapUIOptions before the various properties are set.

More Information
To obtain additional information on the Google Maps API please see our e-learning course, “Introduction to the Google Maps API“.  In addition, GeoSpatial Training Services also provides a full set of Google Earth and ESRI  e-learning courses.  Please see our website for more details.

Read Full Post | Make a Comment ( None so far )

Liked it here?
Why not try sites on the blogroll...