About | Contact | SUBMIT PRESS | Advertise | FAQ
Spatial Newsletters | Twitter |
HomeNewsArticlesDataGIS JobsEDULBSSTOREPhotosEVENTSDIRECTORYBLOGIMAGINGGEO SOCIAL
Software | Spotlights on Geospatial Data | Web Services | Mashup Zone  
advertisement

Top Geo News


NAVTEQ First to Give Navigation a Human Touch

GOT NEWS? Send To:
submit press to GISuser
{Put Your News Here}

follow GISuser on Twitter 

Featured Event
GISuser Sponsor


iPhone Geo Stuff!

Visit the iPhone Zone

GIS Job Opportunities
 

Loads of GIS Jobs!

Business and GIS Data Analyst #22541
Tenure Track Position in Spatial Perspectives and Risk
GIS Cartography Technician Vacancies
SQL Server Web Developer
GIS IT Analyst -
.NET WEB DEVELOPER
Lead Software Engineer-Mapframe
Senior GIS Analyst
Field Data Technician
GIS Programmer
GISuser Videos


More Videos HERE
Want your Video placed here? Contact us!
Recent Site Additions

GISuser Sponsor

GISuser Sponsor


GISuser 2.0

anygeo blog  gisuser flickr jaiku ovi
qik twitter youtube linkedIn
platial gisuser diggs mosh widsets

gisuser facebook page
gisuser flickr
linkedIn
twitter
youtube
gisuser blip.tv

Directory
North River Geographic Systems, Inc.  
Category: Geo Tech Companies, Consultants and Contractors


Get Listed!

Get Listed in the GISuser Industry Directory
social media
NEW - list your GIS/Geo social micro blog, twitter, facebook group etc... post your Resume HERE!

 

Home arrow Articles arrow Web Services arrow Earthquake Mapping with OGC and Open Source Tools     



Earthquake Mapping with OGC and Open Source Tools PDF Print E-mail
Written by Tom Kralidis   
13 May 2005
One thing I've always found useful about USGS website is the neat "latest earthquakes" listing given each day. So one day I said to myself, "boy, wouldn't it be great if this type of information were available as a map for users to embed in their application?" 

The Open Geospatial Consortium (OGC) produces specifications web mapping, geographic information and processing. Perhaps the most used to date is the Web Map Service specification, which defines a common interface to interact with a server's geographic data through visualizations of maps. The Web Feature Service allows for users to access raw, actual data in Geography Markup Language (GML), which is an open XML format for geospatial data. Using common standards allows for maps and data to be delivered as "services", as opposed to static data download. This lets applications developers connect to geospatial data dynamically and fetch for a given area of interest, temporal slice, or attributional query.

There are many software tools which support the WMS specification. The neat thing about common standards is that servers can communicate with eachother regardless of what kind of software is used a given organization. In this particular example, I've chosen to use the University of Minnesota MapServer software. MapServer supports a number of OGC specifications, and can be run on a number of given operating systems. In addition, MapServer is free, open source software.

So, what I'm going to do is use MapServer to serve the latest earthquake data through a WMS server. Here are the steps involved:

  • use Perl script to format the data to GML
  • configure mapfile to serve GML as a WMS layer
  • add reference layers through WMS
  • publish URL

Data Formatting

MapServer accepts a number of different geospatial data formats, including GML. I wrote a quick Perl script which fetches the remote ASCII records from the USGS website and converts them to GML as a format MapServer, and any GML aware software, can work with. The neat thing about the output GML is that, as an XML format, it is interoperable and self-describing, which means applications which support GML can work with this data. Also, any XML processor can work with and process this data. Nice!

MapServer also works with shapefiles as input. Shapefiles are a binary encoded set of files which store geospatial data. Shapefiles are useful when GML becomes too large to work with. Since this is a small dataset, GML is a nice, application neutral, human readable file format to work with. GML can be thought of as a data transfer format over the Internet. We'll see later how MapServer can read a shapefile as a WFS and return GML on the fly. The Perl script to generate a shapefile is very similar to GML, except that we use Mapscript, a module which exposes MapServer functions in a number of languages, such as Java, PHP, and, in this case, Perl.

