/** * Creates an affine transform from a matrix. If the transform's input dimension is {@code M}, * and output dimension is {@code N}, then the matrix will have size {@code [N+1][M+1]}. The +1 * in the matrix dimensions allows the matrix to do a shift, as well as a rotation. The {@code * [M][j]} element of the matrix will be the j'th ordinate of the moved origin. The {@code * [i][N]} element of the matrix will be 0 for <var>i</var> less than {@code M}, and 1 for * <var>i</var> equals {@code M}. * * @param matrix The matrix used to define the affine transform. * @return The affine transform. * @throws FactoryException if the object creation failed. */ public MathTransform createAffineTransform(final Matrix matrix) throws FactoryException { lastMethod.remove(); // To be strict, we should set ProjectiveTransform.Provider return pool.unique(ProjectiveTransform.create(matrix)); }
/** * Creates a concatenated operation from a sequence of operations. * * @param properties Set of properties. Should contains at least {@code "name"}. * @param operations The sequence of operations. * @return The concatenated operation. * @throws FactoryException if the object creation failed. */ public CoordinateOperation createConcatenatedOperation( final Map<String, ?> properties, final CoordinateOperation[] operations) throws FactoryException { CoordinateOperation operation; operation = new DefaultConcatenatedOperation(properties, operations, mtFactory); operation = pool.unique(operation); return operation; }
/** * Constructs a defining conversion from a set of properties. * * @param properties Set of properties. Should contains at least {@code "name"}. * @param method The operation method. * @param parameters The parameter values. * @return The defining conversion. * @throws FactoryException if the object creation failed. * @see DefiningConversion * @since 2.5 */ public Conversion createDefiningConversion( final Map<String, ?> properties, final OperationMethod method, final ParameterValueGroup parameters) throws FactoryException { Conversion conversion = new DefiningConversion(properties, method, parameters); conversion = pool.unique(conversion); return conversion; }
/** * Creates an engineering datum. * * @param properties Name and other properties to give to the new object. * @throws FactoryException if the object creation failed. */ public EngineeringDatum createEngineeringDatum(Map<String, ?> properties) throws FactoryException { EngineeringDatum datum; try { datum = new DefaultEngineeringDatum(properties); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } datum = pool.unique(datum); return datum; }
/** * Creates a linear coordinate system. * * @param properties Name and other properties to give to the new object. * @param axis The axis. * @throws FactoryException if the object creation failed. */ public LinearCS createLinearCS(Map<String, ?> properties, CoordinateSystemAxis axis) throws FactoryException { LinearCS cs; try { cs = new DefaultLinearCS(properties, axis); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } cs = pool.unique(cs); return cs; }
/** * Creates a temporal coordinate system. * * @param properties Name and other properties to give to the new object. * @param axis The axis. * @throws FactoryException if the object creation failed. */ public TimeCS createTimeCS(Map<String, ?> properties, CoordinateSystemAxis axis) throws FactoryException { TimeCS cs; try { cs = new DefaultTimeCS(properties, axis); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } cs = pool.unique(cs); return cs; }
/** * Creates a temporal coordinate reference system. * * @param properties Name and other properties to give to the new object. * @param datum Temporal datum to use in created CRS. * @param cs The Temporal coordinate system for the created CRS. * @throws FactoryException if the object creation failed. */ public TemporalCRS createTemporalCRS(Map<String, ?> properties, TemporalDatum datum, TimeCS cs) throws FactoryException { TemporalCRS crs; try { crs = new DefaultTemporalCRS(properties, datum, cs); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } crs = pool.unique(crs); return crs; }
/** * Creates a prime meridian, relative to Greenwich. * * @param properties Name and other properties to give to the new object. * @param longitude Longitude of prime meridian in supplied angular units East of Greenwich. * @param angularUnit Angular units of longitude. * @throws FactoryException if the object creation failed. */ public PrimeMeridian createPrimeMeridian( Map<String, ?> properties, double longitude, Unit<Angle> angularUnit) throws FactoryException { PrimeMeridian meridian; try { meridian = new DefaultPrimeMeridian(properties, longitude, angularUnit); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } meridian = pool.unique(meridian); return meridian; }
/** * Creates a two dimensional coordinate system from the given pair of axis. * * @param properties Name and other properties to give to the new object. * @param axis0 The first axis. * @param axis1 The second axis. * @throws FactoryException if the object creation failed. */ public AffineCS createAffineCS( Map<String, ?> properties, CoordinateSystemAxis axis0, CoordinateSystemAxis axis1) throws FactoryException { AffineCS cs; try { cs = new DefaultAffineCS(properties, axis0, axis1); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } cs = pool.unique(cs); return cs; }
/** * Creates a vertical datum from an enumerated type value. * * @param properties Name and other properties to give to the new object. * @param type The type of this vertical datum (often geoidal). * @throws FactoryException if the object creation failed. */ public VerticalDatum createVerticalDatum(Map<String, ?> properties, VerticalDatumType type) throws FactoryException { VerticalDatum datum; try { datum = new DefaultVerticalDatum(properties, type); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } datum = pool.unique(datum); return datum; }
/** * Creates a temporal datum from an enumerated type value. * * @param properties Name and other properties to give to the new object. * @param origin The date and time origin of this temporal datum. * @throws FactoryException if the object creation failed. */ public TemporalDatum createTemporalDatum(Map<String, ?> properties, Date origin) throws FactoryException { TemporalDatum datum; try { datum = new DefaultTemporalDatum(properties, origin); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } datum = pool.unique(datum); return datum; }
/** * Creates a vertical coordinate system. * * @param properties Name and other properties to give to the new object. * @param axis The axis. * @throws FactoryException if the object creation failed. */ public VerticalCS createVerticalCS(Map<String, ?> properties, CoordinateSystemAxis axis) throws FactoryException { VerticalCS cs; try { cs = new DefaultVerticalCS(properties, axis); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } cs = pool.unique(cs); return cs; }
/** * Creates a two dimensional user defined coordinate system from the given pair of axis. * * @param properties Name and other properties to give to the new object. * @param axis0 The first axis. * @param axis1 The second axis. * @throws FactoryException if the object creation failed. */ public UserDefinedCS createUserDefinedCS( Map<String, ?> properties, CoordinateSystemAxis axis0, CoordinateSystemAxis axis1) throws FactoryException { UserDefinedCS cs; try { cs = new DefaultUserDefinedCS(properties, axis0, axis1); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } cs = pool.unique(cs); return cs; }
/** * Creates a engineering coordinate reference system. * * @param properties Name and other properties to give to the new object. * @param datum Engineering datum to use in created CRS. * @param cs The coordinate system for the created CRS. * @throws FactoryException if the object creation failed. */ public EngineeringCRS createEngineeringCRS( Map<String, ?> properties, EngineeringDatum datum, CoordinateSystem cs) throws FactoryException { EngineeringCRS crs; try { crs = new DefaultEngineeringCRS(properties, datum, cs); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } crs = pool.unique(crs); return crs; }
/** * Creates a polar coordinate system from the given pair of axis. * * @param properties Name and other properties to give to the new object. * @param axis0 The first axis. * @param axis1 The second axis. * @throws FactoryException if the object creation failed. */ public PolarCS createPolarCS( Map<String, ?> properties, CoordinateSystemAxis axis0, CoordinateSystemAxis axis1) throws FactoryException { PolarCS cs; try { cs = new DefaultPolarCS(properties, axis0, axis1); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } cs = pool.unique(cs); return cs; }
/** * Creates an image coordinate reference system. * * @param properties Name and other properties to give to the new object. * @param datum Image datum to use in created CRS. * @param cs The Cartesian or Oblique Cartesian coordinate system for the created CRS. * @throws FactoryException if the object creation failed. */ public ImageCRS createImageCRS(Map<String, ?> properties, ImageDatum datum, AffineCS cs) throws FactoryException { ImageCRS crs; try { crs = new DefaultImageCRS(properties, datum, cs); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } crs = pool.unique(crs); return crs; }
/** * Creates a vertical coordinate reference system. * * @param properties Name and other properties to give to the new object. * @param datum Vertical datum to use in created CRS. * @param cs The Vertical coordinate system for the created CRS. * @throws FactoryException if the object creation failed. */ public VerticalCRS createVerticalCRS( Map<String, ?> properties, VerticalDatum datum, VerticalCS cs) throws FactoryException { VerticalCRS crs; try { crs = new DefaultVerticalCRS(properties, datum, cs); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } crs = pool.unique(crs); return crs; }
/** * Creates an image datum. * * @param properties Name and other properties to give to the new object. * @param pixelInCell Specification of the way the image grid is associated with the image data * attributes. * @throws FactoryException if the object creation failed. */ public ImageDatum createImageDatum(Map<String, ?> properties, PixelInCell pixelInCell) throws FactoryException { ImageDatum datum; try { datum = new DefaultImageDatum(properties, pixelInCell); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } datum = pool.unique(datum); return datum; }
/** * Creates a geocentric coordinate reference system from a {@linkplain SphericalCS spherical * coordinate system}. * * @param properties Name and other properties to give to the new object. * @param datum Geodetic datum to use in created CRS. * @param cs The spherical coordinate system for the created CRS. * @throws FactoryException if the object creation failed. */ public GeocentricCRS createGeocentricCRS( Map<String, ?> properties, GeodeticDatum datum, SphericalCS cs) throws FactoryException { GeocentricCRS crs; try { crs = new DefaultGeocentricCRS(properties, datum, cs); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } crs = pool.unique(crs); return crs; }
/** * Creates an ellipsoidal coordinate system without ellipsoidal height. * * @param properties Name and other properties to give to the new object. * @param axis0 The first axis. * @param axis1 The second axis. * @throws FactoryException if the object creation failed. */ public EllipsoidalCS createEllipsoidalCS( Map<String, ?> properties, CoordinateSystemAxis axis0, CoordinateSystemAxis axis1) throws FactoryException { EllipsoidalCS cs; try { cs = new DefaultEllipsoidalCS(properties, axis0, axis1); } catch (IllegalArgumentException exception) { throw new FactoryException(exception); } cs = pool.unique(cs); return cs; }