Codota Logo
Formatter.getConvention
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: org.apache.sis.core/sis-referencing

/**
 * Formats this CRS as a <cite>Well Known Text</cite> {@code ImageCRS[…]} element.
 *
 * <div class="note"><b>Compatibility note:</b>
 * {@code ImageCRS} are defined in the WKT 2 specification only.</div>
 *
 * @return {@code "ImageCRS"}.
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#79">WKT 2 specification §12</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  if (formatter.getConvention().majorVersion() == 1) {
    formatter.setInvalidWKT(this, null);
  }
  return WKTKeywords.ImageCRS;
}
origin: apache/sis

/**
 * Formats this CRS as a <cite>Well Known Text</cite> {@code ImageCRS[…]} element.
 *
 * <div class="note"><b>Compatibility note:</b>
 * {@code ImageCRS} are defined in the WKT 2 specification only.</div>
 *
 * @return {@code "ImageCRS"}.
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#79">WKT 2 specification §12</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  if (formatter.getConvention().majorVersion() == 1) {
    formatter.setInvalidWKT(this, null);
  }
  return WKTKeywords.ImageCRS;
}
origin: org.apache.sis.core/sis-referencing

/**
 * Formats this CRS as a <cite>Well Known Text</cite> {@code VerticalCRS[…]} element.
 *
 * @return {@code "VerticalCRS"} (WKT 2) or {@code "Vert_CS"} (WKT 1).
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#69">WKT 2 specification §10</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  return (formatter.getConvention().majorVersion() == 1) ? WKTKeywords.Vert_CS
      : isBaseCRS(formatter) ? WKTKeywords.BaseVertCRS
       : formatter.shortOrLong(WKTKeywords.VertCRS, WKTKeywords.VerticalCRS);
}
origin: org.apache.sis.core/sis-referencing

/**
 * Formats this CRS as a <cite>Well Known Text</cite> {@code EngineeringCRS[…]} element.
 *
 * @return {@code "EngineeringCRS"} (WKT 2) or {@code "Local_CS"} (WKT 1).
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#74">WKT 2 specification §11</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  return (formatter.getConvention().majorVersion() == 1) ? WKTKeywords.Local_CS
      : isBaseCRS(formatter) ? WKTKeywords.BaseEngCRS
       : formatter.shortOrLong(WKTKeywords.EngCRS, WKTKeywords.EngineeringCRS);
}
origin: apache/sis

/**
 * Formats this CRS as a <cite>Well Known Text</cite> {@code EngineeringCRS[…]} element.
 *
 * @return {@code "EngineeringCRS"} (WKT 2) or {@code "Local_CS"} (WKT 1).
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#74">WKT 2 specification §11</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  return (formatter.getConvention().majorVersion() == 1) ? WKTKeywords.Local_CS
      : isBaseCRS(formatter) ? WKTKeywords.BaseEngCRS
       : formatter.shortOrLong(WKTKeywords.EngCRS, WKTKeywords.EngineeringCRS);
}
origin: apache/sis

/**
 * Formats this CRS as a <cite>Well Known Text</cite> {@code VerticalCRS[…]} element.
 *
 * @return {@code "VerticalCRS"} (WKT 2) or {@code "Vert_CS"} (WKT 1).
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#69">WKT 2 specification §10</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  return (formatter.getConvention().majorVersion() == 1) ? WKTKeywords.Vert_CS
      : isBaseCRS(formatter) ? WKTKeywords.BaseVertCRS
       : formatter.shortOrLong(WKTKeywords.VertCRS, WKTKeywords.VerticalCRS);
}
origin: org.apache.sis.core/sis-referencing

/**
 * Formats this datum as a <cite>Well Known Text</cite> {@code ParametricDatum[…]} element.
 *
 * <div class="note"><b>Compatibility note:</b>
 * {@code ParametricDatum} is defined in the WKT 2 specification only.</div>
 *
 * @return {@code "ParametricDatum"}.
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#83">WKT 2 specification</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  if (formatter.getConvention().majorVersion() == 1) {
    formatter.setInvalidWKT(this, null);
  }
  return formatter.shortOrLong(WKTKeywords.PDatum, WKTKeywords.ParametricDatum);
}
origin: org.apache.sis.core/sis-referencing

/**
 * Formats this CRS as a <cite>Well Known Text</cite> {@code ParametricCRS[…]} element.
 *
 * <div class="note"><b>Compatibility note:</b>
 * {@code ParametricCRS} is defined in the WKT 2 specification only.</div>
 *
 * @return {@code "ParametricCRS"}.
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#83">WKT 2 specification</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  if (formatter.getConvention().majorVersion() == 1) {
    formatter.setInvalidWKT(this, null);
  }
  return isBaseCRS(formatter) ? WKTKeywords.BaseParamCRS : WKTKeywords.ParametricCRS;
}
origin: apache/sis

/**
 * Formats this CRS as a <cite>Well Known Text</cite> {@code TimeCRS[…]} element.
 *
 * <div class="note"><b>Compatibility note:</b>
 * {@code TimeCRS} is defined in the WKT 2 specification only.</div>
 *
 * @return {@code "TimeCRS"}.
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#88">WKT 2 specification §14</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  if (formatter.getConvention().majorVersion() == 1) {
    formatter.setInvalidWKT(this, null);
  }
  return isBaseCRS(formatter) ? WKTKeywords.BaseTimeCRS : WKTKeywords.TimeCRS;
}
origin: org.apache.sis.core/sis-referencing

/**
 * Formats this CRS as a <cite>Well Known Text</cite> {@code TimeCRS[…]} element.
 *
 * <div class="note"><b>Compatibility note:</b>
 * {@code TimeCRS} is defined in the WKT 2 specification only.</div>
 *
 * @return {@code "TimeCRS"}.
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#88">WKT 2 specification §14</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  if (formatter.getConvention().majorVersion() == 1) {
    formatter.setInvalidWKT(this, null);
  }
  return isBaseCRS(formatter) ? WKTKeywords.BaseTimeCRS : WKTKeywords.TimeCRS;
}
origin: apache/sis

/**
 * Formats this datum as a <cite>Well Known Text</cite> {@code ParametricDatum[…]} element.
 *
 * <div class="note"><b>Compatibility note:</b>
 * {@code ParametricDatum} is defined in the WKT 2 specification only.</div>
 *
 * @return {@code "ParametricDatum"}.
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#83">WKT 2 specification</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  if (formatter.getConvention().majorVersion() == 1) {
    formatter.setInvalidWKT(this, null);
  }
  return formatter.shortOrLong(WKTKeywords.PDatum, WKTKeywords.ParametricDatum);
}
origin: apache/sis

/**
 * Formats this CRS as a <cite>Well Known Text</cite> {@code ParametricCRS[…]} element.
 *
 * <div class="note"><b>Compatibility note:</b>
 * {@code ParametricCRS} is defined in the WKT 2 specification only.</div>
 *
 * @return {@code "ParametricCRS"}.
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#83">WKT 2 specification</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  if (formatter.getConvention().majorVersion() == 1) {
    formatter.setInvalidWKT(this, null);
  }
  return isBaseCRS(formatter) ? WKTKeywords.BaseParamCRS : WKTKeywords.ParametricCRS;
}
origin: org.apache.sis.core/sis-referencing

/**
 * Formats this datum as a <cite>Well Known Text</cite> {@code EngineeringDatum[…]} element.
 *
 * @return {@code "EngineeringDatum"} (WKT 2) or {@code "Local_Datum"} (WKT 1).
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#76">WKT 2 specification §11.2</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  if (formatter.getConvention().majorVersion() == 1) {
    /*
     * Datum type was provided for all kind of datum in the legacy OGC 01-009 specification.
     * Datum types became provided only for vertical datum in the ISO 19111:2003 specification,
     * then removed completely in the ISO 19111:2007 revision. We are supposed to format them
     * in WKT 1, but do not have any indication about what the values should be.
     */
    formatter.append(0);
    return WKTKeywords.Local_Datum;
  }
  return formatter.shortOrLong(WKTKeywords.EDatum, WKTKeywords.EngineeringDatum);
}
origin: apache/sis

