SmartMet Server is a data and product server for MetOcean data. It provides a high capacity and high availability data and product server for MetOcean data. The server is written in C++, since 2008 it has been in operational use by the Finnish Meteorological Institute FMI.
The SmartMet autocmplete plugin provides an efficient and a fast method for completing the search locations. It provides the location information enriched with simple weather information. The figure below shows how the autocomplete plugin suggests several location information when we start to type a search location "de".
The main idea is to provide a Google Suggest type API geographic information stored in the fminames database. Autocomplete is a feature of the Places library in the Google Maps JavaScript API. The autocomplete API can provide a type-ahead-search behavior of the Google Maps search field. When a user starts typing an address, autocomplete will fill in the rest.
The main features offered by the plugin are as follows: 1.JSON output 2.Keyword identifies set of allowed locations 3.Language selection 4.Pretty printing for debugging purposes 5.Product specific customization of forecast parameters 6. Pagination of results
Below we describe the query string options. The default value for each option is given in parenthesis. If there is no default value specified, the option is compulsory.
The keyword identifies the set of locations enabled in autocomplete. The allowed keywords are listed in
fminames.keywords
and the locations for each keyword in
fminames.keywords_has_geonames
Since Aug 4th 2021 the keyword may be a comma separated list. This enables one to join search results say from city names, amusement parks, golf courses etc.
The pattern is the beginning of the location name usually typed by the user. SmartMet server converts the UTF8 input to iso-latin-8859-1 and to lower case to make comparisons easier. The collation sevices are in use.
The selected language using a 2-character language ISO-code. If no specific translation exists for a location, the primary name for the location will be returned.
The number of results to return in one page.
The page number. This option works in conjuction with the maxresults option.
This option is deprecated. PHP-serialization used to be supported, but the support was terminated when json_spirit was taken into use.
Pretty print is used mostly for debugging purposes (and regression tests to spot changes more easily).
Identify a product name to add localized forecast data to the output. The allowed product names are listed in a table.
autocomplete.products
and the forecast parameters for each product in
and the forecast parameters for each product in
autocomplete.parameters
The default is not to include a forecast in the output.
The output format as supported by MacGyver::TimeFormatter (iso, xml, timestamp, sql).
Localization may be used for formatting locale specific forecast parameters.
Alternate forecast start time used only for creating static regression tests.
The same options as used in the pointforecast-plugin are available for formatting floating point values:
- missingtext
- width
- fill
- adjustfield
- showpos
- uppercase
- floatfield
SmartMet Server can be dockerized. This tutorial explains how to explains how to configure the Autocomplete plugin of the SmartMet Server when using Docker.