Package org.apache.sis.storage.aggregate
Class GroupByCRS<E>
java.lang.Object
org.apache.sis.storage.aggregate.Group<E>
org.apache.sis.storage.aggregate.GroupByCRS<E>
- Type Parameters:
E
- type of objects in this group.
A container for a list of elements grouped by their CRS. The CRS comparisons ignore metadata.
Usage for coverage aggregation
GroupByCRS
contains an arbitrary number of GroupByTransform
instances,
which in turn contain an arbitrary number of GridSlice
instances.- Since:
- 1.3
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.opengis.referencing.crs.CoordinateReferenceSystem
The coordinate reference system of this group, ornull
. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
GroupByCRS
(org.opengis.referencing.crs.CoordinateReferenceSystem crs) Creates a new group of objects associated to the given CRS. -
Method Summary
Modifier and TypeMethodDescription(package private) final String
createName
(Locale locale) Returns a name for this group.(package private) static <E> GroupByCRS<E>
getOrAdd
(List<GroupByCRS<E>> groups, GridGeometry geometry) Returns the group of objects associated to the given grid geometry.private static <E> GroupByCRS<E>
getOrAdd
(List<GroupByCRS<E>> groups, org.opengis.referencing.crs.CoordinateReferenceSystem crs) Returns the group of objects associated to the given CRS.Methods inherited from class org.apache.sis.storage.aggregate.Group
getName, prepareAggregate, toString
-
Field Details
-
crs
private final org.opengis.referencing.crs.CoordinateReferenceSystem crsThe coordinate reference system of this group, ornull
. All Group.members of this group use this CRS, possibly with ignorable differences in metadata.
-
-
Constructor Details
-
GroupByCRS
private GroupByCRS(org.opengis.referencing.crs.CoordinateReferenceSystem crs) Creates a new group of objects associated to the given CRS.- Parameters:
crs
- coordinate reference system of this group, ornull
.
-
-
Method Details
-
createName
Returns a name for this group.- Specified by:
createName
in classGroup<E>
- Parameters:
locale
- the locale for the name to return, ornull
for the default.- Returns:
- a name which can be used as aggregation name.
-
getOrAdd
Returns the group of objects associated to the given grid geometry. The CRS comparisons ignore metadata. This method takes a synchronization lock on the given list.- Type Parameters:
E
- type of objects in groups.- Parameters:
groups
- the list where to search for a group.geometry
- geometry of the grid coverage or resource.- Returns:
- group of objects associated to the given CRS (never null).
-
getOrAdd
private static <E> GroupByCRS<E> getOrAdd(List<GroupByCRS<E>> groups, org.opengis.referencing.crs.CoordinateReferenceSystem crs) Returns the group of objects associated to the given CRS. The CRS comparisons ignore metadata. This method takes a synchronization lock on the given list.- Type Parameters:
E
- type of objects in groups.- Parameters:
groups
- the list where to search for a group.crs
- coordinate reference system of the desired group, ornull
.- Returns:
- group of objects associated to the given CRS (never null).
-