Package de.micromata.opengis.kml.v_2_2_0

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


        if (superoverlay == null) {
            superoverlay = Boolean.FALSE;
        }

        // build the kml according to the building mode
        Kml kml = null;
        KmlEncodingContext context = new KmlEncodingContext(mapContent, wms, kmz);
        if (superoverlay) {
            kml  = new SuperOverlayNetworkLinkBuilder(context).buildKMLDocument();
        } else {
            kml  = new SimpleNetworkLinkBuilder(context).buildKMLDocument();
View Full Code Here


        this.context = context;
    }

    public Kml buildKMLDocument() {
        // prepare kml, document and folder
        Kml kml = new Kml();
        Document document = kml.createAndSetDocument();
        Map formatOptions = context.getRequest().getFormatOptions();
        String kmltitle = (String) formatOptions.get("kmltitle");
        if(kmltitle == null) {
            kmltitle = context.getMapContent().getTitle();
        }
View Full Code Here

     * @param context
     * @return
     */
    public Kml buildKMLDocument(KmlEncodingContext context) {
        // prepare kml, document and folder
        Kml kml = new Kml();
        Document document = kml.createAndSetDocument();
        String kmltitle = (String) context.getRequest().getFormatOptions().get("kmltitle");
        document.setName(kmltitle);

        // get the callbacks for the document and let them loose
        List<KmlDecorator> decorators = context.getDecoratorsForClass(Document.class);
View Full Code Here

      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++)
          innercoord.add(new Coordinate(polygon.getInteriorRingN(i).getPointN(j).getX(),polygon.getInteriorRingN(i).getPointN(j).getY()));
       
      }
View Full Code Here

     * this.setAbstractView(lookAt); </code>
     *
     *
     */
    public LookAt createAndSetLookAt() {
        LookAt newValue = new LookAt();
        this.setAbstractView(newValue);
        return newValue;
    }
View Full Code Here

     * this.setAbstractView(lookAt); </code>
     *
     *
     */
    public LookAt createAndSetLookAt() {
        LookAt newValue = new LookAt();
        this.setAbstractView(newValue);
        return newValue;
    }
View Full Code Here

     * this.setModel(model); </code>
     *
     *
     */
    public Model createAndSetModel() {
        Model newValue = new Model();
        this.setModel(newValue);
        return newValue;
    }
View Full Code Here

    }
    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);

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

      final Boundary outerboundary = new Boundary();
View Full Code Here

    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)
View Full Code Here

     *     required parameter
     * @param targetHref
     *     required parameter
     */
    public Update createAndSetUpdate(final String targetHref, final List<Object> createOrDeleteOrChange) {
        Update newValue = new Update(targetHref, createOrDeleteOrChange);
        this.setUpdate(newValue);
        return newValue;
    }
View Full Code Here

TOP

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

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.