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.

final class GroupByCRS<E> extends Group<E>
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

    Fields
    Modifier and Type
    Field
    Description
    private final org.opengis.referencing.crs.CoordinateReferenceSystem
    The coordinate reference system of this group, or null.

    Fields inherited from class org.apache.sis.storage.aggregate.Group

    members
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    GroupByCRS(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
    Creates a new group of objects associated to the given CRS.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) final String
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • crs

      private final org.opengis.referencing.crs.CoordinateReferenceSystem crs
      The coordinate reference system of this group, or null. 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, or null.
  • Method Details

    • createName

      final String createName(Locale locale)
      Returns a name for this group.
      Specified by:
      createName in class Group<E>
      Parameters:
      locale - the locale for the name to return, or null for the default.
      Returns:
      a name which can be used as aggregation name.
    • getOrAdd

      static <E> GroupByCRS<E> getOrAdd(List<GroupByCRS<E>> groups, GridGeometry geometry)
      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, or null.
      Returns:
      group of objects associated to the given CRS (never null).