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

How to use
Polygon
in
de.micromata.opengis.kml.v_2_2_0

Best Java code snippets using de.micromata.opengis.kml.v_2_2_0.Polygon (Showing top 20 results out of 315)

origin: de.micromata.jak/JavaAPIforKml

/**
 * Create an instance of {@link Polygon}
 * 
 */
public static Polygon createPolygon() {
  return new Polygon();
}
origin: de.micromata.jak/JavaAPIforKml

/**
 * fluent setter
 * @see #setAltitudeMode(Object)
 * 
 * @param altitudeMode
 *     required parameter
 */
public Polygon withAltitudeMode(final  AltitudeMode altitudeMode) {
  this.setAltitudeMode(altitudeMode);
  return this;
}
origin: de.micromata.jak/JavaAPIforKml

/**
 * fluent setter
 * @see #setExtrude(Boolean)
 * 
 * @param extrude
 *     required parameter
 */
public Polygon withExtrude(final Boolean extrude) {
  this.setExtrude(extrude);
  return this;
}
origin: usc-isi-i2/Web-Karma

.withVisibility(true);
final de.micromata.opengis.kml.v_2_2_0.Polygon kmlPolygon = new de.micromata.opengis.kml.v_2_2_0.Polygon();
placemark.setGeometry(kmlPolygon);
kmlPolygon.setExtrude(true);
kmlPolygon.setAltitudeMode(AltitudeMode.CLAMP_TO_GROUND);
kmlPolygon.setOuterBoundaryIs(outerboundary);
  kmlPolygon.getInnerBoundaryIs().add(innerboundary);
origin: org.geoserver/kml

