Tabnine Logo
PolygonPatch.getExteriorRing
Code IndexAdd Tabnine to your IDE (free)

How to use
getExteriorRing
method
in
org.deegree.geometry.primitive.patches.PolygonPatch

Best Java code snippets using org.deegree.geometry.primitive.patches.PolygonPatch.getExteriorRing (Showing top 10 results out of 315)

origin: deegree/deegree3

@Override
public Points getExteriorRingCoordinates() {
  if ( patches.size() == 1 ) {
    if ( patches.get( 0 ) instanceof PolygonPatch ) {
      PolygonPatch patch = (PolygonPatch) patches.get( 0 );
      return patch.getExteriorRing().getControlPoints();
    }
    throw new IllegalArgumentException( Messages.getMessage( "SURFACE_IS_NON_PLANAR" ) );
  }
  throw new IllegalArgumentException( Messages.getMessage( "SURFACE_MORE_THAN_ONE_PATCH" ) );
}
origin: deegree/deegree3

private void exportPolygonPatch( PolygonPatch polygonPatch )
            throws XMLStreamException, UnknownCRSException, TransformationException {
  switch ( polygonPatch.getPolygonPatchType() ) {
  case POLYGON_PATCH:
    writer.writeStartElement( gmlNs, "PolygonPatch" );
    writer.writeStartElement( gmlNs, "exterior" );
    exportRing( polygonPatch.getExteriorRing() );
    writer.writeEndElement();
    for ( Ring ring : polygonPatch.getInteriorRings() ) {
      writer.writeStartElement( gmlNs, "interior" );
      exportRing( ring );
      writer.writeEndElement();
    }
    writer.writeEndElement();
    break;
  case TRIANGLE:
    exportTriangle( (Triangle) polygonPatch );
    break;
  case RECTANGLE:
    exportRectangle( (Rectangle) polygonPatch );
    break;
  }
}
origin: deegree/deegree3

Ring exterior = patch.getExteriorRing();
float[] extC = extractGeometries( exterior, min, max );
if ( extC == null ) {
origin: deegree/deegree3

  /**
   * Returns a linearized version (i.e. a {@link PolygonPatch} that only uses {@link LinearRing}s as boundaries) of
   * the given {@link PolygonPatch}.
   * 
   * @param patch
   * @param crit
   *            determines the interpolation quality / number of interpolation points
   * @return {@link PolygonPatch} that only uses {@link LinearRing}s as boundaries
   */
  public PolygonPatch linearize( PolygonPatch patch, LinearizationCriterion crit ) {

    Ring exteriorRing = patch.getExteriorRing();
    Ring linearizedExteriorRing = null;
    if ( exteriorRing != null ) {
      linearizedExteriorRing = (Ring) curveLinearizer.linearize( exteriorRing, crit );
    }

    List<Ring> interiorRings = patch.getInteriorRings();
    List<Ring> linearizedInteriorRings = new ArrayList<Ring>( interiorRings.size() );
    for ( Ring interiorRing : interiorRings ) {
      linearizedInteriorRings.add( (Ring) curveLinearizer.linearize( interiorRing, crit ) );
    }
    return geomFac.createPolygonPatch( linearizedExteriorRing, linearizedInteriorRings );
  }
}
origin: deegree/deegree3

  @Override
  protected com.vividsolutions.jts.geom.Geometry buildJTSGeometry() {

    if ( patches.size() < 1 || !( patches.get( 0 ) instanceof PolygonPatch ) ) {
      throw new IllegalArgumentException( Messages.getMessage( "SURFACE_NOT_EQUIVALENT_TO_POLYGON" ) );
    }

    // TODO handle the other patches as well
    PolygonPatch patch = (PolygonPatch) patches.get( 0 );
    Ring exteriorRing = patch.getExteriorRing();
    List<Ring> interiorRings = patch.getInteriorRings();

    LinearRing shell = (LinearRing) getAsDefaultGeometry( exteriorRing ).getJTSGeometry();
    LinearRing[] holes = null;
    if ( interiorRings != null ) {
      holes = new LinearRing[interiorRings.size()];
      int i = 0;
      for ( Ring ring : interiorRings ) {
        holes[i++] = (LinearRing) getAsDefaultGeometry( ring ).getJTSGeometry();
      }
    }
    return jtsFactory.createPolygon( shell, holes );
  }
}
origin: deegree/deegree3