/**
 * Formats this datum as a <cite>Well Known Text</cite> {@code EngineeringDatum[…]} element.
 *
 * @return {@code "EngineeringDatum"} (WKT 2) or {@code "Local_Datum"} (WKT 1).
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#76">WKT 2 specification §11.2</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  if (formatter.getConvention().majorVersion() == 1) {
    /*
     * Datum type was provided for all kind of datum in the legacy OGC 01-009 specification.
     * Datum types became provided only for vertical datum in the ISO 19111:2003 specification,
     * then removed completely in the ISO 19111:2007 revision. We are supposed to format them
     * in WKT 1, but do not have any indication about what the values should be.
     */
    formatter.append(0);
    return WKTKeywords.Local_Datum;
  }
  return formatter.shortOrLong(WKTKeywords.EDatum, WKTKeywords.EngineeringDatum);
}
origin: org.apache.sis.core/sis-referencing

/**
 * Formats this datum as a <cite>Well Known Text</cite> {@code VerticalDatum[…]} element.
 *
 * <div class="note"><b>Compatibility note:</b>
 * OGC 01-009 defined numerical codes for various vertical datum types, for example 2005 for geoidal height
 * and 2002 for ellipsoidal height. Such codes were formatted for all {@code Datum} subtypes in WKT 1.
 * Datum types became provided only for vertical datum in the ISO 19111:2003 specification, then removed
 * completely in ISO 19111:2007.</div>
 *
 * @return {@code "VerticalDatum"} (WKT 2) or {@code "Vert_Datum"} (WKT 1).
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#71">WKT 2 specification §10.2</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  if (formatter.getConvention().majorVersion() == 1) {
    formatter.append(VerticalDatumTypes.toLegacy(type()));
    return WKTKeywords.Vert_Datum;
  }
  return formatter.shortOrLong(WKTKeywords.VDatum, WKTKeywords.VerticalDatum);
}
origin: org.apache.sis.core/sis-referencing

/**
 * Formats this datum as a <cite>Well Known Text</cite> {@code ImageDatum[…]} element.
 *
 * <div class="note"><b>Compatibility note:</b>
 * {@code ImageDatum} is defined in the WKT 2 specification only.</div>
 *
 * @return {@code "ImageDatum"}.
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#81">WKT 2 specification §12.2</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  final Convention convention = formatter.getConvention();
  if (convention == Convention.INTERNAL) {
    formatter.append(getPixelInCell());         // This is an extension compared to ISO 19162.
  } else if (convention.majorVersion() == 1) {
    formatter.setInvalidWKT(this, null);
  }
  return formatter.shortOrLong(WKTKeywords.IDatum, WKTKeywords.ImageDatum);
}
origin: apache/sis

/**
 * Formats this datum as a <cite>Well Known Text</cite> {@code ImageDatum[…]} element.
 *
 * <div class="note"><b>Compatibility note:</b>
 * {@code ImageDatum} is defined in the WKT 2 specification only.</div>
 *
 * @return {@code "ImageDatum"}.
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#81">WKT 2 specification §12.2</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  final Convention convention = formatter.getConvention();
  if (convention == Convention.INTERNAL) {
    formatter.append(getPixelInCell());         // This is an extension compared to ISO 19162.
  } else if (convention.majorVersion() == 1) {
    formatter.setInvalidWKT(this, null);
  }
  return formatter.shortOrLong(WKTKeywords.IDatum, WKTKeywords.ImageDatum);
}
origin: apache/sis

/**
 * Formats this datum as a <cite>Well Known Text</cite> {@code VerticalDatum[…]} element.
 *
 * <div class="note"><b>Compatibility note:</b>
 * OGC 01-009 defined numerical codes for various vertical datum types, for example 2005 for geoidal height
 * and 2002 for ellipsoidal height. Such codes were formatted for all {@code Datum} subtypes in WKT 1.
 * Datum types became provided only for vertical datum in the ISO 19111:2003 specification, then removed
 * completely in ISO 19111:2007.</div>
 *
 * @return {@code "VerticalDatum"} (WKT 2) or {@code "Vert_Datum"} (WKT 1).
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#71">WKT 2 specification §10.2</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  if (formatter.getConvention().majorVersion() == 1) {
    formatter.append(VerticalDatumTypes.toLegacy(type()));
    return WKTKeywords.Vert_Datum;
  }
  return formatter.shortOrLong(WKTKeywords.VDatum, WKTKeywords.VerticalDatum);
}
origin: org.apache.sis.core/sis-referencing

/**
 * Formats this datum as a <cite>Well Known Text</cite> {@code TimeDatum[…]} element.
 *
 * <div class="note"><b>Compatibility note:</b>
 * {@code TimeDatum} is defined in the WKT 2 specification only.</div>
 *
 * @return {@code "TimeDatum"}.
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#90">WKT 2 specification §14.2</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  formatter.append(new Origin(getOrigin()));
  if (formatter.getConvention().majorVersion() == 1) {
    formatter.setInvalidWKT(this, null);
  }
  return formatter.shortOrLong(WKTKeywords.TDatum, WKTKeywords.TimeDatum);
}
origin: apache/sis

/**
 * Formats this datum as a <cite>Well Known Text</cite> {@code TimeDatum[…]} element.
 *
 * <div class="note"><b>Compatibility note:</b>
 * {@code TimeDatum} is defined in the WKT 2 specification only.</div>
 *
 * @return {@code "TimeDatum"}.
 *
 * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#90">WKT 2 specification §14.2</a>
 */
@Override
protected String formatTo(final Formatter formatter) {
  super.formatTo(formatter);
  formatter.append(new Origin(getOrigin()));
  if (formatter.getConvention().majorVersion() == 1) {
    formatter.setInvalidWKT(this, null);
  }
  return formatter.shortOrLong(WKTKeywords.TDatum, WKTKeywords.TimeDatum);
}
org.apache.sis.io.wktFormattergetConvention

Javadoc

Returns the convention to use for formatting the WKT. The default is Convention#WKT2.

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
  • 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
  • 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

  • Creating JSON documents from java classes using gson
  • getContentResolver (Context)
  • addToBackStack (FragmentTransaction)
  • runOnUiThread (Activity)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • JButton (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now