Package de.micromata.opengis.kml.v_2_2_0

Examples of de.micromata.opengis.kml.v_2_2_0.GroundOverlay


      placemark.setGeometry(kmlPolygon);

      kmlPolygon.setExtrude(true);
      kmlPolygon.setAltitudeMode(AltitudeMode.CLAMP_TO_GROUND);

      final Boundary outerboundary = new Boundary();
      kmlPolygon.setOuterBoundaryIs(outerboundary);

      final LinearRing outerlinearring = new LinearRing();
      outerboundary.setLinearRing(outerlinearring);

      List<Coordinate> outercoord = new ArrayList<Coordinate>();
      outerlinearring.setCoordinates(outercoord);
      for (int i=0;i<polygon.getExteriorRing().getNumPoints();i++) {
        outercoord.add(new Coordinate(polygon.getExteriorRing().getPointN(i).getX(),polygon.getExteriorRing().getPointN(i).getY()));
      }
     
      int numOfInnerBoundaries = polygon.getNumInteriorRing();
      for(int i=0;i<numOfInnerBoundaries;i++)
      {
        final Boundary innerboundary = new Boundary();
        kmlPolygon.getInnerBoundaryIs().add(innerboundary);
 
        final LinearRing innerlinearring = new LinearRing();
        innerboundary.setLinearRing(innerlinearring);
 
        List<Coordinate> innercoord = new ArrayList<Coordinate>();
        innerlinearring.setCoordinates(innercoord);
        int numOfPoints = polygon.getInteriorRingN(i).getNumPoints();
        for(int j=0;j<numOfPoints;j++)
View Full Code Here


     * this.setAbstractView(camera); </code>
     *
     *
     */
    public Camera createAndSetCamera() {
        Camera newValue = new Camera();
        this.setAbstractView(newValue);
        return newValue;
    }
View Full Code Here

     * this.setAbstractView(camera); </code>
     *
     *
     */
    public Camera createAndSetCamera() {
        Camera newValue = new Camera();
        this.setAbstractView(newValue);
        return newValue;
    }
View Full Code Here

     *     required parameter
     * @return
     *     <tt>true</tt> (as general contract of <tt>Collection.add</tt>).
     */
    public LatLonQuad addToCoordinates(final double longitude, final double latitude) {
        this.getCoordinates().add(new Coordinate(longitude, latitude));
        return this;
    }
View Full Code Here

     *     required parameter
     * @return
     *     <tt>true</tt> (as general contract of <tt>Collection.add</tt>).
     */
    public LatLonQuad addToCoordinates(final double longitude, final double latitude, final double altitude) {
        this.getCoordinates().add(new Coordinate(longitude, latitude, altitude));
        return this;
    }
View Full Code Here

     *     required parameter
     * @return
     *     <tt>true</tt> (as general contract of <tt>Collection.add</tt>).
     */
    public LatLonQuad addToCoordinates(final String coordinates) {
        this.getCoordinates().add(new Coordinate(coordinates));
        return this;
    }
View Full Code Here

            if(JTSLine == null) continue;
            int lineLength = JTSLine.getNumPoints();
        List<Coordinate> coordsList = new ArrayList<Coordinate>();
        for (int i=0;i<lineLength;i++) {
         
          Coordinate coord = new Coordinate(JTSLine.getPointN(i).getX(),JTSLine.getPointN(i).getY());
          coordsList.add(coord);
        }

        if (coordsList.size() == 0)
          continue;
View Full Code Here

      outerboundary.setLinearRing(outerlinearring);

      List<Coordinate> outercoord = new ArrayList<Coordinate>();
      outerlinearring.setCoordinates(outercoord);
      for (int i=0;i<polygon.getExteriorRing().getNumPoints();i++) {
        outercoord.add(new Coordinate(polygon.getExteriorRing().getPointN(i).getX(),polygon.getExteriorRing().getPointN(i).getY()));
      }
     
      int numOfInnerBoundaries = polygon.getNumInteriorRing();
      for(int i=0;i<numOfInnerBoundaries;i++)
      {
        final Boundary innerboundary = new Boundary();
        kmlPolygon.getInnerBoundaryIs().add(innerboundary);
 
        final LinearRing innerlinearring = new LinearRing();
        innerboundary.setLinearRing(innerlinearring);
 
        List<Coordinate> innercoord = new ArrayList<Coordinate>();
        innerlinearring.setCoordinates(innercoord);
        int numOfPoints = polygon.getInteriorRingN(i).getNumPoints();
        for(int j=0;j<numOfPoints;j++)
          innercoord.add(new Coordinate(polygon.getInteriorRingN(i).getPointN(j).getX(),polygon.getInteriorRingN(i).getPointN(j).getY()));
       
      }
     
     
    }
View Full Code Here

     * this.setExtendedData(extendedData); </code>
     *
     *
     */
    public ExtendedData createAndSetExtendedData() {
        ExtendedData newValue = new ExtendedData();
        this.setExtendedData(newValue);
        return newValue;
    }
View Full Code Here

  }

  public File publishKML() throws FileNotFoundException {
    File outputFile = new File(ServletContextParameterMap.getParameterValue(ContextParameter.USER_DIRECTORY_PATH) + "KML/" + worksheet.getTitle() + ".kml");
    final Kml kml = KmlFactory.createKml();
    final Folder folder = kml.createAndSetFolder()
        .withName(worksheet.getTitle()).withOpen(true);

    Style style = folder.createAndAddStyle().withId("karma");
   
    if(randomCounter++%2 == 0)
      style.createAndSetIconStyle().withScale(1.399999976158142).withIcon(new Icon().withHref("http://maps.google.com/mapfiles/ms/icons/blue-pushpin.png"));
    else
      style.createAndSetIconStyle().withScale(1.399999976158142).withIcon(new Icon().withHref("http://maps.google.com/mapfiles/ms/icons/red-pushpin.png"));

    for (edu.isi.karma.geospatial.Point point : points) {
      folder.createAndAddPlacemark()
          .withDescription(point.getHTMLDescription())
          .withVisibility(true)
          .withStyleUrl("karma")
          .createAndSetPoint()
          .withAltitudeMode(AltitudeMode.CLAMP_TO_GROUND)
          .addToCoordinates(
              point.getLongitude() + "," + point.getLatitude());

    }

    for (edu.isi.karma.geospatial.LineString line : lines) {
      folder.createAndAddPlacemark()
          .withDescription(line.getHTMLDescription())
          .withVisibility(true).createAndSetLineString()
          .withAltitudeMode(AltitudeMode.CLAMP_TO_GROUND)
          .setCoordinates(line.getCoordinatesList());
    }
    int n=0;
    for (Polygon polygon: polygons) {
      FeatureTable featureTable = polygonTable.get(n);
     
      Placemark placemark = folder.createAndAddPlacemark()
      .withDescription(featureTable.getHTMLDescription())
      .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);
View Full Code Here

TOP

Related Classes of de.micromata.opengis.kml.v_2_2_0.GroundOverlay

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.