Codota Logo
DecimalCoordinateFormatter
Code IndexAdd Codota 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)

  • 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

Javadoc

CoordinateFormatter based on DecimalFormat.

Most used methods

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

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Menu (java.awt)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
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