Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wdb:manuals:wdb_metadata [2012-06-14 21:05:06]
michaeloa
wdb:manuals:wdb_metadata [2022-05-31 09:29:32] (current)
Line 160: Line 160:
 ==== Add place Definitions ==== ==== Add place Definitions ====
  
-There are various differing functions to add a place definition to the database, depending on the type of place definition to be added. The function wci.addplacepoint is used for adding point data, while wci.addplaceregulargrid is used to define regular grids as follows.+There are various differing functions to add a place definition to the database, depending on the type of place definition to be added. The function wci.addplacepoint is used for adding point data, while wci.addplaceregulargrid is used to define regular grids as follows:
  
-  select wci.addplacepoint( 'oslo', +  select wci.addplacepoint('oslo', 
-                            'POINT(10.7564 59.9494)' );+                           st_geomfromtext('POINT(10.7464 59.9111)',4030));
  
-The first parameter in the function is the place name, while the second is the geographical position of the place definition in the default coordinate system of the WDB instance.+The first parameter in the function is the place name, while the second is the geographical position of the place definition in the default coordinate system of the WDB instance (as a binary geometry). Note that the SRID provided must be the same as the default PostGIS SRID used to build WDB (by default, this tends to be PostGIS ID 4030).
  
   select wci.addplaceregulargrid( 'ecmwf 0.5 grid',   select wci.addplaceregulargrid( 'ecmwf 0.5 grid',
Line 179: Line 179:
  
 The fifth parameter is a comment field. Ideally, it contains a few brief lines of text that describe and explain the data provider entity. The fifth parameter is a comment field. Ideally, it contains a few brief lines of text that describe and explain the data provider entity.
- 
 ==== Adding a Place Definition ==== ==== Adding a Place Definition ====
  
Line 188: Line 187:
 ==== Spatial Reference ID ====  ==== Spatial Reference ID ==== 
  
 +All SRIDs must be defined with "+no_defs". Not including the "+no_defs" parameter in the PROJ.4 transformation string makes the SRID dependent on the /usr/share/proj/proj_def.dat, essentially breaking the integrity of the metadata in the database.
 ==== Setting a Place Name ==== ==== Setting a Place Name ====
  
Line 264: Line 264:
  
 The default (canonical) parameter name is constructed using the various components described above. The default (canonical) parameter name is constructed using the various components described above.
 +
 +For examples of adding new parameters to WDB, see the [[https://github.com/wdb/wdb/blob/master/etc/metadata/wdb_parameter.in.sql|wdb_parameters]] install files.
  
 ==== Set Parameter Names in Namespace ==== ==== Set Parameter Names in Namespace ====
Line 279: Line 281:
 Parameters created using this method are similar to the CF standard name, except that the short form of the CF methods precedes the CF standard name in order to generate a more natural language parameter description. Thus 'air temperature [maximum over days]' becomes 'max air temperature'. Parameters created using this method are similar to the CF standard name, except that the short form of the CF methods precedes the CF standard name in order to generate a more natural language parameter description. Thus 'air temperature [maximum over days]' becomes 'max air temperature'.
  
 +For an example of adapting and adding parameters to a private parameter namespace, see the [[https://github.com/metno/wdb-metadata/blob/master/etc/wdb_parameter.in.sql|Met.no WDB metadata files]].
  • wdb/manuals/wdb_metadata.1339707906.txt.gz
  • Last modified: 2022-05-31 09:23:29
  • (external edit)