Examples of Polygon


Examples of org.rometools.feed.module.georss.geometries.Polygon

            if (posListElement != null) {
                geoRSSModule = new GMLModuleImpl();
                geoRSSModule.setGeometry(new LineString(parsePosList(posListElement)));
            }
        } else if (polygonElement != null) {
            Polygon poly = null;
           
            // The external ring
            Element exteriorElement = polygonElement.getChild("exterior", GeoRSSModule.GML_NS);
            if (exteriorElement != null) {
                Element linearRingElement = exteriorElement.getChild("LinearRing", GeoRSSModule.GML_NS);
                if (linearRingElement != null) {
                    Element posListElement = linearRingElement.getChild("posList", GeoRSSModule.GML_NS);
                    if (posListElement != null) {
                        if (poly == null)
                            poly = new Polygon();
                        poly.setExterior(new LinearRing(parsePosList(posListElement)));
                    }
                }
            }
           
            // The internal rings (holes)
            List interiorElementList = polygonElement.getChildren("interior", GeoRSSModule.GML_NS);
            Iterator it = interiorElementList.iterator();
            while (it.hasNext()) {
                Element interiorElement = (Element)it.next();
                if (interiorElement != null) {
                    Element linearRingElement = interiorElement.getChild("LinearRing", GeoRSSModule.GML_NS);
                    if (linearRingElement != null) {
                        Element posListElement = linearRingElement.getChild("posList", GeoRSSModule.GML_NS);
                        if (posListElement != null) {
                            if (poly == null)
                                poly = new Polygon();
                            poly.getInterior().add(new LinearRing(parsePosList(posListElement)));
                        }
                    }
                }
               
            }
View Full Code Here

Examples of org.sbml.jsbml.ext.render.Polygon

        return g;
      }
    }

    else if (contextObject instanceof Polygon) {
      Polygon polygon = (Polygon) contextObject;
      SBase newElement = null;
      if (elementName.equals(RenderConstants.listOfElements)) {
        newElement = polygon.getListOfElements();
      }
      if (newElement != null) {
        polygon.registerChild(newElement);
        return newElement;
      }
    }

    else if (contextObject instanceof LineEnding) {
View Full Code Here

Examples of org.springframework.data.geo.Polygon

   */
  @Test
  public void shouldWriteEntityWithGeoPolygonCorrectly() {

    ClassWithGeoPolygon object = new ClassWithGeoPolygon();
    object.polygon = new Polygon(new Point(1, 2), new Point(3, 4), new Point(4, 5));

    DBObject dbo = new BasicDBObject();
    converter.write(object, dbo);

    assertThat(dbo, is(notNullValue()));
View Full Code Here

Examples of org.vaadin.hezamu.googlemapwidget.overlay.Polygon

      target.addAttribute("weight", poly.getWeight());
      target.addAttribute("opacity", poly.getOpacity());
      target.addAttribute("clickable", poly.isClickable());

      if (poly instanceof Polygon) {
        Polygon polygon = (Polygon) poly;
        target.addAttribute("fillcolor", polygon.getFillColor());
        target.addAttribute("fillopacity", polygon.getFillOpacity());
      }
      target.endTag("o");
    }

    target.endTag("overlays");
View Full Code Here

Examples of org.zkoss.openlayers.geometry.Polygon

    point2List.add(point2List.get(0));

    LinearRing linearRing = new LinearRing(point2List);
    List<LinearRing> ringList = new ArrayList<LinearRing>();
    ringList.add(linearRing);
    Vector polygonFeature = new Vector(new Polygon(ringList));

    map.addLayer(vectorLayer);
    map.setCenter(new LonLat(point.getX(), point.getY()), 5);
    vectorLayer.addFeatures(Arrays.asList(pointFeature, pointFeature3,
        pointFeature2, lineFeature, polygonFeature));
View Full Code Here

Examples of ru.dubov.primitives.Polygon

    /** Creates new form MainFrame */
    public MainFrame() {
        initComponents();
        setLocationRelativeTo(null);
        polygon = new Polygon();
        tempPolygon = new Polygon();
        state = 0;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.