Upgrading to METAMOD 2.13 from 2.12

PostgreSQL 9.1

METAMOD now supports initializing databases on servers running PostgreSQL 9.1. Previous versions only supported running v.9 clients against v.8 servers.

Support for PostgreSQL 8.2 and earlier have been disabled to avoid unneccessary errors, but may be reenabled by editing base/init/createdb.sh (ca. line 80).

Dependency libraries

Metamod now contains all necessary Perl dependencies included in the Debian package. The previous metno-perl-webdev-ver1 package will no longer work since METAMOD 2.13 now requires Catalyst 5.9.

If installing from source, you must build the necessary Perl modules yourself, preferably in a local lib using Carton. See Installation for details.

Configuration

lsconf

A new utility lsconf has been added to check current configuration settings:

  $ ./lsconf [--config <config file or dir>] [--split] [<variable>]

The following

Deprecated configuration settings

The following directives have been deprecated and should be removed from master_config.txt (they are now defined in default_config.txt and only used in case WMS_MAPS should happen to be unset):

WMS_BACKGROUND_MAPSERVER
WMS_NORTHPOLE_MAP
WMS_SOUTHPOLE_MAP
WMS_WORLD_MAP

In addition, CATALYST_LIB is now automatically computed and should be unset in master_config.txt, unless your dependencies are located somewhere else than in the METAMOD tree.

New WMS features

WMS background maps

The WMS background map configuration, which due to technical difficulties was hardcoded in earlier versions is now fully configurable. In addition, several WMS maps have been made available as a public service and are ready configured in default_config.txt:

  WMS_MAPS =
      EPSG:32661  http://public-wms.met.no/backgroundmaps/northpole.map
      EPSG:32761  http://public-wms.met.no/backgroundmaps/southpole.map
      EPSG:4326   http://public-wms.met.no/backgroundmaps/world.map
      EPSG:3408   http://public-wms.met.no/backgroundmaps/northpole.map
      EPSG:3409   http://public-wms.met.no/backgroundmaps/southpole.map
      EPSG:3410   http://public-wms.met.no/backgroundmaps/world.map
      EPSG:3411   http://public-wms.met.no/backgroundmaps/northpole.map
      EPSG:3412   http://public-wms.met.no/backgroundmaps/southpole.map
      EPSG:3413   http://public-wms.met.no/backgroundmaps/northpole.map
      EPSG:3995   http://public-wms.met.no/backgroundmaps/northpole.map
      EPSG:3031   http://public-wms.met.no/backgroundmaps/southpole.map
      EPSG:32633  http://public-wms.met.no/backgroundmaps/world.map

To replace or extend this list, copy the whole directive to master_config.txt and edit as desired.

Names and bounding boxes are also defined in default_config.txt under WMS_PROJECTIONS and WMS_BOUNDING_BOXES, but may be overridden in master_config.txt.

Dynamic map search

The static maps in the search interface for the non-standard projections EPSG:93031 and 93995 have now been deprecated, in favour of dynamic WMS maps. These will automatically be enabled if any of your search projections (defined in SRID_ID_COLUMNS) have a corresponding URL defined in WMS_MAPS as described above.

From 2.13 the default SRID_ID_COLUMNS are:

  SRID_ID_COLUMNS = 93995 93031 3995 3031 4326

The first two are only used for stored searches. The last three are available for dynamic map search using the maps at public-wms.met.no.

To enable new SRIDs you need to re-initialize the metadata database and re-import all datasets (preferably by running base/init/create_and_load_all.sh). Make sure to remove/edit any SRID_ID_COLUMNS in master_config.txt so it doesn't override the default configuration.

Since it is not possible to mix static and dynamic maps (and the previous projections EPSG:93031 and 93995 are difficult to support in WMS) you must set up WMS maps for all the additional SRIDS you want to support searching in. Existing stored searches (as in Subscriptions) will continue to run as long as the projections are included in SRID_ID_COLUMNS, but they cannot be edited.

Running under older PostgreSQL version (8.x)

WMS map search is officially only supported using PostgreSQL 9.x. For older versions, make sure the new SRIDs are supported in your current version of PostGIS:

  # select auth_srid from spatial_ref_sys where auth_name='EPSG' and auth_srid in(3995, 3031, 4326);
   auth_srid
  -----------
        4326
        3031
        3995
  (3 rows)

In case any of these projections are missing you must either install support for them using data from spatialreference.org or remove them from SRID_ID_COLUMNS, otherwise create_and_load_all.sh will probably fail.