Class SpatialReferenceIGNFCRSAuthorityFactory

java.lang.Object
org.geotools.util.factory.AbstractFactory
org.jorigin.geotools.referencing.spatialreference.SpatialReferenceCRSAuthorityFactory
org.jorigin.geotools.referencing.spatialreference.SpatialReferenceIGNFCRSAuthorityFactory
All Implemented Interfaces:
org.geotools.api.referencing.AuthorityFactory, org.geotools.api.referencing.crs.CRSAuthorityFactory, org.geotools.api.referencing.Factory, org.geotools.util.factory.Factory, org.geotools.util.factory.RegistrableFactory

public class SpatialReferenceIGNFCRSAuthorityFactory extends SpatialReferenceCRSAuthorityFactory
A CRSAuthorityFactory that request Coordinates References System from the spatialreference.org for the authority Institut national de l'information Géographique et Forestiere (IGN). This factory can process coordinates reference system with code "IGNF:XXXX".
Author:
Julien SEINTURIER - Université de Toulon / CNRS LIS umr 7020 - github.com/jseinturier (julien.seinturier@univ-tln.fr)
  • Field Details

  • Constructor Details

    • SpatialReferenceIGNFCRSAuthorityFactory

      public SpatialReferenceIGNFCRSAuthorityFactory()
      Create a new spatialreference.org CRS factory for IGNF authority.
  • Method Details

    • getDefault

      public static org.geotools.api.referencing.crs.CRSAuthorityFactory getDefault() throws IOException
      Returns a default coordinate system factory backed by the spatialreference.org website.
      Returns:
      The default factory.
      Throws:
      IOException - if the connection to the spatialreference.org website cannot be established.
    • getAuthority

      public org.geotools.api.metadata.citation.Citation getAuthority()
    • getAuthorityCodes

      public Set<String> getAuthorityCodes(Class clazz) throws org.geotools.api.referencing.FactoryException
      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:
      • 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.
      The following implementaiton filters the set of codes based on the "PROJCS" and "GEOGCS" at the start of the WKT strings. It is assumed that we only have GeographicCRS and ProjectedCRS's here.
      Parameters:
      clazz - The spatial reference objects type (may be Object.class).
      Returns:
      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 method returns an empty set.
      Throws:
      org.geotools.api.referencing.FactoryException - if access to the underlying database failed.