Hack 90. Crawl the Geospatial Web with RedSpider

RedSpider provides a web-based client to view Web Map Service and Web Feature Service layersgood for testing and instant gratification!

Perhaps, after reading this far, you've decided to take the plunge into the Open Geospatial Consortium web mapping standards to share your map data and let others build on your applications. [Hack #89] shows how to set up GeoServer, the OGC equivalent of the Apache web server, to publish from your existing geographic data sources, such as a PostGIS spatial database or an existing ArcInfo resource.

Now that you've published your spatial data, you want instant gratification. This is where RedSpider comes in. RedSpider (http://redspider.us/viewer/) is a Web Map Service and Web Feature Service client that works in a web browser. It's not open source, but it's free to use and is the nicest closed-source viewer available on the Web.

RedSpider comes preloaded with a large set of layers that represent mostly U.S.-derived global maps. There are weather reports, city names, and country outlines among the default features. However, if you just want to use RedSpider to view your own WFS/WMS published data, you probably want to turn most of these layers off. Figure 8-7 shows the U.S. feature map you see when RedSpider loads up.

Figure 8-7. A default view of RedSpider

The layer-manipulation commands on the toolbar are indicated by a stack of papers. "Manage Layers," the plain stack of paper, will allow you to inspect the vast amount of free U.S. data that RedSpider has access to.

The stack with a plus sign over it indicates "Add Layers to your Context." This is where we can add our newly published WMS or WFS data as a layer in RedSpider. Click on the "Add Layers" icon, and it will present you with an input box, where you can select a WFS or WMS to add to your view (your Context) and enter a URL.

For example, we set up a simple WFS at http://mappinghacks.com:8080/wfs/geoserver that publishes a snapshot of the community wireless network in the UK, http://wirelesslondon.info. Figure 8-8 shows the list of WFS layers available from our server when we enter it into RedSpider.

Figure 8-8. RedSpider Add Layer interface

After adding a selected layer to RedSpider, hit Submit and your new data will be available in the interface. You probably won't be able to see it, though; if your data encompasses a small part of the world, the client won't be centered on it, and it may be hidden by other layers.

To recenter the view so that the bounding box, the area of space shown in the image, is the same as the bounding box of your data set, select the stack icon with two arrows protruding from it: the "Fit to Layer" option. This will recenter RedSpider's view of your data. Any new layers you've added should appear at the top of the list. Select them, and hit Submit to zoom in on your data.

The stack with an eye icon over it, "Layer Visibility," allows you to toggle on and off the layers that you want displayed on your web map. Ctrl-click to select a range of them; unselected layers will stay invisible. Again, your new layers will be at the top of the list. At the bottom of the list are layers for world countries and major cities, dating to 1998; these are always useful as a base reference.

This should induce instant gratification! Figure 8-9 shows a map we were able to produce very simply with RedSpider, showing nodes on the UK community wireless network.

Figure 8-9. A map of community wireless nodes in the UK, as shown by RedSpider

WFS holds great promise in terms of being able to chain geographic data services together with no programming effort. Styled Layer Descriptor is a developing effort that will allow you to provide custom styles and symbols for map clients to display your layers with. The future is promising!

Mapping Your Life

Mapping Your Neighborhood

Mapping Your World

Mapping (on) the Web

Mapping with Gadgets

Mapping on Your Desktop

Names and Places

Building the Geospatial Web

Mapping with Other People



Mapping Hacks
Mapping Hacks: Tips & Tools for Electronic Cartography
ISBN: 0596007035
EAN: 2147483647
Year: 2004
Pages: 172

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net