As the source data changes with time, I've opted to schedule a process to run every 10 minutes to freshen the data.

Mapfile Configuration

MapServer provides a CGI standalone process which is driven by a configuration file, called a "mapfile". Mapfiles contain layer information, data connections, area of interest, and so on.

So I wrote the mapfile to point to the output GML data. The mapfile is setup to act as an OGC WMS and OGC WFS.

At this point, any WMS client can make a request to MapServer as a WMS and have a map of the earthquakes returned to them. Here's a sample GetMap request:  

http://host/cgi-bin/mapserv/mapserv?map=/home/tkralidi/|config.map&service=
WMS&version=1.1.1&request=GetMap&format=image/png&width=500&height=300&srs=
EPSG:4326&layers=neis&bbox=-180,-90,180,90&styles

and here is the image which is returned by the URL:

At this point, any WMS client can connect to this data and integrate into their application with other data.

MapServer also acts as a WMS client, which means MapServer itself can connect to other WMS services and fetch maps for you, which you can return to your client. So the next step we take is to add some reference layers (imagery, political boundaries, coastlines). These reference layers themselves come from remote WMS servers. Here's a GetMap request which shows the earthquake data atop the reference data:

http://host/cgi-bin/mapserv/mapserv?map=/home/tkralidi/config.map&service=
WMS&version=1.1.1&request=GetMap&format=image/png&width=500&height=300&srs=
EPSG:4326&layers=envisat_meris,polbnd,coast,neis&bbox=-180,-90,180,90&styles

and here is the image returned by the URL:

Pretty neat and not alot of effort! One can make this as simple or as complex as they wish. The most simple thing to do is to add this as an HTML image tag in your webpage:

IMG height=300 alt="[ recent earthquakes ]" 
src="http://host/cgi-bin/mapserv/mapserv?map=/home/tkralidi/config.
map&service=WMS&version=1.1.1&request=GetMap&format=image/png&width=
500&height=300&srs=EPSG:4326&layers=envisat_meris,polbnd,coast,neis&bbox=
-180,-90,180,90&styles=" width=500 border=0

I've included the Perl script and sample mapfile for download.

Links

Thanks to Tom for this cool submission! You can contact him for comments at tomkralidis-at-hotmail-dot-com - More about Tom HERE

 

deliciousrssnewsletterlinkedinfacebooktwitter

blog comments powered by Disqus
GISuser Feature Articles

The Super-Information Highway - Virginia Tech acquires new data-collection technology - Virginia Tech acquires new data-collection technology to assist Virginia DOT's public-private highway asset maintenance partnerships.

A Look at Twitter Stats From the International #ESRIUC - Twitter once again played a huge role in the ESRI user conference, with many attendees, Esri staffers, and exhibitors using the social service to communicate with attendees and those watching from a distance. We take a look at some of the stats that resulted from all the Tweeting.

ESRIUC Video - A Look at Geospatial PDFs for Apple iOS from Avenza - A visit with Ted Florence, President of Avenza Systems Inc on the exhibition hall floor at the Esri User Conference gives us a look at the company's new, free app for the iOS. This is the first and only geospatial PDF application for Apple iOS devices including the iPad, iPhone and iPod Touch platforms.

ITT Visual Information Solutions + Esri Partnership and the ArcGIS image analysis toolbox #ESRIUC
At a special PR event held in San Diego at the ESRIUC, Richard Cooke, President of ITT Visual Information Solutions, and Lawrie Jordan, Director of Imagery Enterprise Solutions for Esri both made statements and and addressed a room of journalists to provide the latest about ITT geospatial solution offering.

ESRIUC VIDEO First Look Technology Video from ESRIUC - Ashtech Mobile Mapper 100 - Designed for GIS data collection and mapping, the MobileMapper 100 integrates an open operating system, built-in communications and Ashtech's powerful BLADE technology. BLADE allows the MobileMapper 100 to deliver the high accuracies desired by GIS professionals, even in extreme GNSS environments, including urban and rural canyons and under dense canopies.

