Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

One of the off-shoots of the OWS-3 was an understanding of how to hook smbology into our code base.

This page is the result of a conversation with Theuns (who may be available for testing); written up for the amusement of Andrea Aime (and also so when the next 20 people ask I can point you to this page).

There were four solutions considered:

  1. create a custom web app to generate the symbol; refer to it as an external url "http://server.host.net/symbol?foo"
  2. create a custom URL format "internal:foo"
  3. create a GeoTools function that produces an Icon directly; and modify the renderer to expect a URL or Icon
  4. create a plug-in system allowing the definition of additional "WellKnownName"s

The last one ends up looking the best in practice.

(warning) Some MIL2525B symbols need to interact with Feature contents; they end up displaying the "width" of an advancing unit etc...

Code Block
interface WellKnownNameIconFactory {
  boolean isKnown( String wellKnownName );
  Icon getIcon( Feature feature, String wellKnownName );
}
Code Block
class WellKnownNameIconFinder {
  Icon findIcon( String wellKnownName );
}