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

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

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

origin: geotools/geotools

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

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

final Unit<?> angularUnit = (geographicCRS.getCoordinateSystem()).getAxis(0).getUnit();
parseUnit(angularUnit, 0, metadata);
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

/**
 * 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: 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: org.geotools/gt-coverage

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

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

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: opengeospatial/geoapi

      AxisDirection.UP
    }, degree, degree, metre);
verifyIdentification(cs.getAxis(0), "Geodetic latitude", null);
verifyIdentification(cs.getAxis(1), "Geodetic longitude", null);
verifyIdentification(cs.getAxis(2), "Ellipsoidal height", null);
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: org.geotools/gt-coverage

    .getCoordinateSystem()).getAxis(0).getUnit();
parseUnit(angularUnit, 0, metadata);
origin: apache/sis

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));
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

longitudeAxis = cs.getAxis(1);
latitudeAxis  = cs.getAxis(0);
heightAxis    = cs.getAxis(2);
assertEquals("Geodetic latitude",  latitudeAxis .getName().toString());
assertEquals(AxisDirection.NORTH,  latitudeAxis .getDirection());
origin: apache/sis

/**
 * Tests the {@link DefaultGeographicCRS#forConvention(AxesConvention)} method
 * for {@link AxesConvention#POSITIVE_RANGE}.
 */
@Test
public void testShiftLongitudeRange() {
  final DefaultGeographicCRS crs = HardCodedCRS.WGS84_3D;
  CoordinateSystemAxis axis = crs.getCoordinateSystem().getAxis(0);
  assertEquals("longitude.minimumValue", -180.0, axis.getMinimumValue(), STRICT);
  assertEquals("longitude.maximumValue", +180.0, axis.getMaximumValue(), STRICT);
  assertSame("Expected a no-op.", crs,  crs.forConvention(AxesConvention.RIGHT_HANDED));
  final DefaultGeographicCRS shifted =  crs.forConvention(AxesConvention.POSITIVE_RANGE);
  assertNotSame("Expected a new CRS.", crs, shifted);
  Validators.validate(shifted);
  axis = shifted.getCoordinateSystem().getAxis(0);
  assertEquals("longitude.minimumValue",      0.0, axis.getMinimumValue(), STRICT);
  assertEquals("longitude.maximumValue",    360.0, axis.getMaximumValue(), STRICT);
  assertSame("Expected a no-op.",         shifted, shifted.forConvention(AxesConvention.POSITIVE_RANGE));
  assertSame("Expected cached instance.", shifted, crs    .forConvention(AxesConvention.POSITIVE_RANGE));
}
origin: org.opengis/geoapi-conformance

final CoordinateSystemAxis latitude  = cs.getAxis(0);
final CoordinateSystemAxis longitude = cs.getAxis(1);
assertEquals("Geodetic latitude",  latitude.getName().getCode());
assertEquals(AxisDirection.NORTH,  latitude.getDirection());
origin: apache/sis

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: apache/sis

final CoordinateSystemAxis latitude  = cs.getAxis(0);
final CoordinateSystemAxis longitude = cs.getAxis(1);
assertNotNull("axis", latitude);
assertNotNull("axis", longitude);
origin: apache/sis

CoordinateSystemAxis axis = cs.getAxis(0);
assertEquals("name", AxisNames.GEODETIC_LONGITUDE, axis.getName().getCode());
assertEquals("abbreviation", "λ",                  axis.getAbbreviation());
assertEquals("maximumValue", +secondsIn90*2,       axis.getMaximumValue(), 1E-9);
axis = cs.getAxis(1);
assertEquals("name", AxisNames.GEODETIC_LATITUDE,  axis.getName().getCode());
assertEquals("abbreviation", "φ",                  axis.getAbbreviation());
origin: apache/sis

assertLongitudeAxisEquals(cs.getAxis(0));
assertLatitudeAxisEquals (cs.getAxis(1));
org.opengis.referencing.csEllipsoidalCSgetAxis

Popular methods of EllipsoidalCS

  • getDimension
  • getName

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getContentResolver (Context)
  • getApplicationContext (Context)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • CodeWhisperer 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