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

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

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

origin: apache/sis

/**
 * Appends the given geographic bounding box in a {@code BBOX[…]} element.
 * Longitude and latitude values will be formatted in decimal degrees.
 * Longitudes are relative to the Greenwich meridian, with values increasing toward East.
 * Latitudes values are increasing toward North.
 *
 * <div class="section">Numerical precision</div>
 * The ISO 19162 standards recommends to format those values with only 2 decimal digits.
 * This is because {@code GeographicBoundingBox} does not specify the datum, so this box
 * is an approximated information only.
 *
 * @param  bbox  the geographic bounding box to append to the WKT, or {@code null}.
 * @param  fractionDigits  the number of fraction digits to use. The recommended value is 2.
 */
public void append(final GeographicBoundingBox bbox, final int fractionDigits) {
  if (bbox != null) {
    openElement(isComplement, WKTKeywords.BBox);
    setColor(ElementKind.EXTENT);
    numberFormat.setMinimumFractionDigits(fractionDigits);
    numberFormat.setMaximumFractionDigits(fractionDigits);
    numberFormat.setRoundingMode(RoundingMode.FLOOR);
    appendPreset(bbox.getSouthBoundLatitude());
    appendPreset(bbox.getWestBoundLongitude());
    numberFormat.setRoundingMode(RoundingMode.CEILING);
    appendPreset(bbox.getNorthBoundLatitude());
    appendPreset(bbox.getEastBoundLongitude());
    resetColor();
    closeElement(isComplement);
  }
}
origin: org.apache.sis.core/sis-metadata

/**
 * Appends the given geographic bounding box in a {@code BBOX[…]} element.
 * Longitude and latitude values will be formatted in decimal degrees.
 * Longitudes are relative to the Greenwich meridian, with values increasing toward East.
 * Latitudes values are increasing toward North.
 *
 * <div class="section">Numerical precision</div>
 * The ISO 19162 standards recommends to format those values with only 2 decimal digits.
 * This is because {@code GeographicBoundingBox} does not specify the datum, so this box
 * is an approximative information only.
 *
 * @param  bbox  the geographic bounding box to append to the WKT, or {@code null}.
 * @param  fractionDigits  the number of fraction digits to use. The recommended value is 2.
 */
public void append(final GeographicBoundingBox bbox, final int fractionDigits) {
  if (bbox != null) {
    openElement(isComplement, WKTKeywords.BBox);
    setColor(ElementKind.EXTENT);
    numberFormat.setMinimumFractionDigits(fractionDigits);
    numberFormat.setMaximumFractionDigits(fractionDigits);
    numberFormat.setRoundingMode(RoundingMode.FLOOR);
    appendPreset(bbox.getSouthBoundLatitude());
    appendPreset(bbox.getWestBoundLongitude());
    numberFormat.setRoundingMode(RoundingMode.CEILING);
    appendPreset(bbox.getNorthBoundLatitude());
    appendPreset(bbox.getEastBoundLongitude());
    resetColor();
    closeElement(isComplement);
  }
}
origin: org.apache.sis.core/sis-metadata

numberFormat.setMinimumFractionDigits(minimumFractionDigits);
numberFormat.setMaximumFractionDigits(maximumFractionDigits);
numberFormat.setRoundingMode(RoundingMode.FLOOR);   appendPreset(min);
numberFormat.setRoundingMode(RoundingMode.CEILING); appendPreset(max);
final Unit<?> unit = range.unit();
if (!convention.isSimplified() || !Units.METRE.equals(unit)) {
origin: apache/sis

numberFormat.setMinimumFractionDigits(minimumFractionDigits);
numberFormat.setMaximumFractionDigits(maximumFractionDigits);
numberFormat.setRoundingMode(RoundingMode.FLOOR);   appendPreset(min);
numberFormat.setRoundingMode(RoundingMode.CEILING); appendPreset(max);
final Unit<?> unit = range.unit();
if (!convention.isSimplified() || !Units.METRE.equals(unit)) {
org.apache.sis.io.wktFormatterappendPreset

Javadoc

Appends the given number without any change to the NumberFormat setting. Caller shall ensure that the following method has been invoked prior this method call:
  • NumberFormat#setMinimumFractionDigits(int)
  • NumberFormat#setMaximumFractionDigits(int)
  • NumberFormat#setRoundingMode(RoundingMode)

Popular methods of Formatter

  • append
    Appends rows of numbers. Each number is separated by a space, and each row is separated by a comma.
  • 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.
  • addContextualUnit
    Adds a unit to use for the next measurements of the quantity Q. The given unit will apply to all WKT
  • appendComplement
    Appends the optional complementary attributes common to many IdentifiedObject subtypes. Those attrib
  • addContextualUnit,
  • appendComplement,
  • appendElement,
  • appendExact,
  • appendForSubtypes,
  • appendOnNewLine,
  • 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 PhpStorm plugins
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