| org.geotools.referencing.factory.ReferencingFactory org.geotools.referencing.factory.AbstractAuthorityFactory org.geotools.referencing.factory.DirectAuthorityFactory org.geotools.referencing.factory.PropertyAuthorityFactory
PropertyAuthorityFactory | public class PropertyAuthorityFactory extends DirectAuthorityFactory implements CRSAuthorityFactory,CSAuthorityFactory,DatumAuthorityFactory(Code) | | Default implementation for a coordinate reference system authority factory
backed by a property file. This gives some of the benificts of using the
(for example), in a portable property file.
This factory doesn't cache any result. Any call to a
createFoo method will trig a new
WKT parsing. For caching, this factory should be wrapped in some buffered factory like
BufferedAuthorityFactory .
since: 2.1 version: $Id: PropertyAuthorityFactory.java 29104 2008-02-06 16:00:14Z aaime $ author: Jody Garnett author: Rueben Schulz author: Martin Desruisseaux |
Method Summary | |
public CoordinateReferenceSystem | createCoordinateReferenceSystem(String code) Returns a coordinate reference system from a code. | public IdentifiedObject | createObject(String code) Returns an arbitrary object from a code. | public Citation | getAuthority() Returns the organization or party responsible for definition and maintenance of the
database. | public Set | getAuthorityCodes(Class type) Returns the set of authority codes of the given type. | public InternationalString | getDescriptionText(String code) Gets a description of the object corresponding to a code.
Parameters: code - Value allocated by authority. | public String | getWKT(String code) Returns the Well Know Text from a code.
Parameters: code - Value allocated by authority. | protected String | trimAuthority(String code) Trims the authority scope, if present. |
PropertyAuthorityFactory | public PropertyAuthorityFactory(ReferencingFactoryContainer factories, Citation authority, URL definitions) throws IOException(Code) | | Creates a factory for the specified authority from the specified file.
Parameters: factories - The underlying factories used for objects creation. Parameters: authority - The organization or party responsible for definition and maintenance ofthe database. Parameters: definitions - URL to the definition file. throws: IOException - if the definitions can't be read. |
PropertyAuthorityFactory | public PropertyAuthorityFactory(ReferencingFactoryContainer factories, Citation[] authorities, URL definitions) throws IOException(Code) | | Creates a factory for the specified authorities from the specified file. More than
one authority may be specified when the CRS to create should have more than one
, each with the same
code but different namespace. For example a
uses the
"ESRI" namespace, but also the
"EPSG" namespace
because those CRS are used as extension of the EPSG database. Concequently, the same
CRS can be identified as
"ESRI:53001" and
"EPSG:53001" , where
"53001" is a unused code in the official EPSG database.
Parameters: factories - The underlying factories used for objects creation. Parameters: authorities - The organizations or party responsible for definitionand maintenance of the database. Parameters: definitions - URL to the definition file. throws: IOException - if the definitions can't be read. since: 2.4 |
createCoordinateReferenceSystem | public CoordinateReferenceSystem createCoordinateReferenceSystem(String code) throws NoSuchAuthorityCodeException, FactoryException(Code) | | Returns a coordinate reference system from a code. If the object type is know at compile
time, it is recommended to invoke the most precise method instead of this one.
Parameters: code - Value allocated by authority. throws: NoSuchAuthorityCodeException - if the specified code was not found. throws: FactoryException - if the object creation failed for some other reason. |
createObject | public IdentifiedObject createObject(String code) throws NoSuchAuthorityCodeException, FactoryException(Code) | | Returns an arbitrary object from a code. If the object type is know at compile time, it is
recommended to invoke the most precise method instead of this one.
Parameters: code - Value allocated by authority. throws: NoSuchAuthorityCodeException - if the specified code was not found. throws: FactoryException - if the object creation failed for some other reason. |
getAuthority | public Citation getAuthority()(Code) | | Returns the organization or party responsible for definition and maintenance of the
database.
|
getAuthorityCodes | public Set getAuthorityCodes(Class type) throws FactoryException(Code) | | Returns the set of authority codes of the given type. The type
argument specify the base class. For example if this factory is
an instance of CRSAuthorityFactory, then:
The default implementaiton filters the set of codes based on the
"PROJCS" and
"GEOGCS" at the start of the WKT strings.
Parameters: type - The spatial reference objects type (may be Object.class ). The set of authority codes for spatial reference objects of the given type.If this factory doesn't contains any object of the given type, then this methodreturns an empty set. throws: FactoryException - if access to the underlying database failed. |
getDescriptionText | public InternationalString getDescriptionText(String code) throws NoSuchAuthorityCodeException, FactoryException(Code) | | Gets a description of the object corresponding to a code.
Parameters: code - Value allocated by authority. A description of the object, or null if the objectcorresponding to the specified code has no description. throws: NoSuchAuthorityCodeException - if the specified code was not found. throws: FactoryException - if the query failed for some other reason. |
getWKT | public String getWKT(String code) throws NoSuchAuthorityCodeException(Code) | | Returns the Well Know Text from a code.
Parameters: code - Value allocated by authority. The Well Know Text (WKT) for the specified code. throws: NoSuchAuthorityCodeException - if the specified code was not found. |
trimAuthority | protected String trimAuthority(String code)(Code) | | Trims the authority scope, if present. If more than one authority were given at
, then any of them may appears as the scope in the supplied code.
Parameters: code - The code to trim. The code without the authority scope. |
|
|