public void applyExtrusion(de.micromata.opengis.kml.v_2_2_0.Geometry kmlGeometry) {
  if(kmlGeometry instanceof de.micromata.opengis.kml.v_2_2_0.Polygon) {
    de.micromata.opengis.kml.v_2_2_0.Polygon polygon = (de.micromata.opengis.kml.v_2_2_0.Polygon) kmlGeometry;
    polygon.setExtrude(extrudeEnabled);
    polygon.setAltitudeMode(AltitudeMode.RELATIVE_TO_GROUND);
  } else if(kmlGeometry instanceof de.micromata.opengis.kml.v_2_2_0.LinearRing) {
    de.micromata.opengis.kml.v_2_2_0.LinearRing ring = (de.micromata.opengis.kml.v_2_2_0.LinearRing) kmlGeometry;
    ring.setExtrude(extrudeEnabled);
    ring.setTessellate(true);
    ring.setAltitudeMode(AltitudeMode.RELATIVE_TO_GROUND);
  } else if(kmlGeometry instanceof de.micromata.opengis.kml.v_2_2_0.LineString) {
    de.micromata.opengis.kml.v_2_2_0.LineString ls = (de.micromata.opengis.kml.v_2_2_0.LineString) kmlGeometry;
    ls.setExtrude(extrudeEnabled);
    ls.setTessellate(true);
    ls.setAltitudeMode(AltitudeMode.RELATIVE_TO_GROUND);
  } else if(kmlGeometry instanceof de.micromata.opengis.kml.v_2_2_0.Point) {
    de.micromata.opengis.kml.v_2_2_0.Point point = (de.micromata.opengis.kml.v_2_2_0.Point) kmlGeometry;
    point.setExtrude(extrudeEnabled);
    point.setAltitudeMode(AltitudeMode.RELATIVE_TO_GROUND);
  } else if(kmlGeometry instanceof MultiGeometry) {
    de.micromata.opengis.kml.v_2_2_0.MultiGeometry mg = (de.micromata.opengis.kml.v_2_2_0.MultiGeometry) kmlGeometry;
    for(de.micromata.opengis.kml.v_2_2_0.Geometry g : mg.getGeometry()) {
      applyExtrusion(g);
    }
  }
  
  
}
origin: org.geoserver/kml

} else if (geometry instanceof Polygon) {
  Polygon polygon = (Polygon) geometry;
  de.micromata.opengis.kml.v_2_2_0.Polygon kmlPolygon = new de.micromata.opengis.kml.v_2_2_0.Polygon();
  de.micromata.opengis.kml.v_2_2_0.LinearRing kmlOuterRing = convertLinearRing((LinearRing) polygon
      .getExteriorRing());
  kmlPolygon.createAndSetOuterBoundaryIs().setLinearRing(kmlOuterRing);
  for (int i = 0; i < polygon.getNumInteriorRing(); i++) {
    LinearRing interior = (LinearRing) polygon.getInteriorRingN(i);
    de.micromata.opengis.kml.v_2_2_0.LinearRing kmlInterior = convertLinearRing(interior);
    kmlPolygon.createAndAddInnerBoundaryIs().setLinearRing(kmlInterior);
origin: de.micromata.jak/JavaAPIforKml

@Override
public Polygon clone() {
  Polygon copy;
  copy = ((Polygon) super.clone());
  copy.outerBoundaryIs = ((outerBoundaryIs == null)?null:((Boundary) outerBoundaryIs.clone()));
  copy.innerBoundaryIs = new ArrayList<Boundary>((getInnerBoundaryIs().size()));
  for (Boundary iter: innerBoundaryIs) {
    copy.innerBoundaryIs.add(iter.clone());
  }
  copy.polygonSimpleExtension = new ArrayList<Object>((getPolygonSimpleExtension().size()));
  for (Object iter: polygonSimpleExtension) {
    copy.polygonSimpleExtension.add(iter);
  }
  copy.polygonObjectExtension = new ArrayList<AbstractObject>((getPolygonObjectExtension().size()));
  for (AbstractObject iter: polygonObjectExtension) {
    copy.polygonObjectExtension.add(iter.clone());
  }
  return copy;
}
origin: de.micromata.jak/JavaAPIforKml

/**
 * add a value to the innerBoundaryIs property collection
 * 
 * @param innerBoundaryIs
 *     Objects of the following type are allowed in the list: {@link Boundary}
 * @return
 *     <tt>true</tt> (as general contract of <tt>Collection.add</tt>). 
 */
public Polygon addToInnerBoundaryIs(final Boundary innerBoundaryIs) {
  this.getInnerBoundaryIs().add(innerBoundaryIs);
  return this;
}
origin: micromata/javaapiforkml

/**
 * fluent setter
 * @see #setOuterBoundaryIs(Boundary)
 * 
 * @param outerBoundaryIs
 *     required parameter
 */
public Polygon withOuterBoundaryIs(final Boundary outerBoundaryIs) {
  this.setOuterBoundaryIs(outerBoundaryIs);
  return this;
}
origin: micromata/javaapiforkml

/**
 * add a value to the polygonSimpleExtension property collection
 * 
 * @param polygonSimpleExtension
 *     Objects of the following type are allowed in the list: {@link Object}
 * @return
 *     <tt>true</tt> (as general contract of <tt>Collection.add</tt>). 
 */
public Polygon addToPolygonSimpleExtension(final Object polygonSimpleExtension) {
  this.getPolygonSimpleExtension().add(polygonSimpleExtension);
  return this;
}
origin: de.micromata.jak/JavaAPIforKml

/**
 * add a value to the polygonObjectExtension property collection
 * 
 * @param polygonObjectExtension
 *     Objects of the following type are allowed in the list: {@link AbstractObject}
 * @return
 *     <tt>true</tt> (as general contract of <tt>Collection.add</tt>). 
 */
public Polygon addToPolygonObjectExtension(final AbstractObject polygonObjectExtension) {
  this.getPolygonObjectExtension().add(polygonObjectExtension);
  return this;
}
origin: usc-isi-i2/Web-Karma

    .withVisibility(true).withStyleUrl("#" + styleID);
final de.micromata.opengis.kml.v_2_2_0.Polygon kmlPolygon = new de.micromata.opengis.kml.v_2_2_0.Polygon();
placemark.setGeometry(kmlPolygon);
kmlPolygon.setExtrude(true);
kmlPolygon.setAltitudeMode(AltitudeMode.CLAMP_TO_GROUND);
kmlPolygon.setOuterBoundaryIs(outerboundary);
for (int i = 0; i < numOfInnerBoundaries; i++) {
  final Boundary innerboundary = new Boundary();
  kmlPolygon.getInnerBoundaryIs().add(innerboundary);
origin: micromata/javaapiforkml

@Override
public Polygon clone() {
  Polygon copy;
  copy = ((Polygon) super.clone());
  copy.outerBoundaryIs = ((outerBoundaryIs == null)?null:((Boundary) outerBoundaryIs.clone()));
  copy.innerBoundaryIs = new ArrayList<Boundary>((getInnerBoundaryIs().size()));
  for (Boundary iter: innerBoundaryIs) {
    copy.innerBoundaryIs.add(iter.clone());
  }
  copy.polygonSimpleExtension = new ArrayList<Object>((getPolygonSimpleExtension().size()));
  for (Object iter: polygonSimpleExtension) {
    copy.polygonSimpleExtension.add(iter);
  }
  copy.polygonObjectExtension = new ArrayList<AbstractObject>((getPolygonObjectExtension().size()));
  for (AbstractObject iter: polygonObjectExtension) {
    copy.polygonObjectExtension.add(iter.clone());
  }
  return copy;
}
origin: micromata/javaapiforkml

/**
 * add a value to the innerBoundaryIs property collection
 * 
 * @param innerBoundaryIs
 *     Objects of the following type are allowed in the list: {@link Boundary}
 * @return
 *     <tt>true</tt> (as general contract of <tt>Collection.add</tt>). 
 */
public Polygon addToInnerBoundaryIs(final Boundary innerBoundaryIs) {
  this.getInnerBoundaryIs().add(innerBoundaryIs);
  return this;
}
origin: de.micromata.jak/JavaAPIforKml

/**
 * fluent setter
 * @see #setOuterBoundaryIs(Boundary)
 * 
 * @param outerBoundaryIs
 *     required parameter
 */
public Polygon withOuterBoundaryIs(final Boundary outerBoundaryIs) {
  this.setOuterBoundaryIs(outerBoundaryIs);
  return this;
}
origin: de.micromata.jak/JavaAPIforKml

/**
 * add a value to the polygonSimpleExtension property collection
 * 
 * @param polygonSimpleExtension
 *     Objects of the following type are allowed in the list: {@link Object}
 * @return
 *     <tt>true</tt> (as general contract of <tt>Collection.add</tt>). 
 */
public Polygon addToPolygonSimpleExtension(final Object polygonSimpleExtension) {
  this.getPolygonSimpleExtension().add(polygonSimpleExtension);
  return this;
}
origin: micromata/javaapiforkml

/**
 * add a value to the polygonObjectExtension property collection
 * 
 * @param polygonObjectExtension
 *     Objects of the following type are allowed in the list: {@link AbstractObject}
 * @return
 *     <tt>true</tt> (as general contract of <tt>Collection.add</tt>). 
 */
public Polygon addToPolygonObjectExtension(final AbstractObject polygonObjectExtension) {
  this.getPolygonObjectExtension().add(polygonObjectExtension);
  return this;
}
origin: micromata/javaapiforkml

/**
 * Create an instance of {@link Polygon}
 * 
 */
public static Polygon createPolygon() {
  return new Polygon();
}
origin: micromata/javaapiforkml

/**
 * fluent setter
 * @see #setExtrude(Boolean)
 * 
 * @param extrude
 *     required parameter
 */
public Polygon withExtrude(final Boolean extrude) {
  this.setExtrude(extrude);
  return this;
}
origin: micromata/javaapiforkml

/**
 * fluent setter
 * @see #setAltitudeMode(Object)
 * 
 * @param altitudeMode
 *     required parameter
 */
public Polygon withAltitudeMode(final  AltitudeMode altitudeMode) {
  this.setAltitudeMode(altitudeMode);
  return this;
}
de.micromata.opengis.kml.v_2_2_0Polygon

Javadoc

A Polygon is defined by an outer boundary and 0 or more inner boundaries. The boundaries, in turn, are defined by LinearRings. When a Polygon is extruded, its boundaries are connected to the ground to form additional polygons, which gives the appearance of a building or a box. Extruded Polygons use for their color, color mode, and fill.

Note: In Google Earth, a Polygon with an of clampToGround follows the great circle; however, a LinearRing (by itself) with an of clampToGround follows lines of constant latitude.

The for polygons must be specified in counterclockwise order. Polygons follow the "right-hand rule," which states that if you place the fingers of your right hand in the direction in which the coordinates are specified, your thumb points in the general direction of the geometric normal for the polygon. (In 3D graphics, the geometric normal is used for lighting and points away from the front face of the polygon.) Since Google Earth fills only the front face of polygons, you will achieve the desired effect only when the coordinates are specified in the proper order. Otherwise, the polygon will be gray.

Syntax:
<Polygon id="ID"> 
<!-- specific to Polygon --> 
<extrude>0</extrude>                       <!-- boolean --> 
<tessellate>0</tessellate>                 <!-- boolean --> 
<altitudeMode>clampToGround</altitudeMode>  
<!-- kml:altitudeModeEnum: clampToGround, relativeToGround, or absolute --> 
<!-- or, substitute gx:altitudeMode: clampToSeaFloor, relativeToSeaFloor --> 
<outerBoundaryIs> 
<LinearRing> 
<coordinates>...</coordinates>         <!-- lon,lat[,alt] --> 
</LinearRing> 
</outerBoundaryIs> 
<innerBoundaryIs> 
<LinearRing> 
<coordinates>...</coordinates>         <!-- lon,lat[,alt] --> 
</LinearRing> 
</innerBoundaryIs> 
</Polygon>
Extends:

Most used methods

  • <init>
  • setAltitudeMode
  • setExtrude
  • getInnerBoundaryIs
  • setOuterBoundaryIs
  • createAndAddInnerBoundaryIs
    Creates a new instance of Boundary and adds it to innerBoundaryIs. This method is a short version fo
  • createAndSetOuterBoundaryIs
    Creates a new instance of Boundary and set it to outerBoundaryIs. This method is a short version for
  • getPolygonObjectExtension
  • getPolygonSimpleExtension
  • setInnerBoundaryIs
  • setPolygonObjectExtension
  • setPolygonSimpleExtension
  • setPolygonObjectExtension,
  • setPolygonSimpleExtension,
  • setTessellate

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • onRequestPermissionsResult (Fragment)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top 12 Jupyter Notebook extensions
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