Class Citations
ResponsiblePartyImpl. But citations are an
exception since they are extensively referenced in the Geotools library, and handling citations requires some
convenience methods. They are factored out in this Citations class for clarity.
Citations may be about an organisation (e.g. OpenGIS), a
specification (e.g. WMS) or an authority that maintains definitions of codes
(e.g. EPSG). In the later case, the citation contains an identifier which is the namespace of the codes maintained by the authority. For example the identifier for the
EPSG citation is "EPSG", and EPSG codes look like "EPSG:4326".
- Since:
- 2.2
- Author:
- Martin Desruisseaux (IRD), Jody Garnett
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CitationThe WMS 1.1.1 "Automatic Projections" authority.static final CitationThe WMS 1.3.0 "Automatic Projections" authority.static final CitationThe WMS 1.3.0 "CRS" authority.static final CitationThe European Petroleum Survey Group authority.static final CitationThe ESRI organisation.static final CitationThe GeoTIFF specification.static final CitationThe Geotools project.static final CitationURL in the OGC namespace.static final CitationHTTP URI in the OGC namespace.static final CitationThe IAU organisation.static final CitationThe JEclipse ImageN library.static final CitationThe Open Geospatial consortium organisation.static final CitationThe OpenGIS consortium organisation.static final CitationThe Oracle organisation.static final CitationThe PostGIS project.static final CitationThe PROJ project.static final CitationURN in the OGC namespace.static final CitationThe Web Map Service specification. -
Method Summary
Modifier and TypeMethodDescriptionstatic CitationReturns a citation of the given name.static StringgetIdentifier(Citation citation) Returns the shortest identifier for the specified citation, or the title if there is no identifier.static booleanidentifierMatches(Citation citation, String identifier) Returnstrueif any identifiers in the given citation matches the given string.static booleanidentifierMatches(Citation c1, Citation c2) static booleantitleMatches(Citation citation, String title) static booleantitleMatches(Citation c1, Citation c2) Returnstrueif at least one title or alternate title inc1is equals to a title or alternate title inc2.
-
Field Details
-
OGC
The Open Geospatial consortium organisation. "Open Geospatial consortium" is the new name for "OpenGIS consortium". An alternate title for this citation is "OGC" (according ISO 19115, alternate titles often contain abreviations).- See Also:
-
OPEN_GIS
The OpenGIS consortium organisation. "OpenGIS consortium" is the old name for "Open Geospatial consortium". Alternate titles for this citation are "OpenGIS" and "OGC" (according ISO 19115, alternate titles often contain abreviations).- See Also:
-
ESRI
The ESRI organisation.- See Also:
-
ORACLE
The Oracle organisation.- See Also:
-
POSTGIS
The PostGIS project.- Since:
- 2.4
- See Also:
-
GEOTOOLS
The Geotools project.- See Also:
-
IAU
The IAU organisation.- See Also:
-
PROJ
The PROJ project.- See Also:
-
WMS
The Web Map Service specification. Alternate titles for this citation are "WMS", "WMS 1.3.0", "OGC 04-024" and "ISO 19128". Note that the version numbers may be upgrated in future Geotools versions. -
GEOTIFF
The GeoTIFF specification.- See Also:
-
IMAGEN
The JEclipse ImageN library. An alternate title for this citation is "ImageN" (according ISO 19115, alternate titles often contain abbreviations).- See Also:
-
EPSG
The European Petroleum Survey Group authority. An alternate title for this citation is "EPSG" (according ISO 19115, alternate titles often contain abreviations). In addition, this citation contains the "EPSG" identifier for the "Authority name" identifier type.This citation is used as an authority for coordinate reference system identifiers. When searching an CRS authority factory on EPSG data, Geotools compares the
"EPSG"string against the identifiers (or against the title and alternate titles if there is no identifier) using theidentifierMatchesmethod.- See Also:
-
AUTO
The WMS 1.1.1 "Automatic Projections" authority. An alternate title for this citation is "AUTO" (according ISO 19115, alternate titles often contain abreviations). In addition, this citation contains the "AUTO" identifier for the "Authority name" identifier type.Warning:
AUTOis different fromAUTO2used for WMS 1.3.0.This citation is used as an authority for coordinate reference system identifiers. When searching an CRS authority factory on AUTO data, Geotools compares the
"AUTO"string against the identifiers (or against the title and alternate titles if there is no identifier) using theidentifierMatchesmethod. -
AUTO2
The WMS 1.3.0 "Automatic Projections" authority. An alternate title for this citation is "AUTO2" (according ISO 19115, alternate titles often contain abreviations). In addition, this citation contains the "AUTO2" identifier for the "Authority name" identifier type.Warning:
AUTO2is different fromAUTOused for WMS 1.1.1 and earlier.This citation is used as an authority for coordinate reference system identifiers. When searching an CRS authority factory on AUTO2 data, Geotools compares the
"AUTO2"string against the identifiers (or against the title and alternate titles if there is no identifier) using theidentifierMatchesmethod. -
CRS
The WMS 1.3.0 "CRS" authority. This is defined in the same document thanAUTO2. -
URN_OGC
URN in the OGC namespace. This citation contains the"urn:ogc:def"and"urn:x-ogc:def"identifiers for the "Authority name" identifier type.- Since:
- 2.4
-
HTTP_OGC
URL in the OGC namespace. This citation contains the"http://www.opengis.net/gml"identifiers for the "Authority name" identifier type.- Since:
- 2.4
-
HTTP_URI_OGC
HTTP URI in the OGC namespace. This citation contains the"http://www.opengis.net/def"identifiers for the "Authority name" identifier type.- Since:
- 9
-
-
Method Details
-
fromName
Returns a citation of the given name. If the given name matches a title or an alternate titles of one of the pre-defined constants (EPSG,GEOTIFF, etc.), then this constant is returned. Otherwise, a new citation is created with the specified name as the title.- Parameters:
title- The citation title (or alternate title).- Returns:
- A citation using the specified name
-
titleMatches
Returnstrueif at least one title or alternate title inc1is equals to a title or alternate title inc2. The comparaison is case-insensitive and ignores leading and trailing spaces. The titles ordering is not significant.- Parameters:
c1- The first citation to compare.c2- the second citation to compare.- Returns:
trueif at least one title or alternate title matches.
-
titleMatches
Returnstrueif the title or any alternate title in the given citation matches the given string. The comparaison is case-insensitive and ignores leading and trailing spaces.- Parameters:
citation- The citation to check for.title- The title or alternate title to compare.- Returns:
trueif the title or alternate title matches the given string.
-
identifierMatches
Returnstrueif at least one identifier inc1is equals to an identifier inc2. The comparaison is case-insensitive and ignores leading and trailing spaces. The identifier ordering is not significant.If (and only if) the citations do not contains any identifier, then this method fallback on titles comparaison using the
titleMatchesmethod. This fallback exists for compatibility with client codes using citation titles without identifiers.- Parameters:
c1- The first citation to compare.c2- the second citation to compare.- Returns:
trueif at least one identifier, title or alternate title matches.
-
identifierMatches
Returnstrueif any identifiers in the given citation matches the given string. The comparaison is case-insensitive and ignores leading and trailing spaces. If (and only if) the citation do not contains any identifier, then this method fallback on titles comparaison using thetitleMatchesmethod. This fallback exists for compatibility with client codes using citation titles without identifiers.- Parameters:
citation- The citation to check for.identifier- The identifier to compare.- Returns:
trueif the title or alternate title matches the given string.
-
getIdentifier
Returns the shortest identifier for the specified citation, or the title if there is no identifier. This method is useful for extracting the namespace from an authority, for example"EPSG".- Parameters:
citation- The citation for which to get the identifier.- Returns:
- The shortest identifier of the given citation.
- Since:
- 2.4
-