Class SpatialReferenceConnector

java.lang.Object
org.jorigin.geotools.referencing.spatialreference.SpatialReferenceConnector

public class SpatialReferenceConnector extends Object
This class enable to connect to spatialreference.org and download Coordinates Reference Systems data from it.
Author:
Julien SEINTURIER - Université de Toulon / CNRS LIS umr 7020 - github.com/jseinturier (julien.seinturier@univ-tln.fr)
  • Field Details

  • Constructor Details

    • SpatialReferenceConnector

      public SpatialReferenceConnector()
      Construct a default connector to spatialreference.org.
  • Method Details

    • getFormat

      public String getFormat()
      Get the format of the server response.
      Returns:
      the format of the server response
      See Also:
    • setFormat

      public void setFormat(String format)
      Set the format of the server response.
      Parameters:
      format - the format of the server response
      See Also:
    • getServerURL

      public String getServerURL()
      Get the server URL.
      Returns:
      the server URL
      See Also:
    • setServerURL

      public void setServerURL(String url)
      Set the server URL.
      Parameters:
      url - the server URL
    • getURLString

      protected String getURLString(String authority, String number)
      Get the URL String that correspond to the given coordinates reference system identified by its authority and number.
      Parameters:
      authority - the authority of the coordinates reference system
      number - the number coordinates reference system
      Returns:
      the URL String that correspond to the given coordinates reference system
      See Also:
    • getURL

      protected URL getURL(String authority, String number) throws MalformedURLException
      Get the URL that correspond to the given coordinates reference system identified by its authority and number.
      Parameters:
      authority - the authority of the coordinates reference system
      number - the number coordinates reference system
      Returns:
      the URL that correspond to the given coordinates reference system
      Throws:
      MalformedURLException - if an error occurs
      See Also:
    • loadData

      protected String loadData(String authority, String number) throws org.geotools.api.referencing.FactoryException
      Load the data provided by a request to the web server for the given coordinates reference system identified by its authority and number.
      Parameters:
      authority - the authority of the coordinates reference system
      number - the number coordinates reference system
      Returns:
      the data provided by a request to the web server for the given coordinates reference system
      Throws:
      org.geotools.api.referencing.FactoryException - if an error occurs
      See Also: