Thursday, March 20, 2008

OpenStreetMap layer for WorldWind Java

WWJ forum user linnuxxy asked whether OpenStreetMap data could be displayed in WWJ to which m_k provided quite a few useful pointers. This layer will access the 'osm-4326-hybrid' WMS layer from hypercube.telascience.org. Although it is not quite up to date, it renders nicely over the WorldWind terrain.

OpenStreetMap layer for WorldWind Java
Download OpenStreetMapWMSLayer.java - remove the .txt extension and add to the SDK layers.Earth package.

You may want to try the 'osm-4326' too - same thing on a white background (with additional shading below):

OpenStreetMap layer for WorldWind Java
The hybrid layer blends perfectly into the BRGM geology layer too - with shading:

OpenStreetMap layer for WorldWind Java
See this WWJ Forum thread for more info and discussion.

GeoNames Layer for WorldWind Java

This is the first iteration of a layer that displays city names for the current view, off the GeoNames web service.

GeoNames Layer for WorldWind Java
Download GeoNamesLayer.java, remove the .txt extension and add to the SDK layers.Earth package. Note that you may have to refactor the removeAllRenderables() method call into clearRenderables() for 0.4.1 - see this post comments.

Right now the layer will start showing names below 1500km but doesn't cache anything. It just sends requests to the service and displays the latest results. Sometime, names disappear, then reappear... more work is to be done to smooth things out. The service doesn't let you know whether a location is a large city or a tiny village either.

Still it provides many more world city names then are now displayed in WWJ. GeoNames also offers many kinds of geographic features that could be combined here, including the locations for which there is a geo referenced article in Wikipedia.

Sunday, March 2, 2008