psg.org">EPSG database provides definitions for many ellipsoids, and Apache SIS provides convenience shortcuts for some of them.
Choice 1 in the following list is the easiest but most restrictive way to get an ellipsoid. The other choices provide more freedom. Each choice delegates its work to the subsequent items (in the default configuration), so this list can been seen as top to bottom API.
- Create an {@code Ellipsoid} from one of the static convenience shortcuts listed in{@link org.apache.sis.referencing.CommonCRS#ellipsoid()}.
- Create an {@code Ellipsoid} from an identifier in a database by invoking{@link org.opengis.referencing.datum.DatumAuthorityFactory#createEllipsoid(String)}.
- Create an {@code Ellipsoid} by invoking the {@code createEllipsoid(…)} or {@code createFlattenedSphere(…)}methods defined in the {@link org.opengis.referencing.datum.DatumFactory} interface.
- Create a {@code DefaultEllipsoid} by invoking the{@link #createEllipsoid(Map,double,double,Unit) createEllipsoid(…)} or{@link #createFlattenedSphere(Map,double,double,Unit) createFlattenedSphere(…)}static methods defined in this class.
Example: the following code gets the WGS84 ellipsoid: {@preformat javaEllipsoid e = CommonCRS.WGS84.ellipsoid();}{@section Immutability and thread safety}This class is immutable and thus thread-safe if the property
values (not necessarily the map itself) given to the constructors are also immutable. Unless otherwise noted in the javadoc, this condition holds if all components were created using only SIS factories and static constants.
@author Martin Desruisseaux (IRD, Geomatys)
@author Cédric Briançon (Geomatys)
@since 0.4 (derived from geotk-1.2)
@version 0.4
@module
@see org.apache.sis.referencing.CommonCRS#ellipsoid()