Class SpatialReferenceConnector
java.lang.Object
org.jorigin.geotools.referencing.spatialreference.SpatialReferenceConnector
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a default connector to spatialreference.org. -
Method Summary
Modifier and TypeMethodDescriptionGet the format of the server response.Get the server URL.protected URLGet theURLthat correspond to the given coordinates reference system identified by itsauthorityandnumber.protected StringgetURLString(String authority, String number) Get the URL String that correspond to the given coordinates reference system identified by itsauthorityandnumber.protected StringLoad the data provided by a request to the web server for the given coordinates reference system identified by itsauthorityandnumber.voidSet the format of the server response.voidsetServerURL(String url) Set the server URL.
-
Field Details
-
FORMAT_OGCWKT
-
FORMAT_ESRI_WKT
-
-
Constructor Details
-
SpatialReferenceConnector
public SpatialReferenceConnector()Construct a default connector to spatialreference.org.
-
-
Method Details
-
getFormat
Get the format of the server response.- Returns:
- the format of the server response
- See Also:
-
setFormat
Set the format of the server response.- Parameters:
format- the format of the server response- See Also:
-
getServerURL
-
setServerURL
-
getURLString
Get the URL String that correspond to the given coordinates reference system identified by itsauthorityandnumber.- Parameters:
authority- the authority of the coordinates reference systemnumber- the number coordinates reference system- Returns:
- the URL String that correspond to the given coordinates reference system
- See Also:
-
getURL
Get theURLthat correspond to the given coordinates reference system identified by itsauthorityandnumber.- Parameters:
authority- the authority of the coordinates reference systemnumber- 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 itsauthorityandnumber.- Parameters:
authority- the authority of the coordinates reference systemnumber- 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:
-