Drive and Ride With Topcon for fast 3D Mobile Mapping and data collection at ESRIUC - At the ESRIUC we had the pleasure of connecting with the team from Topcon who graciously took me on an interesting 3D Mobile Mapping ride & drive, giving us a first-hand look at how the company collects accurate, 3D mapping data "simply" by driving the streets in a vehicle equipped with some pretty impressive hardware! 

Real-time GPS Mapping and GIS Solution Aids Efficient Disaster Management  - Saturday, February 7, 2009 will forever be known as Black Saturday in the State of Victoria, Australia. In the midst of a 10-year drought, a record breaking heat wave descended upon the state, with temperatures exceeding 45 degrees C (110-120 deg F), breaking all-time record highs in some cities - Victoria Police Use Trimble Juno SC Handhelds to Speed Assessment of Damage Caused by Bush Fires.

10 Awesome GIS and Mapping apps for the iPhone - I recall last year at the ESRI UC when an iPhone was on stage showing a prototype app (think ArcPad on iPhone). It was then that I realized the iPhone platform is going to be BIG in mapping and there's a ton of opportunity for developers. 

10 Geo Social Location-Aware Apps Making Waves... With Twitter's opening of their location API to developers there's going to be a ton of third party apps that will enable Twitter users to share location-aware information via their Twitter accounts.

Data Spotlight - USGS and a new generation of Topo Maps - A primer on US Topo - Downloading “free” USGS topos from around the web?? Are you getting the new, enhanced USGS topos - US Topo?

Openness via Data.gov - Access A Wealth of Geospatial Data and a Cool ESRI SHP file Viewing Tool - Data.gov increases the ability of the public to easily find, download, and use datasets that are generated and typically held by the Federal Government.

feature articlesSee more GISuser Features HERE / See GISuser Spotlights Here 

Recent Directory Listings
1. ArchiFiles
    Category: Data Conversion Services
    Created: Aug 25, 2010
2. GeoTech Advisors, LLC
    Category: Geo Tech Companies, Consultants and Contractors
    Created: Aug 18, 2010
3. Navagis MobileRecon
    Category: Mobile App Development
    Created: Aug 18, 2010
4. ITT Visual Information...
    Category: Twitters
    Created: Aug 13, 2010
5. Geospatial Product...
    Category: Geo Tech Companies, Consultants and Contractors
    Created: Aug 10, 2010
Show more...
Featured Events

Location Business Summit 2010 - The Location Business Summit USA brings together key companies from across the ecosystem, with over 30 top speakers, 200 hundred plus attendees and a highly focused agenda which gets to the core of local search, optimizing content, monetizing context and harnessing the hype behind Location Based Advertising and the `Check-in'.

International Lidar Mapping Forum 2011 - ILMF 2011 will be held at the Astor Crowne Plaza in New Orleans, Louisiana on February 7 -9, 2011. The eleventh in the series that has long established itself as the premier LIDAR event, attracting professionals from around the world with one focused objective of sharing information on LIDAR technology and mobile mapping applications.

List Your Event Here 

Suggested GISuser Reading
Google Geospatial Search
Google
 

 

or... try our CUSTOM GISuser Google Search!

Contribute to the GISuser Search (by Google)

GISuser Newsletter

See Recent edition

GIS user free newsletter 

subscribe GISuser

Sponsor

GIS Data Nodes

State GIS Clearinghouse Portals
State GIS Spatial Data Clearinghouse Directory



RSS and Feeds


feedburner
add to google reader




technocrati
Add to my Widsets
GISuser on your mobile!

Feedblitz updates via email, Tweet, or IM
Software

software reviews
Geo Technology Software

GISuser Site Sponsor


Most Popular
GISuser HOT Spots!

Google Mashup Zone
GISuser WebMaps
Free Data Articles
Spotlights & Tips
GISuser Resumes
Data Links
10 Cool Things
The LBS Zone!

Partner Sites

machinecontrolonline 

symbianone

lbszone.com

symbianone

Spatial Media LLC
A Spatial Media LLC property

Affiliations


asprs

GISuser RSS Feed



Spatial Media, LLC ©2003 - 2010 All rights reserved / Privacy Statement