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

How to use
DecimalCoordinateFormatter
in
org.deegree.geometry.io

Best Java code snippets using org.deegree.geometry.io.DecimalCoordinateFormatter (Showing top 8 results out of 315)

origin: deegree/deegree3

/**
 * Create a wkt writer with the given flags and formatter.
 * 
 * @param flags
 *            signaling the capabilities of this writer, if <code>null</code> only some geometries can be exported
 *            (all dialects are disabled).
 * @param formatter
 *            to use, if <code>null</code> the default decimal formatter with 5 decimals is used.
 */
public WKTWriter( Set<WKTFlag> flags, CoordinateFormatter formatter ) {
  this.flags = flags;
  if ( this.flags == null ) {
    this.flags = new HashSet<WKTFlag>();
  }
  if ( formatter == null ) {
    this.formatter = new DecimalCoordinateFormatter();
  } else {
    this.formatter = formatter;
  }
}
origin: deegree/deegree3

private static GMLStreamWriter createGml32StreamWriter( XMLStreamWriter writer )
            throws XMLStreamException {
  GMLStreamWriter gmlWriter = GMLOutputFactory.createGMLStreamWriter( GML_32, writer );
  gmlWriter.setCoordinateFormatter( new DecimalCoordinateFormatter( 3 ) );
  Map<String, String> bindings = new HashMap<String, String>();
  bindings.put( GML_PREFIX, GML3_2_NS );
  writer.writeNamespace( GML_PREFIX, GML3_2_NS );
  gmlWriter.setNamespaceBindings( bindings );
  return gmlWriter;
}
origin: deegree/deegree3

/**
 * Creates a new {@link GML2GeometryWriter} instance.
 * 
 * @param gmlStream
 *            gml stream writer, must not be <code>null</code>
 */
public GML2GeometryWriter( GMLStreamWriter gmlStream ) {
  super( gmlStream );
  this.outputCRS = gmlStream.getOutputCrs();
  this.simplifier = gmlStream.getGeometrySimplifier();
  IUnit crsUnits = null;
  if ( outputCRS != null ) {
    try {
      ICRS crs = outputCRS;
      crsUnits = crs.getAxis()[0].getUnits();
      transformer = new CoordinateTransformer( crs );
      transformedOrdinates = new double[crs.getDimension()];
      // geoTransformer = new GeometryTransformer( crs );
    } catch ( Exception e ) {
      LOG.debug( "Could not create transformer for CRS '" + outputCRS + "': " + e.getMessage()
            + ". Encoding will fail if a transformation is actually necessary." );
    }
  }
  formatter = gmlStream.getCoordinateFormatter();
  if ( formatter == null ) {
    formatter = new DecimalCoordinateFormatter( crsUnits );
  }
}
origin: deegree/deegree3

/**
 * Creates a new {@link GML3GeometryWriter} instance.
 *
 * @param gmlStreamWriter
 *            gml stream writer, must not be <code>null</code>
 */
public GML3GeometryWriter( GMLStreamWriter gmlStreamWriter ) {
  super( gmlStreamWriter );
  this.outputCRS = gmlStreamWriter.getOutputCrs();
  this.simplifier = gmlStreamWriter.getGeometrySimplifier();
  IUnit crsUnits = null;
  if ( outputCRS != null ) {
    try {
      ICRS crs = outputCRS;
      crsUnits = crs.getAxis()[0].getUnits();
      transformer = new CoordinateTransformer( crs );
      transformedOrdinates = new double[crs.getDimension()];
      geoTransformer = new GeometryTransformer( crs );
    } catch ( Exception e ) {
      LOG.debug( "Could not create transformer for CRS '" + outputCRS + "': " + e.getMessage()
            + ". Encoding will fail if a transformation is actually necessary." );
    }
  }
  formatter = gmlStreamWriter.getCoordinateFormatter();
  if ( formatter == null ) {
    formatter = new DecimalCoordinateFormatter( crsUnits );
  }
}
origin: deegree/deegree3

final CoordinateFormatter formatter = new DecimalCoordinateFormatter( 8 );
try {
  latlon = CRSManager.lookup( "CRS:84" );
origin: deegree/deegree3

  LOG.info( "Setting up configured DecimalCoordinateFormatter." );
  org.deegree.services.jaxb.wfs.DecimalCoordinateFormatter decimalFormatterConf = (org.deegree.services.jaxb.wfs.DecimalCoordinateFormatter) formatterConf;
  formatter = new DecimalCoordinateFormatter( decimalFormatterConf.getPlaces().intValue() );
} else if ( formatterConf instanceof org.deegree.services.jaxb.wfs.CustomCoordinateFormatter ) {
  LOG.info( "Setting up CustomCoordinateFormatter." );
origin: deegree/deegree3

gmlWriter.setCoordinateFormatter( new DecimalCoordinateFormatter( 3 ) );
Map<String, String> bindings = new HashMap<String, String>();
bindings.put( "gml", GML_31.getNamespace() );
origin: deegree/deegree3

public static void writeSrsAndEnvelope( XMLStreamWriter writer, List<ICRS> crsList, Envelope layerEnv )
            throws XMLStreamException {
  writeSrs( crsList, writer );
  final CoordinateFormatter formatter = new DecimalCoordinateFormatter( 8 );
  ICRS latlon;
  try {
org.deegree.geometry.ioDecimalCoordinateFormatter

Javadoc

CoordinateFormatter based on DecimalFormat.

Most used methods

  • <init>
    Creates a new DecimalCoordinateFormatter instance suitable for the specified Unit.

Popular in Java

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • findViewById (Activity)
  • getApplicationContext (Context)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Top Vim 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