/** * Returns the spatial representation type that matches the given string, or returns a new one * if none match it. * * @param code The name of the code to fetch or to create. * @return A code matching the given name. */ public static SpatialRepresentationType valueOf(String code) { return valueOf(SpatialRepresentationType.class, code); } }
/** * Returns the CellGeometry that matches the given string, or returns a new one if none match * it. * * @param code The name of the code to fetch or to create. * @return A code matching the given name. */ public static CellGeometry valueOf(String code) { return valueOf(CellGeometry.class, code); } }
/** * Returns the geometric object type that matches the given string, or returns a new one if none * match it. * * @param code The name of the code to fetch or to create. * @return A code matching the given name. */ public static GeometricObjectType valueOf(String code) { return valueOf(GeometricObjectType.class, code); } }
/** Returns the list of enumerations of the same kind than this enum. */ public CellGeometry[] family() { return values(); }
/** Returns the list of enumerations of the same kind than this enum. */ public SpatialRepresentationType[] family() { return values(); }
/** Returns the list of enumerations of the same kind than this enum. */ public TopologyLevel[] family() { return values(); }
/** Returns the list of enumerations of the same kind than this enum. */ public PixelOrientation[] family() { return values(); }
/** Returns the list of enumerations of the same kind than this enum. */ public DimensionNameType[] family() { return values(); }
/** Returns the list of enumerations of the same kind than this enum. */ public GeometricObjectType[] family() { return values(); }
/** * Returns the topology level that matches the given string, or returns a new one if none match * it. * * @param code The name of the code to fetch or to create. * @return A code matching the given name. */ public static TopologyLevel valueOf(String code) { return valueOf(TopologyLevel.class, code); } }
/** * Returns the dimension name type that matches the given string, or returns a new one if none * match it. * * @param code The name of the code to fetch or to create. * @return A code matching the given name. */ public static DimensionNameType valueOf(String code) { return valueOf(DimensionNameType.class, code); } }
/** * Workaround for RFE #4093999 ("Relax constraint on placement of this()/super() call in * constructors"). We could write this code in a less convolved way if only this requested was * honored... */ private GridGeometry2D( final GridEnvelope gridRange, final PixelOrientation anchor, final MathTransform gridToCRS, final int[] dimensions, // Allocated by caller. final CoordinateReferenceSystem crs, final Hints hints) { this( gridRange, anchor, (gridToCRS != null) && (gridToCRS.getSourceDimensions() == 2) && (gridToCRS.getTargetDimensions() == 2) && PixelOrientation.UPPER_LEFT.equals(anchor) ? PixelInCell.CELL_CORNER : PixelInCell.CELL_CENTER, gridToCRS, getMathTransform2D(gridToCRS, gridRange, dimensions, hints), dimensions, crs); }
/** * Returns the programmatic name of this constant together with its {@linkplain #identifier() identifier}. */ @Override public String[] names() { return new String[] {name(), identifier}; }
/** * Creates a new pixel translation. The translation is added immediately in the {@link * #ORIENTATIONS} map (this behavior would need to be revisited if this method was public). */ private PixelTranslation(final String orientation, final double dx, final double dy) { this(valueOf(orientation), dx, dy); }
/** * Returns the list of codes of the same kind than this code list element. * Invoking this method is equivalent to invoking {@link #values()}, except that * this method can be invoked on an instance of the parent {@code CodeList} class. * * @return all code {@linkplain #values() values} for this code list. */ @Override public CellGeometry[] family() { return values(); }
/** * Returns the list of enumerations of the same kind than this enum. */ public /*{SpatialRepresentationType}*/ CodeList[] family() { return values(); }
if (!PixelOrientation.UPPER_LEFT.equals(orientation)) { try { return computeGridToCRS2D(orientation).inverse();
/** * Returns the pixel orientation that matches the given string, or returns a new one if none * match it. * * @param code The name of the code to fetch or to create. * @return A code matching the given name. */ public static PixelOrientation valueOf(String code) { return valueOf(PixelOrientation.class, code); } }
/** * Returns the list of enumerations of the same kind than this enum. */ public /*{CellGeometry}*/ CodeList[] family() { return values(); }
throw new InvalidGridGeometryException(ErrorKeys.NO_TRANSFORM2D_AVAILABLE); if (!PixelOrientation.UPPER_LEFT.equals(orientation)) { return computeGridToCRS2D(orientation);