|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cts.CRSFactory
public class CRSFactory
This factory is in charge of creating new
CoordinateReferenceSystems. It can do so by two way :
Case 1 :
CoordinateReferenceSystem from a text
file will be delegated to one of RegistryManager's
registries. If RegistryManager don't know the
authority of the CRS, an exception is returned.Case 2 :
CoordinateReferenceSystem from a OGC
WKT String (PRJ) will be delegated to the
PrjParser.This class also manages a Cache which return
CoordinateReferenceSystems which have already been
parsed.
| Nested Class Summary | |
|---|---|
class |
CRSFactory.CRSCache<K,V>
A simple cache to manage CoordinateReferenceSystem |
| Field Summary | |
|---|---|
protected CRSFactory.CRSCache<String,CoordinateReferenceSystem> |
CRSPOOL
|
| Constructor Summary | |
|---|---|
CRSFactory()
Creates a new factory. |
|
| Method Summary | |
|---|---|
CoordinateReferenceSystem |
createFromPrj(File file)
Creates a CoordinateReferenceSystem defined by an OGC WKT String
(PRJ). |
CoordinateReferenceSystem |
createFromPrj(InputStream stream)
Creates a CoordinateReferenceSystem defined by an OGC WKT String
(PRJ). |
CoordinateReferenceSystem |
createFromPrj(InputStream stream,
Charset encoding)
Creates a CoordinateReferenceSystem defined by an OGC WKT String
(PRJ). |
CoordinateReferenceSystem |
createFromPrj(String prjString)
Creates a CoordinateReferenceSystem defined by an OGC WKT String
(PRJ). |
CoordinateReferenceSystem |
getCRS(String authorityAndSrid)
Return a CoordinateReferenceSystem corresponding to
an authority and a srid. |
RegistryManager |
getRegistryManager()
Return the RegistryManager used in CTS. |
Set<String> |
getSupportedCodes(String registryName)
Return a list of supported codes according an registryName. |
boolean |
isRegistrySupported(String registryName)
Check if the registry name (ie EPSG, IGNF...) is supported. |
String[] |
splitRegistryNameAndCode(String authorityAndSrid)
Return the registry name and the code in a string array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final CRSFactory.CRSCache<String,CoordinateReferenceSystem> CRSPOOL
| Constructor Detail |
|---|
public CRSFactory()
| Method Detail |
|---|
public CoordinateReferenceSystem getCRS(String authorityAndSrid)
throws CRSException
CoordinateReferenceSystem corresponding to
an authority and a srid.
authorityAndSrid - the code of the desired CRS (for instance
EPSG:4326 or IGNF:LAMBE)
CRSException
public String[] splitRegistryNameAndCode(String authorityAndSrid)
throws RegistryException
authorityAndSrid - a string following the pattern "name:code"
RegistryExceptionpublic RegistryManager getRegistryManager()
RegistryManager used in CTS.
public boolean isRegistrySupported(String registryName)
throws RegistryException
registryName - (ex : ESPG, IGNF, ESRI)
RegistryException
public CoordinateReferenceSystem createFromPrj(String prjString)
throws CRSException
CoordinateReferenceSystem defined by an OGC WKT String
(PRJ).
prjString - the OGC WKT String defining the CRS
CRSException
public CoordinateReferenceSystem createFromPrj(InputStream stream,
Charset encoding)
throws IOException,
CRSException
CoordinateReferenceSystem defined by an OGC WKT String
(PRJ).
stream - the input stream of bytes defining the OGC WKT Stringencoding - the charset used to read the input stream
IOException
CRSException
public CoordinateReferenceSystem createFromPrj(InputStream stream)
throws IOException,
CRSException
CoordinateReferenceSystem defined by an OGC WKT String
(PRJ).
stream - the input stream of bytes defining the OGC WKT String
IOException
CRSException
public CoordinateReferenceSystem createFromPrj(File file)
throws IOException,
CRSException
CoordinateReferenceSystem defined by an OGC WKT String
(PRJ).
file - containing the OGC WKT String that defined the desired CRS
IOException - if there is a problem reading the file
CRSException
public Set<String> getSupportedCodes(String registryName)
throws RegistryException
registryName - (ex : EPSG, IGNF, ESRI)
RegistryException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||