Tabnine Logo
EllipsoidalCS
Code IndexAdd Tabnine to your IDE (free)

How to use
EllipsoidalCS
in
org.opengis.referencing.cs

Best Java code snippets using org.opengis.referencing.cs.EllipsoidalCS (Showing top 20 results out of 315)

origin: geotools/geotools

  throws OperationNotFoundException {
final Matrix matrix = swapAndScaleAxis(sourceCS, targetCS);
for (int i = targetCS.getDimension(); --i >= 0; ) {
  final CoordinateSystemAxis axis = targetCS.getAxis(i);
  final AxisDirection direction = axis.getDirection();
  if (AxisDirection.EAST.equals(direction.absolute())) {
origin: geotools/geotools

    new GeneralDirectPosition(envelope.getCoordinateReferenceSystem());
for (int i = 0; i < spatialCRS.getCoordinateSystem().getDimension(); i++) {
  lowerCorner.setOrdinate(i, envelope.getLowerCorner().getOrdinate(i));
  upperCorner.setOrdinate(i, envelope.getUpperCorner().getOrdinate(i));
origin: geotools/geotools

            geogCode.toString());
if (angularUnit != null
    && !angularUnit.equals(gcs.getCoordinateSystem().getAxis(0).getUnit())) {
origin: apache/sis

/**
 * Tests the {@link CommonCRS#geographic3D()} method.
 */
@Test
@DependsOnMethod("testGeographic")
public void testGeographic3D() {
  final GeographicCRS crs = CommonCRS.WGS72.geographic3D();
  Validators.validate(crs);
  assertEquals ("WGS 72", crs.getName().getCode());
  assertSame   (CommonCRS.WGS72.geographic().getDatum(), crs.getDatum());
  assertNotSame(CommonCRS.WGS84.geographic().getDatum(), crs.getDatum());
  final EllipsoidalCS cs = crs.getCoordinateSystem();
  final String name = cs.getName().getCode();
  assertTrue(name, name.startsWith("Ellipsoidal 3D"));
  assertEquals("dimension", 3, cs.getDimension());
  assertAxisDirectionsEqual(name, cs, AxisDirection.NORTH, AxisDirection.EAST, AxisDirection.UP);
  assertSame("Cached value", crs, CommonCRS.WGS72.geographic3D());
}
origin: geotools/geotools

    new GeneralDirectPosition(envelope.getCoordinateReferenceSystem());
for (int i = 0; i < spatialCRS.getCoordinateSystem().getDimension(); i++) {
  lowerCorner.setOrdinate(i, envelope.getLowerCorner().getOrdinate(i));
  upperCorner.setOrdinate(i, envelope.getUpperCorner().getOrdinate(i));
origin: geotools/geotools

final Unit<?> angularUnit = (geographicCRS.getCoordinateSystem()).getAxis(0).getUnit();
parseUnit(angularUnit, 0, metadata);
origin: Geomatys/geotoolkit

/**
 * Test if given CRS is longitude/latitude or latitude/longitude. Works
 * with ND geographic systems, as long as longitude and latitude axes can
 * be found.
 *
 * @param in The coordinate reference system
 * @return True if the first geographical axis of the given CRS is latitude.
 * False if the longitude appears before the latitude.
 * @throws IllegalArgumentException If neither latitude nor longitude axis
 * is found in input system.
 */
static boolean isLatLon(final GeographicCRS in) throws IllegalArgumentException {
  final EllipsoidalCS cs = in.getCoordinateSystem();
  for (int i = 0 ; i < cs.getDimension() ; i++) {
    final AxisDirection axis = cs.getAxis(i).getDirection();
    // Most common cases
    if (AxisDirection.NORTH.equals(axis)) {
      return true;
    } else if (AxisDirection.EAST.equals(axis)) {
      return false;
      // less common
    } else if (AxisDirection.SOUTH.equals(axis)) {
      return true;
    } else if (AxisDirection.WEST.equals(axis)) {
      return false;
    }
  }
  throw new IllegalArgumentException("Given geographic CRS use neither north nor east axis directions.");
}
origin: geotools/geotools

/** Tests {@link AbstractCRS}. */
@Test
public void testCoordinateReferenceSystems() {
  // Test dimensions
  assertEquals(
      "WGS84 2D", 2, DefaultGeographicCRS.WGS84.getCoordinateSystem().getDimension());
  assertEquals(
      "WGS84 3D", 3, DefaultGeographicCRS.WGS84_3D.getCoordinateSystem().getDimension());
  // Test WKT
  assertEquals(
      "WGS84",
      "GEOGCS[\"WGS84(DD)\", "
          + "DATUM[\"WGS84\", "
          + "SPHEROID[\"WGS84\", 6378137.0, 298.257223563]], "
          + "PRIMEM[\"Greenwich\", 0.0], "
          + "UNIT[\"degree\", 0.017453292519943295], "
          + "AXIS[\"Geodetic longitude\", EAST], "
          + "AXIS[\"Geodetic latitude\", NORTH]]",
      DefaultGeographicCRS.WGS84.toWKT(0));
}
origin: geotools/geotools

Unit<Length> linearUnit = parseUnit(element, SI.METRE);
Unit<Angle> angularUnit =
    geoCRS.getCoordinateSystem().getAxis(0).getUnit().asType(Angle.class);
ParameterValueGroup projection =
    parseProjection(element, ellipsoid, linearUnit, angularUnit);
origin: Geomatys/geotoolkit

if(crs instanceof GeographicCRS){
  final EllipsoidalCS cs = ((GeographicCRS)crs).getCoordinateSystem();
  for(int i=0,n=cs.getDimension();i<n;i++){
    final CoordinateSystemAxis axis = cs.getAxis(i);
    if(RangeMeaning.WRAPAROUND.equals(axis.getRangeMeaning())){
      final DirectPosition start = new GeneralDirectPosition(crs);
origin: geotools/geotools

final EllipsoidalCS cs = crs.getCoordinateSystem();
final EllipsoidalCS STANDARD =
    (cs.getDimension() <= 2)
        ? DefaultEllipsoidalCS.GEODETIC_2D
        : DefaultEllipsoidalCS.GEODETIC_3D;
origin: apache/sis

/**
 * Tests the {@link DefaultGeographicCRS#forConvention(AxesConvention)} method
 * for {@link AxesConvention#DISPLAY_ORIENTED}.
 */
@Test
public void testConventionalOrientation() {
  final DefaultGeographicCRS crs = DefaultGeographicCRS.castOrCopy(CommonCRS.WGS84.geographic3D());
  final DefaultGeographicCRS normalized = crs.forConvention(AxesConvention.DISPLAY_ORIENTED);
  assertNotSame(crs, normalized);
  final EllipsoidalCS cs = normalized.getCoordinateSystem();
  final EllipsoidalCS ref = crs.getCoordinateSystem();
  assertEqualsIgnoreMetadata(ref.getAxis(1), cs.getAxis(0));      // EPSG codes differ because of different axis order.
  assertEqualsIgnoreMetadata(ref.getAxis(0), cs.getAxis(1));
  assertEqualsIgnoreMetadata(ref.getAxis(2), cs.getAxis(2));
}
origin: apache/sis

/**
 * Implementation of {@link #testGeographicCRS()} and related test methods.
 * This test expects no {@code AUTHORITY} element on any component.
 *
 * @param  swap  1 if axes are expected to be swapped, or 0 otherwise.
 */
private void verifyGeographicCRS(final int swap, final GeographicCRS crs) throws ParseException {
  assertNameAndIdentifierEqual("WGS 84", 0, crs);
  final GeodeticDatum datum = crs.getDatum();
  assertNameAndIdentifierEqual("World Geodetic System 1984", 0, datum);
  assertNameAndIdentifierEqual("Greenwich", 0, datum.getPrimeMeridian());
  final Ellipsoid ellipsoid = datum.getEllipsoid();
  assertNameAndIdentifierEqual("WGS84", 0, ellipsoid);
  assertEquals("semiMajor", 6378137, ellipsoid.getSemiMajorAxis(), STRICT);
  assertEquals("inverseFlattening", 298.257223563, ellipsoid.getInverseFlattening(), STRICT);
  final EllipsoidalCS cs = crs.getCoordinateSystem();
  assertEquals("dimension", 2, cs.getDimension());
  assertLongitudeAxisEquals(cs.getAxis(0 ^ swap));
  assertLatitudeAxisEquals (cs.getAxis(1 ^ swap));
}
origin: opengeospatial/geoapi

/**
 * Gets the dimension of input points. The default implementation returns
 * the dimension of the {@linkplain #getSourceCRS() source CRS}.
 *
 * @return the dimension of input points.
 */
@Override
public int getSourceDimensions() {
  return (sourceCRS != null) ? sourceCRS.getCoordinateSystem().getDimension() : 2;
}
origin: org.geotools/gt-coverage

if (angularUnit != null
    && !angularUnit.equals(gcs.getCoordinateSystem()
        .getAxis(0).getUnit())) {
origin: apache/sis

assertEquals("greenwichLongitude", 2.5969213, pm.getGreenwichLongitude(), STRICT);
EllipsoidalCS cs = crs.getCoordinateSystem();
assertEquals("dimension", 2, cs.getDimension());
assertAxisEquals(AxisNames.GEODETIC_LATITUDE,  "φ", AxisDirection.NORTH, -100, +100, Units.GRAD, RangeMeaning.EXACT,      cs.getAxis(0));
assertAxisEquals(AxisNames.GEODETIC_LONGITUDE, "λ", AxisDirection.EAST,  -200, +200, Units.GRAD, RangeMeaning.WRAPAROUND, cs.getAxis(1));
assertEquals("greenwichLongitude", 2.33722917, pm.getGreenwichLongitude(), STRICT);
cs = crs.getCoordinateSystem();
assertEquals("dimension", 2, cs.getDimension());
assertAxisEquals(AxisNames.GEODETIC_LONGITUDE, "λ", AxisDirection.EAST,  -200, +200, Units.GRAD, RangeMeaning.WRAPAROUND, cs.getAxis(0));
assertAxisEquals(AxisNames.GEODETIC_LATITUDE,  "φ", AxisDirection.NORTH, -100, +100, Units.GRAD, RangeMeaning.EXACT,      cs.getAxis(1));
origin: org.opengis/geoapi-conformance

/**
 * Validates the given coordinate system.
 *
 * @param object The object to validate, or {@code null}.
 */
public void validate(final EllipsoidalCS object) {
  if (object == null) {
    return;
  }
  validateIdentifiedObject(object);
  validateAxes(object);
  final int dimension = object.getDimension();
  assertBetween("EllipsoidalCS: wrong number of dimensions.", 2, 3, dimension);
}
origin: opengeospatial/geoapi

      AxisDirection.EAST
    }, units.degree());
verifyIdentification(cs.getAxis(0), "Geodetic latitude", null);
verifyIdentification(cs.getAxis(1), "Geodetic longitude", null);
origin: apache/sis

assertEquals("greenwichLongitude", 2.33722917, pm.getGreenwichLongitude(), STRICT);
EllipsoidalCS cs = crs.getCoordinateSystem();
assertEquals("dimension", 2, cs.getDimension());
assertAxisEquals(AxisNames.GEODETIC_LATITUDE,  "φ", AxisDirection.NORTH,  -90,  +90, Units.DEGREE, RangeMeaning.EXACT,      cs.getAxis(0));
assertAxisEquals(AxisNames.GEODETIC_LONGITUDE, "λ", AxisDirection.EAST,  -180, +180, Units.DEGREE, RangeMeaning.WRAPAROUND, cs.getAxis(1));
origin: opengeospatial/geoapi

/**
 * Validates the given coordinate system.
 *
 * @param  object  the object to validate, or {@code null}.
 */
public void validate(final EllipsoidalCS object) {
  if (object == null) {
    return;
  }
  validateIdentifiedObject(object);
  validateAxes(object);
  final int dimension = object.getDimension();
  assertBetween("EllipsoidalCS: wrong number of dimensions.", 2, 3, dimension);
}
org.opengis.referencing.csEllipsoidalCS

Javadoc

A two- or three-dimensional coordinate system in which position is specified by geodetic latitude, geodetic longitude, and (in the three-dimensional case) ellipsoidal height. An EllipsoidalCS shall have two or three #getAxis.
Used with CRS type(s)
org.opengis.referencing.crs.GeographicCRS, org.opengis.referencing.crs.EngineeringCRS

Most used methods

  • getDimension
  • getAxis
  • getName

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • getContentResolver (Context)
  • compareTo (BigDecimal)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JComboBox (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now