congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Formatter.addContextualUnit
Code IndexAdd Tabnine to your IDE (free)

How to use
addContextualUnit
method
in
org.apache.sis.io.wkt.Formatter

Best Java code snippets using org.apache.sis.io.wkt.Formatter.addContextualUnit (Showing top 6 results out of 315)

origin: org.apache.sis.core/sis-referencing

final Unit<?>       lengthUnit  = ReferencingUtilities.getUnit(cs);
final Unit<Angle>   angularUnit = AxisDirections.getAngularUnit(baseCRS.getCoordinateSystem(), null);
final Unit<Angle>   oldAngle    = formatter.addContextualUnit(angularUnit);
final Unit<?>       oldLength   = formatter.addContextualUnit(lengthUnit);
origin: apache/sis

final Unit<?>       lengthUnit  = ReferencingUtilities.getUnit(cs);
final Unit<Angle>   angularUnit = AxisDirections.getAngularUnit(baseCRS.getCoordinateSystem(), null);
final Unit<Angle>   oldAngle    = formatter.addContextualUnit(angularUnit);
final Unit<?>       oldLength   = formatter.addContextualUnit(lengthUnit);
origin: org.apache.sis.core/sis-referencing

assert isWKT1 || !isBaseCRS(formatter) || formatter.getConvention() == Convention.INTERNAL;    // Condition documented in javadoc.
final Unit<?> oldUnit = formatter.addContextualUnit(unit);
if (isWKT1) {                               // WKT 1 writes unit before axes, while WKT 2 writes them after axes.
  formatter.append(unit);
origin: apache/sis

assert isWKT1 || !isBaseCRS(formatter) || formatter.getConvention() == Convention.INTERNAL;    // Condition documented in javadoc.
final Unit<?> oldUnit = formatter.addContextualUnit(unit);
if (isWKT1) {                               // WKT 1 writes unit before axes, while WKT 2 writes them after axes.
  formatter.append(unit);
origin: apache/sis

  ReferencingUtilities.getGreenwichLongitude(pm, Units.DEGREE) != 0)
final Unit<Angle> oldUnit = formatter.addContextualUnit(angularUnit);
formatter.indent(1);
formatter.append(WKTUtilities.toFormattable(pm));
origin: org.apache.sis.core/sis-referencing

  ReferencingUtilities.getGreenwichLongitude(pm, Units.DEGREE) != 0)
final Unit<Angle> oldUnit = formatter.addContextualUnit(angularUnit);
formatter.indent(1);
formatter.append(WKTUtilities.toFormattable(pm));
org.apache.sis.io.wktFormatteraddContextualUnit

Javadoc

Adds a unit to use for the next measurements of the quantity Q. The given unit will apply to all WKT elements containing a value of quantity Q without their own UNIT[…] element, until the #restoreContextualUnit(Unit,Unit) method is invoked.

If the given unit is null, then this method does nothing and returns null.

Special case
If the WKT conventions are WKT1_COMMON_UNITS, then this method ignores the given unit and returns null. See Convention#WKT1_COMMON_UNITS javadoc for more information.

Popular methods of Formatter

  • append
    Appends a boolean value. The Symbols#getSeparator() will be written before the boolean if needed.
  • newLine
    Request a line separator before the next element to format. Invoking this method before any append(…
  • <init>
    Creates a new formatter instance with the specified convention, symbols and indentation.
  • appendAny
    Appends an object or an array of objects. This method performs the following choices: * If the given
  • getConvention
    Returns the convention to use for formatting the WKT. The default is Convention#WKT2.
  • getEnclosingElement
    Returns the enclosing WKT element, or null if element being formatted is the root. This method can b
  • getLocale
    Returns the locale to use for localizing InternationalString instances. This is not the locale for
  • indent
    Increases or decreases the indentation. A value of +1 increases the indentation by the amount of spa
  • setInvalidWKT
    Marks the current WKT representation of the given object as not strictly compliant with the WKT spec
  • toWKT
    Returns the WKT formatted by this object.
  • appendComplement
    Appends the optional complementary attributes common to many IdentifiedObject subtypes. Those attrib
  • appendElement
    Tries to append an object of the KEYWORD[something] form. The given value is typically, but not nece
  • appendComplement,
  • appendElement,
  • appendExact,
  • appendForSubtypes,
  • appendOnNewLine,
  • appendPreset,
  • appendSeparator,
  • appendTemporalExtent,
  • appendValue

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • compareTo (BigDecimal)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Top plugins for WebStorm
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