private void writePolygonPatch( String id, ICRS crs, PrecisionModel pm, PolygonPatch polyPatch, Writer writer )
            throws IOException {
  PolygonPatchType type = polyPatch.getPolygonPatchType();
  Polygon poly = null;
  switch ( type ) {
  case POLYGON_PATCH:
  case RECTANGLE:
  case TRIANGLE:
    poly = new DefaultPolygon( id, crs, pm, polyPatch.getExteriorRing(), polyPatch.getInteriorRings() );
    break;
  }
  writePolygonWithoutPrefix( poly, writer );
}
origin: deegree/deegree3

private PolygonPatch transform( PolygonPatch patch, Transformation trans )
            throws TransformationException {
  Ring exterior = patch.getExteriorRing();
  LinearRing transformedExteriorRing = transform( exterior, trans );
  PolygonPatch result = null;
  PolygonPatchType type = patch.getPolygonPatchType();
  switch ( type ) {
  case POLYGON_PATCH:
    List<Ring> interiorRings = ( patch ).getInteriorRings();
    List<Ring> transformedInteriorRings = new ArrayList<Ring>( interiorRings == null ? 0 : interiorRings.size() );
    if ( interiorRings != null && !interiorRings.isEmpty() ) {
      for ( Ring interior : interiorRings ) {
        if ( interior != null ) {
          LinearRing lr = transform( interior, trans );
          transformedInteriorRings.add( lr );
        }
      }
    }
    result = geomFactory.createPolygonPatch( transformedExteriorRing, transformedInteriorRings );
    break;
  case RECTANGLE:
    result = geomFactory.createRectangle( transformedExteriorRing );
    break;
  case TRIANGLE:
    result = geomFactory.createTriangle( transformedExteriorRing );
    break;
  }
  return result;
}
origin: deegree/deegree3

Ring exteriorRing = patch.getExteriorRing();
List<Ring> interiorRings = patch.getInteriorRings();
simplified = geomFac.createPolygon( geometry.getId(), geometry.getCoordinateSystem(), exteriorRing,
  Ring exteriorRing = ( (PolygonPatch) patch ).getExteriorRing();
  List<Ring> interiorRings = ( (PolygonPatch) patch ).getInteriorRings();
  members.add( geomFac.createPolygon( null, geometry.getCoordinateSystem(), exteriorRing,
origin: deegree/deegree3

Ring exteriorRing = patch.getExteriorRing();
if ( !validateCurve( exteriorRing, affectedGeometryParticles2 ) ) {
  isValid = false;
origin: deegree/deegree3

for ( SurfacePatch patch : s.getPatches() ) {
  if ( patch instanceof PolygonPatch ) {
    Ring exterior = ( (PolygonPatch) patch ).getExteriorRing();
    LinearRing movedExteriorRing = null;
    if ( exterior != null ) {
org.deegree.geometry.primitive.patchesPolygonPatchgetExteriorRing

Javadoc

Returns the exterior ring of the patch.

Please note that the exterior may be empty (null). The following explanation is from the GML 3.1.1 spec (section 9.2.2.5): In the normal 2D case, one of these rings is distinguished as being the exterior boundary. In a general manifold this is not always possible, in which case all boundaries shall be listed as interior boundaries, and the exterior will be empty.

Popular methods of PolygonPatch

  • getInteriorRings
  • getPolygonPatchType
  • getBoundaryRings
    Returns the boundary rings (interior + exteriors)
  • getCoordinateDimension

Popular in Java

  • Making http post requests using okhttp
  • setContentView (Activity)
  • runOnUiThread (Activity)
  • getResourceAsStream (ClassLoader)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JList (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Best IntelliJ 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