Modifying WebMap Publisher Metadata


Two great questions you may find yourself asking about GeoMedia WebMap: Why do I need to be extra careful when modifying WebMap Publisher metadata? And why must I stop GeoMedia WebMap while editing the metadata?

If the Map Server and Map Server Manager are the heart of WebMap, the WebMap Publisher metadata is its brain, or at least its long-term memory. Metadata describes where to obtain the actual data to be served, where to position it in a legend, and how to draw it. On top of that, the metadata stores additional settings like areas of interest, available coordinate reference systems, defined queries, and WebMap custom settings.

WebMap reads the metadata and matches that information with the request to come up with a recipe to follow to get the output a client wants to be generated. But it doesn’t fetch the metadata information for every request. Instead, it reads once from the storage and caches it inside several in-memory areas. Some of WebMap direct clients (such as its web services) also cache this information.

This is where the problem lies. If the WebMap Publisher metadata you modified was already cached for efficiency, they all needed to be flushed.

Post 2015 EP05 Enhancements

Reliability and stability mean that you can start the server software and not worry about it. But it also means that you should be able to change some configuration settings on-the-fly while it’s running. WebMap Publisher metadata is one such configuration. It actually has a built-in provision for indicating when something changes. Whenever there is a change made to the WebMap Publisher metadata, it begins its update sequence.

It was simply a case of identifying the places that need to track the modifications and react appropriately. As we learned, the SDI-based services that make use of the metadata (WMS and WFS) functioned fine without any changes. That left just two parts: the WMPS service and the Map Server itself.

The WMPS keeps a cache of the metadata because it processes them heavily while setting things up. In the current release, it checks the update sequence. If it differs from the cached version, it deletes the cached files and refreshes with the updated metadata.

Another challenge was the Map Server legends. The Map Server cached all the legends and their legend entries as ready-to-use GeoMedia objects instead of using the GeoMedia Library connection to obtain them each time a map was requested. To take care of this, we taught the Map Server to track the update sequence number of the WebMap Publisher metadata. If the sequence was different, it would lock the metadata while the WebMap Publisher Administrator manipulates the data. After the WebMap Publisher Administrator finishes, it unlocks the metadata, reconnects and refreshes the cache.

When rewriting the caching mechanism inside the Map Server, we noticed a way to improve performance even more. The cache was only storing whole legend objects instead of retrieving individual legend entries from any given legend. Originally, this was done by looking at whether the legend object resided in the cache. If it was missing, it was obtained from the library and put into the cache. Then it iterates through the cached legend entries to find the requested one.

This is fine if you have simple legends of about 20-30 entries each, but what about legends which are much larger than that? What if you have hundreds of legend entries? Using this approach we get an O(n2) complexity. The solution was surprisingly simple – we just cache both legend and legend entries!


All of our hard work has allowed us to bring GeoMedia WebMap’s reliability a notch or two higher. The ability to change the WebMap Publisher metadata without stopping the whole server and the new Map Server Manager makes for easier deployment and maintenance of a WebMap Server.

So, let’s revisit the two questions posed at the beginning of this post. Do I still need to be careful when modifying WebMap Publisher metadata? Well, sure. You need to make sure that the metadata is complete and accurate. But do you need to stop GeoMedia WebMap to apply a style setting or add a new legend entry to the map? Nope. Simply fire up GeoMedia, open the WebMap Publisher Administrator command, make the necessary changes, and get some coffee while the Map Servers pick them up!

For more WebGIS release information or tutorials, visit the Hexagon Geospatial Community.


About Author

Lukasz Baraniak joined Intergraph in 2009 to work on the then existing GeoMedia SDI Pro and has been involved in server-side development ever since. He is a self-proclaimed software archaeologist, that loves to dig through layers of legacy code in search of software gems. Currently, Lukasz focuses on GeoMedia WebMap, but he also assists in Geospatial SDI and Geospatial Portal development.

Leave A Reply