Citation
constants:
- Instances of
Citation
are references mostly for human reading. - Instances of
IdentifierSpace
provide the code spaces for identifiers (most often Coordinate Reference System identifiers) together with information about who maintains those identifiers.
"EPSG:4326"
is a widely-used identifier
for the “World Geodetic System (WGS) 1984” Coordinate Reference System (CRS).
The "4326"
part is the identifier code and
the "EPSG"
part is the identifier code space.
The meaning of codes in that code space is controlled by an authority,
the “EPSG Geodetic Parameter Dataset”. The cited
responsible party for the EPSG dataset is the “International Association of Oil & Gas producers” (IOGP).
The constants defined in this class are typically values returned by:
DefaultCitation.getIdentifiers()
for theISBN
andISSN
constants.ImmutableIdentifier.getAuthority()
for otherIdentifierSpace
constants.DefaultMetadata.getMetadataStandards()
for otherCitation
constants.
- Inferring an identifier from a citation (this is useful mostly with
IdentifierSpace
instances). - Determining if two instances can be considered the same
Citation
by comparing their titles or their identifiers.
- Since:
- 0.3
-
Field Summary
Modifier and TypeFieldDescriptionstatic final IdentifierSpace
<Integer> The authority for identifiers of objects defined by the EPSG Geodetic Parameter Dataset.static final IdentifierSpace
<String> The authority for identifiers of objects defined by ESRI.static final IdentifierSpace
<Integer> The authority for identifiers of objects defined by the the GeoTIFF specification.static final IdentifierSpace
<String> The International Standard Book Number (ISBN) defined by ISO-2108.The Geographic Information — Metadata standards defined by ISO 19115.static final IdentifierSpace
<String> The International Standard Serial Number (ISSN) defined by ISO-3297.static final IdentifierSpace
<Integer> The authority for identifiers of objects defined by MapInfo.static final IdentifierSpace
<String> The authority for identifiers of objects defined by the netCDF specification.static final IdentifierSpace
<String> The authority for identifiers found in specifications from the Open Geospatial Consortium.static final IdentifierSpace
<String> The authority for identifiers of objects defined by the PROJ project.static final IdentifierSpace
<Integer> The IHO transfer standard for digital hydrographic data specification.static final Citation
The codespace of objects that are specific to the Apache SIS project.static final IdentifierSpace
<String> The authority for identifiers of objects defined by the World Meteorological Organization.static final IdentifierSpace
<Integer> The authority for identifiers of objects defined by the Web Map Service (WMS) specification. -
Method Summary
Modifier and TypeMethodDescriptionstatic Citation
Returns a citation of the given identifier.static String
getIdentifier
(Citation citation) Infers an identifier from the given citation, or returnsnull
if no identifier has been found.static boolean
identifierMatches
(Citation citation, String identifier) Returnstrue
if at least one identifier in the given citation have a code matching the given string.static boolean
identifierMatches
(Citation c1, Citation c2) static boolean
titleMatches
(Citation citation, String title) static boolean
titleMatches
(Citation c1, Citation c2) Returnstrue
if at least one title or alternate title inc1
is leniently equal to a title or alternate title inc2
.static String
toCodeSpace
(Citation citation) Infers a code space from the given citation, or returnsnull
if none.static Citation[]
values()
Returns the values declared in thisCitations
class.
-
Field Details
-
ISO_19115
The Geographic Information — Metadata standards defined by ISO 19115. This list contains two standards published by the International Organization for Standardization:- ISO 19115-1 Geographic Information — Metadata Part 1: Fundamentals
- ISO 19115-2 Geographic Information — Metadata Part 2: Extensions for imagery and gridded data
MI_Band
andMD_Band
). This is why those standards are defined in a collection rather than as separated constants.Content and future evolution
The content of this list may vary in future Apache SIS versions depending on the evolution of standards and in the way that SIS support them. The current content is:- ISO 19115-1:2014 at index 0.
- ISO 19115-2:2019 at index 1.
Main usage
This value can be returned by:- Since:
- 0.6
-
EPSG
The authority for identifiers of objects defined by the EPSG Geodetic Parameter Dataset. EPSG is not an organization by itself, but is the identifier space managed by the International Association of Oil & Gas producers (IOGP) organization for Coordinate Reference System identifiers. EPSG is the default namespace of map projection method and parameter names in Apache SIS.Historical note: The EPSG acronym meaning was “European Petroleum Survey Group”. But this meaning does not apply anymore since the European and American associations merged into the “Association of Oil & Gas producers” (OGP), later renamed as IOGP. The legacy acronym now applies only to the database Coordinate Reference System definitions, known as “EPSG Geodetic Parameter Dataset”.The citation responsible party is the IOGP organization, but the namespace is"EPSG"
.When to use "EPSG" and "IOGP"
For all usages except GML, the"EPSG"
namespace shall be used for identifying Coordinate Reference System objects. But in the particular case of GML, both"EPSG"
and"IOGP"
appear in different locations. For example:<gml:identifier codeSpace="IOGP">urn:ogc:def:crs:EPSG::4326</gml:identifier>
- The
"EPSG"
name shall be used in URN. This part of the URN is called "the authority" and is returned by bothIdentifier.getAuthority()
andIdentifier.getCodeSpace()
. - The
"IOGP"
name appears in the GMLcodeSpace
attribute, but despite the attribute name this is not theIdentifier.getCodeSpace()
value of the"EPSG:4326"
identifier. Instead, Apache SIS considers"IOGP"
as the codespace of the"IOGP:EPSG"
identifier, which is the identifier of this citation.
"IOGP:EPSG"
identifier is handled in a special way bygetIdentifier(Citation)
, which return only"EPSG"
.Main usage
This value can be returned by:ImmutableIdentifier.getAuthority()
ConcurrentAuthorityFactory.getAuthority()
with the addition of version information.
- Since:
- 0.4
- The
-
WMS
The authority for identifiers of objects defined by the Web Map Service (WMS) specification. The WMS 1.3 specifications is also known as ISO 19128 Geographic Information — Web map server interface standard.The citation responsible parties are the OGC and ISO organizations. The namespace declared by this constant is
"OGC"
, but the"CRS"
,"AUTO"
and"AUTO2"
namespaces are also commonly found in practice.Main usage
This value can be returned by:- Since:
- 0.7
-
OGC
The authority for identifiers found in specifications from the Open Geospatial Consortium. The name of this identifier space is fixed to"OGC"
. Apache SIS uses this authority mostly for map projection methods and parameters as they were defined in older OGC specifications (in more recent specifications, EPSG identifiers tend to be more widely used).Example
The Mercator projection can be defined by an operation method having the"OGC:Mercator_1SP"
identifier and the following parameters:Example of identifiers in OGC name space Name in OGC namespace Name in default namespace (EPSG) "OGC:semi_major"
"OGC:semi_minor"
"OGC:latitude_of_origin"
Latitude of natural origin "OGC:central_meridian"
Longitude of natural origin "OGC:scale_factor"
Scale factor at natural origin "OGC:false_easting"
False easting "OGC:false_northing"
False northing Specifications referenced
The specification actually referenced by this citation is implementation dependent and may change in future SIS version. Some of the specifications used are: We do not commit to a particular OGC specification in order to keep the flexibility to change the title or URL according newer OGC publications.Main usage
This value can be returned by:- See Also:
-
ESRI
The authority for identifiers of objects defined by ESRI. The name of this identifier space is fixed to"ESRI"
. This citation is used as the authority for many map projection method and parameter names other than the EPSG ones.Compatibility note
Many parameter names defined by OGC are very similar to the ESRI ones, except for the case. Examples:Example of identifiers in ESRI name space Name in ESRI namespace Name in OGC namespace "ESRI:Semi_Major"
"OGC:semi_major"
"ESRI:Semi_Minor"
"OGC:semi_minor"
"ESRI:Latitude_Of_Origin"
"OGC:latitude_of_origin"
"ESRI:Central_Meridian"
"OGC:central_meridian"
"ESRI:Scale_Factor"
"OGC:scale_factor"
"ESRI:False_Easting"
"OGC:false_easting"
"ESRI:False_Northing"
"OGC:false_northing"
Main usage
This value can be returned by:- Since:
- 0.4
- See Also:
-
WMO
The authority for identifiers of objects defined by the World Meteorological Organization. The name of this identifier space is fixed to"WMO"
. This citation is used as the authority for some coordinate operations other than EPSG and ESRI ones, for example "Rotated latitude/longitude".- Since:
- 1.2
-
NETCDF
The authority for identifiers of objects defined by the netCDF specification. The name of this identifier space is fixed to"NetCDF"
. This citation is used as the authority for some map projection method and parameter names as used in netCDF files.Example
The Mercator projection can be defined in a netCDF file with the following parameters:Example of identifiers in netCDF name space Name in netCDF namespace Name in default namespace (EPSG) "NetCDF:semi_major_axis"
"NetCDF:semi_minor_axis"
"NetCDF:latitude_of_projection_origin"
Latitude of natural origin "NetCDF:longitude_of_projection_origin"
Longitude of natural origin "NetCDF:scale_factor_at_projection_origin"
Scale factor at natural origin "NetCDF:false_easting"
False easting "NetCDF:false_northing"
False northing Main usage
This value can be returned by:- Since:
- 0.4
-
GEOTIFF
The authority for identifiers of objects defined by the the GeoTIFF specification. This specification identifies some map projections by their own numerical codes.Main usage
This value can be returned by:- Since:
- 0.4
-
PROJ4
The authority for identifiers of objects defined by the PROJ project. We use thePROJ4
name for historical reasons, because those identifiers were defined mostly when the project was known as "Proj.4". Starting at PROJ version 6, EPSG identifiers should be used instead.Main usage
This value can be returned by:- Since:
- 0.4
-
MAP_INFO
The authority for identifiers of objects defined by MapInfo.Main usage
This value can be returned by:- Since:
- 0.6
-
S57
The IHO transfer standard for digital hydrographic data specification.Main usage
This value can be returned by:- Since:
- 0.6
-
ISBN
The International Standard Book Number (ISBN) defined by ISO-2108. The ISO 19115 metadata standard defines a specific attribute for this information, but the SIS library handles it like any other identifier.Main usage
This value can be returned by:- See Also:
-
ISSN
The International Standard Serial Number (ISSN) defined by ISO-3297. The ISO 19115 metadata standard defines a specific attribute for this information, but the SIS library handles it like any other identifier.Main usage
This value can be returned by:- See Also:
-
SIS
The codespace of objects that are specific to the Apache SIS project.Main usage
This value can be returned by:- Since:
- 0.4
-
-
Method Details
-
values
Returns the values declared in thisCitations
class.- Returns:
- the value declared in this
Citations
class. - Since:
- 1.0
-
fromName
Returns a citation of the given identifier. The method makes the following choice:- If the given title is
null
or empty (ignoring spaces), then this method returnsnull
. - Otherwise if the given string matches an identifier of one of
the predefined constants (
EPSG
,GEOTIFF
, etc.), then that constant is returned. - Otherwise, a new citation is created with the specified name as the title.
- Parameters:
identifier
- the citation title (or alternate title), ornull
.- Returns:
- a citation using the specified name, or
null
if the given title is null or empty.
- If the given title is
-
titleMatches
Returnstrue
if at least one title or alternate title inc1
is leniently equal to a title or alternate title inc2
. The comparison is case-insensitive and ignores every character which is not a letter or a digit. The titles ordering is not significant.- Parameters:
c1
- the first citation to compare, ornull
.c2
- the second citation to compare, ornull
.- Returns:
true
if both arguments are non-null, and at least one title or alternate title matches.
-
titleMatches
Returnstrue
if the title or any alternate title in the given citation matches the given string. The comparison is case-insensitive and ignores every character which is not a letter or a digit.- Parameters:
citation
- the citation to check for, ornull
.title
- the title or alternate title to compare, ornull
.- Returns:
true
if both arguments are non-null, and the title or an alternate title matches the given string.
-
identifierMatches
Returnstrue
if at least one identifier code inc1
is equal to an identifier code inc2
. Code spaces are compared only if provided in the two identifiers being compared. Comparisons are case-insensitive and ignores every character which is not a letter or a digit. The identifier ordering is not significant.If (and only if) the citations do not contains any identifier, then this method fallback on titles comparison using the
titleMatches
method. This fallback exists for compatibility with client codes using the citation titles without identifiers.- Parameters:
c1
- the first citation to compare, ornull
.c2
- the second citation to compare, ornull
.- Returns:
true
if both arguments are non-null, and at least one identifier matches.
-
identifierMatches
Returnstrue
if at least one identifier in the given citation have a code matching the given string. The comparison is case-insensitive and ignores every character which is not a letter or a digit.If (and only if) the citation does not contain any identifier, then this method fallback on titles comparison using the
titleMatches
method. This fallback exists for compatibility with citations using title and alternate titles (often abbreviations) without identifiers.- Parameters:
citation
- the citation to check for, ornull
.identifier
- the identifier to compare, ornull
.- Returns:
true
if both arguments are non-null, and an identifier matches the given string.
-
getIdentifier
Infers an identifier from the given citation, or returnsnull
if no identifier has been found. This method is useful for extracting a short designation of an authority (e.g."EPSG"
) for display purpose. This method performs the following choices:- If the given citation is
null
, then this method returnsnull
. - Otherwise if the collection of citation identifiers
contains at least one non-deprecated
identifier, then:
- If the codespace (if any) and the code of at least one non-deprecated identifier
are valid Unicode identifiers
(with relaxed rules regarding the code), then the first of those identifiers
is returned in a
"[codespace:]code"
format. If a codespace exists, then the above restriction about the code is relaxed in two ways: - Otherwise the first non-empty and non-deprecated identifier is returned in a
"[codespace:]code"
format, despite not being a valid Unicode identifier.
- If the codespace (if any) and the code of at least one non-deprecated identifier
are valid Unicode identifiers
(with relaxed rules regarding the code), then the first of those identifiers
is returned in a
- Otherwise if the citation contains at least one non-deprecated title
or alternate title, then:
- If at least one non-deprecated title is a unicode identifier, then the first of those titles is returned.
- Otherwise the first non-empty and non-deprecated title is returned, despite not being a valid Unicode identifier.
- Otherwise this method returns
null
.
Note: This method searches in alternate titles as a fallback because ISO specification said that those titles are often used for abbreviations. However, titles are never searched if the given citation contains at least one non-empty and non-deprecated identifier.This method ignores leading and trailing whitespaces in every character sequences. Null or empty trimmed character sequences are ignored. This method does not remove ignorable characters. The result is a string which is likely, but not guaranteed, to be a valid XML or Unicode identifier. The returned string is useful when an "identifier-like" string is desired for display or information purpose, but does not need to be a strictly valid identifier.- Parameters:
citation
- the citation for which to get the identifier, ornull
.- Returns:
- a non-empty identifier for the given citation without leading or trailing whitespaces,
or
null
if the given citation is null or does not declare any identifier or title.
- If the given citation is
-
toCodeSpace
Infers a code space from the given citation, or returnsnull
if none. This method is useful for extracting a short designation of an authority (e.g."EPSG"
) for processing purpose. This method performs the following actions:- If the given citation is an instance of
IdentifierSpace
, returnsIdentifierSpace.getName()
. - Otherwise, performs the same work than
getIdentifier(Citation)
except that'_'
is used instead of':'
as the separator between the codespace and the code. - If the result of above method call is
null
or is not a valid Unicode identifier, then returnnull
. - Otherwise remove the ignorable characters, if any, and returns the result.
If non-null, the result is suitable for use as a XML identifier except for a few uncommon characters.
Compatibility note
the following characters are invalid in XML identifiers. However, since they are valid in Unicode identifiers, they could be included in the string returned by this method:µ
ª
(feminine ordinal indicator)º
(masculine ordinal indicator)⁔
- Parameters:
citation
- the citation for which to infer the code space, ornull
.- Returns:
- a non-empty code space for the given citation without leading or trailing whitespaces,
or
null
if the given citation is null or does not have any Unicode identifier or title. - Since:
- 1.0
- If the given citation is an instance of
-