The Development of Web Mapping Applications with Oracle Tools

June 13, 2009
Share

Sharing is Caring

Although Oracle's primary focus is the storage and management of data, the Oracle solution provides other significant advantages to its users. Compared with most database-centric architectures, a solution built using an Oracle architecture allows for a better integration of mapping data and strictly statistical data, thus using the data to their full potential and enhancing upgradability.

There are two ways to leverage the spatial capabilities of Oracle. Oracle Locator is a standard feature of the Oracle Database 11g Edition, with functionality sufficient to meet the needs of most applications. It offers storage and spatial indexing mechanisms, as well as the ability to make very powerful spatial requests using a structure identical to that of Oracle Spatial, which can be added as an option to the Enterprise version of the database for an additional cost. Oracle Spatial is designed to manage spatially referenced data inside an Oracle database. Oracle Spatial provides advanced features, such as raster data management, persistent topology, network management and some of the more complex spatial aggregation features.

Some Features
In order to deal with the visual aspects of its solution, Oracle offers its own MapViewer, which is a J2EE component running within an OC4J container; it is included for free with the Oracle iAS Applications Server. This map rendering engine takes advantage of Oracle Spatial or Locator capabilities, and allows the user to hide the complexity of spatial requests and map generation processes by taking charge of the management of the mapping interface.

MapViewer offers a management console, JAVA and XML APIs, as well as a host of JSP tags that make them easy to integrate into a full-fledged custom solution. Using one of these APIs, the user can also generate maps and make spatial queries from any location-enabled Oracle database. It is also possible to add non-spatial data through dynamic requests. As with most competitors' products, MapViewer generates images in most standard formats such as GIF, JPEG or PNG, as well as in the SVG format, which offers more dynamism.

For even more flexibility, Oracle also offers Oracle Maps, which introduces a very powerful AJAX Web mapping interface that allows access to MapViewer's visualization features. Included within MapViewer, Oracle Maps has a cache server of pre-generated map images, an interactive coverage server and an AJAX mapping client that facilitates navigation and interaction with maps. Oracle Maps also supports redlining and zoom layering, as well as various thematic mapping functions. It also allows integration to a WMS server through an open and flexible JavaScript API.

MapBuilder (distributed for free with MapViewer) is a client tool designed to create and customize spatial maps and to create attractive layouts for the end user. Its various capabilities don't make MapBuilder as complete a GIS as MapInfo Pro or ArcView, but they nevertheless provide the user with adequate tools for the creation of styles to be assembled into a basemap, making it the cornerstone of the whole application. Oracle Map Builder offers a WYSIWYG interface that allows edition and visualization of themes, styles and basemaps, including importing and exporting their definitions for use in another database, for example.

Importing and exporting the map definitions is one of the significant advantages of using MapBuilder. All MapBuilder definitions and metadata are stored into the database, thus facilitating the sharing of maps and their various layers within an Oracle database, or between many Oracle databases. Remember, though, that the creation of high quality basemaps with MapBuilder requires a lot more time and manipulations than what you've seen with other engines such as MapInfo or ArcView, for example.

Development
Since the development of Web mapping applications also requires geographic data, a basic data set for North America is now available natively in Oracle format from providers such as NAVTEQ. A customer's own data can be added to the database using a third-party tool or SQL*Loader. They can also be created through a geocoding process. Once the data are loaded, the basemap is in place and the MapViewer server is operational, then the development of the application can start.

With the Oracle Maps Javascript API and the many tutorials provided, it is possible to easily integrate a simple map browser to display the basemap and all the spatial layers in a dynamic and interactive way. To do that, Oracle Maps has to be made available through MapViewer, so as to allow the creation of data sources that access the database and creation of the mapping cache. Following the creation of that cache, Oracle Maps will automatically generate and retain all the images that are necessary for map rendering at all defined zoom levels. It is important to accurately consider what areas of the map will potentially be used so as to anticipate what the required disk space will be. It is also important to proceed through steps, because it's easy to make manipulation mistakes when adding dynamic visual elements. Usually, codes and error messages returned by Oracle aren't very specific in that regard.

Limitations
When developing such applications, you have to know that the performance, in terms of display, is directly linked to the size and precision of the spatial coverage and to the query used when adding the layers. A good knowledge of how to write and optimize those types of queries, and of the corresponding geographic objects they represent, may be required to improve the speed of the dynamic layers' display. Street tags will only show when the entire word can fit within the length of a road segment. This may cause problems in the display of highway or secondary road tags at a small scale. The "No Repetitive Labels" option may be of good use in that context.

As of now, the Spherical Mercator system popularized by Google Maps can be manually added to the coordinate systems tables, but Oracle plans to natively include it in versions from 11gR2 onward, as well as to backport it to 10gR2.

As for the map's general appearance, it is not possible at the moment to specify the size of the cartographic view in MapBuilder. It is, therefore, difficult to align on the dimensions of the Web application and to generate adequate zoom levels for the display of the map, layers and tags. However, with the 11g R1 pre-release of MapBuilder, available to current users through download, there is a built-in wizard to easily create map tile definitions at the optimal zoom levels by visually specifying the cartographic view of the minimum and maximum zoom levels in MapBuilder. This ensures zoom levels are always adequate for the Web applications.

As with any map server, the merging of basemap tiles and dynamic layers in different projections can be an issue. With MapViewer and Spatial, however, it is completely automatic and transparent to the developer. While allowing XML style definitions provides maximum flexibility, it can be error-prone and cumbersome. So the JavaScript API could be improved to provide easier means of creating dynamic sophisticated styles, instead of having to specify them in XML. There are, however, easily found example style definitions in XML; a simple query in the meta-data views of MapViewer can also give you the needed XML definition templates.

Conclusion
The various programmatic interfaces and engines that Oracle offers allow users to build dynamic Web mapping applications that meet Web 2.0 "standards" of simplicity and focus relatively quickly. However, it may be very difficult and very costly to improve the quality of the map display.

There is no doubt that Oracle technologies allow for a better linking of relational data and map data compared with other mapping tools and engines. As long as developers remain aware of the specific limitations inherent in the various components, high quality and robust applications can be created with minimum effort, and will both strengthen and greatly improve the value of corporate data, while offering excellent performance.

Share

Sharing is Caring


Geospatial Newsletters

Keep up to date with the latest geospatial trends!

Sign up

Search DM

Get Directions Magazine delivered to you
Please enter a valid email address
Please let us know that you're not a robot by using reCAPTCHA.
Sorry, there was a problem submitting your sign up request. Please try again or email editors@directionsmag.com

Thank You! We'll email you to verify your address.

In order to complete the subscription process, simply check your inbox and click on the link in the email we have just sent you. If it is not there, please check your junk mail folder.

Thank you!

It looks like you're already subscribed.

If you still experience difficulties subscribing to our newsletters, please contact us at editors@directionsmag.com