|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.factory.AbstractFactory
org.geotools.referencing.factory.ReferencingFactory
org.geotools.referencing.factory.AbstractAuthorityFactory
org.geotools.referencing.factory.DirectAuthorityFactory
org.geotools.referencing.factory.PropertyAuthorityFactory
public class PropertyAuthorityFactory
Default implementation for a coordinate reference system authority factory backed by a property file. This gives some of the benificts of using the EPSG database backed authority factory (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
.
Field Summary |
---|
Fields inherited from class org.geotools.referencing.factory.DirectAuthorityFactory |
---|
factories |
Fields inherited from class org.geotools.referencing.factory.ReferencingFactory |
---|
LOGGER |
Fields inherited from class org.geotools.factory.AbstractFactory |
---|
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority |
Constructor Summary | |
---|---|
PropertyAuthorityFactory(ReferencingFactoryContainer factories,
org.opengis.metadata.citation.Citation[] authorities,
java.net.URL definitions)
Creates a factory for the specified authorities from the specified file. |
|
PropertyAuthorityFactory(ReferencingFactoryContainer factories,
org.opengis.metadata.citation.Citation authority,
java.net.URL definitions)
Creates a factory for the specified authority from the specified file. |
Method Summary | |
---|---|
org.opengis.referencing.crs.CoordinateReferenceSystem |
createCoordinateReferenceSystem(java.lang.String code)
Returns a coordinate reference system from a code. |
org.opengis.referencing.IdentifiedObject |
createObject(java.lang.String code)
Returns an arbitrary object from a code. |
org.opengis.metadata.citation.Citation |
getAuthority()
Returns the organization or party responsible for definition and maintenance of the database. |
java.util.Set<java.lang.String> |
getAuthorityCodes(java.lang.Class<? extends org.opengis.referencing.IdentifiedObject> type)
Returns the set of authority codes of the given type. |
org.opengis.util.InternationalString |
getDescriptionText(java.lang.String code)
Gets a description of the object corresponding to a code. |
java.lang.String |
getWKT(java.lang.String code)
Returns the Well Know Text from a code. |
protected java.lang.String |
trimAuthority(java.lang.String code)
Trims the authority scope, if present. |
Methods inherited from class org.geotools.referencing.factory.DirectAuthorityFactory |
---|
getImplementationHints |
Methods inherited from class org.geotools.referencing.factory.ReferencingFactory |
---|
ensureNonNull, getVendor |
Methods inherited from class org.geotools.factory.AbstractFactory |
---|
addImplementationHints, equals, getPriority, hashCode, onDeregistration, onRegistration, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opengis.referencing.crs.CRSAuthorityFactory |
---|
createCompoundCRS, createDerivedCRS, createEngineeringCRS, createGeocentricCRS, createGeographicCRS, createImageCRS, createProjectedCRS, createTemporalCRS, createVerticalCRS |
Methods inherited from interface org.opengis.referencing.cs.CSAuthorityFactory |
---|
createCartesianCS, createCoordinateSystem, createCoordinateSystemAxis, createCylindricalCS, createEllipsoidalCS, createPolarCS, createSphericalCS, createTimeCS, createUnit, createVerticalCS |
Methods inherited from interface org.opengis.referencing.datum.DatumAuthorityFactory |
---|
createDatum, createEllipsoid, createEngineeringDatum, createGeodeticDatum, createImageDatum, createPrimeMeridian, createTemporalDatum, createVerticalDatum |
Methods inherited from interface org.opengis.referencing.Factory |
---|
getVendor |
Constructor Detail |
---|
public PropertyAuthorityFactory(ReferencingFactoryContainer factories, org.opengis.metadata.citation.Citation authority, java.net.URL definitions) throws java.io.IOException
factories
- The underlying factories used for objects creation.authority
- The organization or party responsible for definition and maintenance of
the database.definitions
- URL to the definition file.
java.io.IOException
- if the definitions can't be read.public PropertyAuthorityFactory(ReferencingFactoryContainer factories, org.opengis.metadata.citation.Citation[] authorities, java.net.URL definitions) throws java.io.IOException
"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.
factories
- The underlying factories used for objects creation.authorities
- The organizations or party responsible for definition
and maintenance of the database.definitions
- URL to the definition file.
java.io.IOException
- if the definitions can't be read.Method Detail |
---|
public org.opengis.metadata.citation.Citation getAuthority()
getAuthority
in interface org.opengis.referencing.AuthorityFactory
getAuthority
in class AbstractAuthorityFactory
public java.util.Set<java.lang.String> getAuthorityCodes(java.lang.Class<? extends org.opengis.referencing.IdentifiedObject> type) throws org.opengis.referencing.FactoryException
CoordinateReferenceSystem.class
asks for all authority codes accepted by
createGeographicCRS
,
createProjectedCRS
,
createVerticalCRS
,
createTemporalCRS
and their friends.ProjectedCRS.class
asks only for authority codes accepted by
createProjectedCRS
."PROJCS"
and "GEOGCS"
at the start of the WKT strings.
getAuthorityCodes
in interface org.opengis.referencing.AuthorityFactory
type
- The spatial reference objects type (may be Object.class
).
org.opengis.referencing.FactoryException
- if access to the underlying database failed.public java.lang.String getWKT(java.lang.String code) throws org.opengis.referencing.NoSuchAuthorityCodeException
code
- Value allocated by authority.
org.opengis.referencing.NoSuchAuthorityCodeException
- if the specified code
was not found.public org.opengis.util.InternationalString getDescriptionText(java.lang.String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.referencing.FactoryException
getDescriptionText
in interface org.opengis.referencing.AuthorityFactory
code
- Value allocated by authority.
null
if the object
corresponding to the specified code
has no description.
org.opengis.referencing.NoSuchAuthorityCodeException
- if the specified code
was not found.
org.opengis.referencing.FactoryException
- if the query failed for some other reason.public org.opengis.referencing.IdentifiedObject createObject(java.lang.String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.referencing.FactoryException
createObject
in interface org.opengis.referencing.AuthorityFactory
createObject
in class AbstractAuthorityFactory
code
- Value allocated by authority.
org.opengis.referencing.NoSuchAuthorityCodeException
- if the specified code
was not found.
org.opengis.referencing.FactoryException
- if the object creation failed for some other reason.AbstractAuthorityFactory.createCoordinateReferenceSystem(java.lang.String)
,
AbstractAuthorityFactory.createDatum(java.lang.String)
,
AbstractAuthorityFactory.createEllipsoid(java.lang.String)
,
AbstractAuthorityFactory.createUnit(java.lang.String)
public org.opengis.referencing.crs.CoordinateReferenceSystem createCoordinateReferenceSystem(java.lang.String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.referencing.FactoryException
createCoordinateReferenceSystem
in interface org.opengis.referencing.crs.CRSAuthorityFactory
createCoordinateReferenceSystem
in class AbstractAuthorityFactory
code
- Value allocated by authority.
org.opengis.referencing.NoSuchAuthorityCodeException
- if the specified code
was not found.
org.opengis.referencing.FactoryException
- if the object creation failed for some other reason.AbstractAuthorityFactory.createGeographicCRS(java.lang.String)
,
AbstractAuthorityFactory.createProjectedCRS(java.lang.String)
,
AbstractAuthorityFactory.createVerticalCRS(java.lang.String)
,
AbstractAuthorityFactory.createTemporalCRS(java.lang.String)
,
AbstractAuthorityFactory.createCompoundCRS(java.lang.String)
protected java.lang.String trimAuthority(java.lang.String code)
trimAuthority
in class AbstractAuthorityFactory
code
- The code to trim.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |