Codota Logo
DecimalCoordinateFormatter.<init>
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
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<init>

Javadoc

Creates a new DecimalCoordinateFormatter instance that uses #DEFAULT_PLACES.

Popular methods of DecimalCoordinateFormatter

    Popular in Java

    • Reading from database using SQL prepared statement
    • requestLocationUpdates (LocationManager)
    • getResourceAsStream (ClassLoader)
      Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
    • scheduleAtFixedRate (Timer)
      Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
    • PrintWriter (java.io)
      Prints formatted representations of objects to a text-output stream. This class implements all of th
    • BigDecimal (java.math)
      An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
    • ByteBuffer (java.nio)
      A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
    • Properties (java.util)
      The Properties class represents a persistent set of properties. The Properties can be saved to a st
    • Set (java.util)
      A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
    • Stream (java.util.stream)
      A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
    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