Tabnine Logo
Ring.getPrecision
Code IndexAdd Tabnine to your IDE (free)

How to use
getPrecision
method
in
org.deegree.geometry.primitive.Ring

Best Java code snippets using org.deegree.geometry.primitive.Ring.getPrecision (Showing top 3 results out of 315)

origin: deegree/deegree3

/**
 * Returns a fixed version of the given {@link Ring} object.
 * 
 * @param ring
 *            ring to be repaired
 * @return repaired ring, never <code>null</code>
 */
public static Ring fixUnclosedRing( Ring ring ) {
  Ring repaired = null;
  switch ( ring.getRingType() ) {
  case LinearRing: {
    LinearRing linearRing = (LinearRing) ring;
    Points fixedPoints = getFixedPoints( linearRing.getControlPoints(), linearRing.getStartPoint() );
    repaired = new DefaultLinearRing( ring.getId(), ring.getCoordinateSystem(), ring.getPrecision(),
                     fixedPoints );
    break;
  }
  case Ring: {
    List<Curve> repairedCurves = new ArrayList<Curve>( ring.getMembers() );
    Curve lastCurve = repairedCurves.get( repairedCurves.size() - 1 );
    repairedCurves.set( repairedCurves.size() - 1, fixCurve( lastCurve, ring.getStartPoint() ) );
    repaired = new DefaultRing( ring.getId(), ring.getCoordinateSystem(), ring.getPrecision(), repairedCurves );
    break;
  }
  }
  repaired.setProperties( ring.getProperties() );
  return repaired;
}
origin: deegree/deegree3

public static Ring invertOrientation( Ring ring ) {
  Ring fixedRing = null;
  switch ( ring.getRingType() ) {
  case LinearRing: {
    LinearRing linearRing = (LinearRing) ring;
    fixedRing = new DefaultLinearRing( ring.getId(), ring.getCoordinateSystem(), ring.getPrecision(),
                      invertOrientation( linearRing.getControlPoints() ) );
    break;
  }
  case Ring: {
    List<Curve> fixedMemberCurves = new ArrayList<Curve>( ring.getMembers().size() );
    for ( Curve memberCurve : ring.getMembers() ) {
      fixedMemberCurves.add( invertOrientation( memberCurve ) );
    }
    fixedRing = new DefaultRing( ring.getId(), ring.getCoordinateSystem(), ring.getPrecision(),
                   fixedMemberCurves );
    break;
  }
  }
  fixedRing.setProperties( ring.getProperties() );
  return fixedRing;
}
origin: deegree/deegree3

LinearRing linearRing = (LinearRing) ring;
Points fixedPoints = getFixedPoints( linearRing.getControlPoints(), linearRing.getStartPoint() );
fixedCurve = new DefaultLinearRing( ring.getId(), ring.getCoordinateSystem(), ring.getPrecision(),
                  fixedPoints );
break;
Curve lastCurve = repairedCurves.get( repairedCurves.size() - 1 );
repairedCurves.set( repairedCurves.size() - 1, fixCurve( lastCurve, ring.getStartPoint() ) );
fixedCurve = new DefaultRing( ring.getId(), ring.getCoordinateSystem(), ring.getPrecision(),
               repairedCurves );
break;
org.deegree.geometry.primitiveRinggetPrecision

Popular methods of Ring

  • getRingType
    Returns the type of ring.
  • getAsLineString
  • getControlPoints
  • getId
  • getMembers
    Returns the Curves that constitute this Ring.
  • setProperties
  • getCoordinateDimension
  • getCoordinateSystem
  • getProperties
  • getStartPoint
  • setType
  • setType

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (Timer)
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Best plugins for Eclipse
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