/** * Returns the registered coordinate reference system, or when unavailable in the registry, create a new Geographic 2D system and register * this on-the-fly. * * @param epsgCode the code to look up * @return a CoordinateReferenceSystem with the specified epsg code */ public static CoordinateReferenceSystem<?> ifAbsentReturnGeographic2D(int epsgCode) { return computeIfAbsent(CrsId.valueOf(epsgCode), key -> CoordinateReferenceSystems.mkGeographic(key, AngularUnit.RADIAN)); }
/** * Returns the registered coordinate reference system, or when unavailable in the registry, create a new Projected 2D system and register * this on-the-fly. * * @param epsgCode the code to look up * @return a CoordinateReferenceSystem with the specified epsg code */ public static CoordinateReferenceSystem<?> ifAbsentReturnProjected2D(int epsgCode) { return computeIfAbsent(CrsId.valueOf(epsgCode), key -> CoordinateReferenceSystems.mkProjected(key, LinearUnit.METER)); }