Installs additional features, for example additional spatial features.
sa_install_feature( feat_name )
A LONG VARCHAR parameter that identifies the feature to install. The default is NULL. The supported feature names are:
Value | Description |
---|---|
st_geometry_predefined_uom | Installs predefined units of measure that are not installed by default in new databases. |
st_geometry_predefined_srs | Installs predefined spatial reference systems and units of measure that are not installed by default in new databases. |
st_geometry_compat_func | Installs a set of spatial compatibility functions. These functions can be used as an alternative to the spatial methods. |
Feature name definitions are provided in the st_geometry_config.tgz file located in the %SQLANY17%\scripts directory. If the file is removed and you attempt to install features that are dependent on the file, an error is returned.
You can query the feat_name value to see what will be installed. For example, the following query returns the units of measure that would be installed for st_geometry_predefined_uom.
SELECT * FROM st_geometry_predefined_uom( 'CREATE' );
The previous example also shows you parameter names so you can query for specific values using a WHERE clause. For example, the following statement queries the unit_name parameter for the chain unit of measure:
SELECT * FROM st_geometry_predefined_uom( 'CREATE' ) WHERE unit_name='chain';
unit_name | unit_type | conversion_factor | ... |
---|---|---|---|
chain | LINEAR | 20.1168 | ... |
The following returns all units of measure that are based on foot:
SELECT * FROM st_geometry_predefined_uom() WHERE unit_name LIKE '%foot%';
Use the following query to find the spatial reference systems that would be installed:
SELECT * FROM st_geometry_predefined_srs();
The following statement queries for a spatial reference system by organization and organization_coordsys_id:
SELECT * FROM st_geometry_predefined_srs() WHERE organization='EPSG' AND organization_coordsys_id=2295;
You must have EXECUTE privilege on the system procedure.
For st_geometry_predefined_uom and st_geometry_predefined_srs, you must also have the MANAGE ANY SPATIAL OBJECT system privilege.
For st_geometry_compat_func, you must also have the MANAGE ANY OBJECT PRIVILEGE, CREATE ANY PROCEDURE, and SELECT ANY TABLE system privileges.
For sa_install_feature, you must also have the MANAGE ANY SPATIAL OBJECT system privilege.
The following statement installs all of the predefined units of measure that are not installed by default in a new database:
CALL sa_install_feature( 'st_geometry_predefined_uom' );
The following statement installs a set of spatial compatibility functions which can be used as an alternative to the spatial methods:
CALL sa_install_feature( 'st_geometry_compat_func' );