Examples of area()


Examples of bnGUI.venn.geometry.FPolygon.area()

     */
    public double area()
    {
        FPolygon poly = getPolygon();
        if( poly != null )
            return areaFactor * poly.area();
        else
            return 0.0;
    }
   
    public String toString()
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCMultiPolygon.area()

    String wkt = "MULTIPOLYGON (((1001200 2432900, 1001420 2432691, 1001250 2432388, 1001498 2432325, 1001100 2432100, 1001500 2431900, 1002044 2431764, 1002059 2432120, 1002182 2432003, 1002400 2432300, 1002650 2432150, 1002610 2432323, 1002772 2432434, 1002410 2432821, 1002700 2433000, 1001824 2432866, 1001600 2433150, 1001200 2432900)), ((1000393 2433983, 1000914 2434018, 1000933 2433817, 1000568 2433834, 1000580 2433584, 1000700 2433750, 1000800 2433650, 1000700 2433450, 1000600 2433550, 1000200 2433350, 1000100 2433900, 1000393 2433983)), ((1001200 2432900, 1000878 2432891, 1000900 2433300, 1001659 2433509, 1001600 2433150, 1001200 2432900)), ((1002450 2431650, 1002300 2431650, 1002300 2431900, 1002500 2432100, 1002600 2431800, 1002450 2431800, 1002450 2431650)), ((999750 2433550, 999850 2433600, 999900 2433350, 999780 2433433, 999750 2433550)), ((1002950 2432050, 1003005 2431932, 1002850 2432250, 1002928 2432210, 1002950 2432050)), ((1002600 2431750, 1002642 2431882, 1002750 2431900, 1002750 2431750, 1002600 2431750)), ((1002950 2431750, 1003050 2431650, 1002968 2431609, 1002950 2431750)))";
    {
      OGCGeometry ogcg = OGCGeometry.fromText(wkt);
      assertTrue(ogcg.geometryType().equals("MultiPolygon"));
      OGCMultiPolygon mp = (OGCMultiPolygon)ogcg;
      double a = mp.area();
      assertTrue(Math.abs(mp.area() - 2037634.5) < a*1e-14);
    }

    {
      OGCGeometry ogcg = OGCGeometry.fromText(wkt);
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCMultiPolygon.area()

    {
      OGCGeometry ogcg = OGCGeometry.fromText(wkt);
      assertTrue(ogcg.geometryType().equals("MultiPolygon"));
      OGCMultiPolygon mp = (OGCMultiPolygon)ogcg;
      double a = mp.area();
      assertTrue(Math.abs(mp.area() - 2037634.5) < a*1e-14);
    }

    {
      OGCGeometry ogcg = OGCGeometry.fromText(wkt);
      assertTrue(ogcg.geometryType().equals("MultiPolygon"));
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCPolygon.area()

    assertTrue(g.equals(OGCGeometry.fromText("POINT(1 2)")));
    assertTrue(!g.equals(OGCGeometry.fromText("POINT(1 3)")));
    OGCGeometry buf = g.buffer(10);
    assertTrue(buf.geometryType().equals("Polygon"));
    OGCPolygon poly = (OGCPolygon) buf.envelope();
    double a = poly.area();
    assertTrue(Math.abs(a - 400) < 1e-1);
  }

  @Test
  public void testPolygon() {
View Full Code Here

Examples of com.github.davidmoten.rtree.geometry.Rectangle.area()

    public static Func1<HasGeometry, Double> areaIncrease(final Rectangle r) {
        return new Func1<HasGeometry, Double>() {
            @Override
            public Double call(HasGeometry g) {
                Rectangle gPlusR = g.geometry().mbr().add(r);
                return (double) (gPlusR.area() - g.geometry().mbr().area());
            }
        };
    }

}
View Full Code Here

Examples of org.apache.lenya.cms.publication.Document.area()

            if(doc != null) {
                nodes.add(doc.getRepositoryNode());
               
                // lock the authoring site to avoid having live nodes for which no corresponding
                // authoring node exists
                nodes.add(doc.area().getSite().getRepositoryNode());
               
                // lock the live site to avoid overriding changes made by others
                SiteStructure liveSite = doc.getPublication().getArea(Publication.LIVE_AREA).getSite();
                nodes.add(liveSite.getRepositoryNode());
            }
View Full Code Here

Examples of org.apache.lenya.cms.publication.Document.area()

            if(doc != null) {
                nodes.add(doc.getRepositoryNode());
               
                // lock the authoring site to avoid having live nodes for which no corresponding
                // authoring node exists
                nodes.add(doc.area().getSite().getRepositoryNode());
               
                // lock the live site to avoid overriding changes made by others
                SiteStructure liveSite = doc.getPublication().getArea(Publication.LIVE_AREA).getSite();
                nodes.add(liveSite.getRepositoryNode());
            }
View Full Code Here

Examples of org.apache.lenya.cms.publication.Document.area()

            Document doc = getSourceDocument();
            if (doc != null) {
                nodes.add(doc.getRepositoryNode());
                Document liveDoc = doc.getAreaVersion(Publication.LIVE_AREA);
                nodes.add(liveDoc.getRepositoryNode());
                nodes.add(liveDoc.area().getSite().getRepositoryNode());
            }
            return (org.apache.lenya.cms.repository.Node[]) nodes.toArray(new org.apache.lenya.cms.repository.Node[nodes.size()]);

        } catch (Exception e) {
            throw new UsecaseException(e);
View Full Code Here

Examples of org.apache.lenya.cms.publication.Document.area()

    protected org.apache.lenya.cms.repository.Node[] getNodesToLock() throws UsecaseException {
        try {
            List nodes = new ArrayList();
            Document doc = getSourceDocument();          
            nodes.add(doc.getRepositoryNode());           
            nodes.add(doc.area().getSite().getRepositoryNode());           
            return (org.apache.lenya.cms.repository.Node[]) nodes.toArray(new org.apache.lenya.cms.repository.Node[nodes.size()]);           
        } catch (Exception e) {
            throw new UsecaseException(e);
        }
    }
View Full Code Here

Examples of org.apache.lenya.cms.publication.Document.area()

            List nodes = new ArrayList();
            Document doc = getSourceDocument();
            Document liveDoc = doc.getAreaVersion(Publication.LIVE_AREA);           
            nodes.add(doc.getRepositoryNode());
            nodes.add(liveDoc.getRepositoryNode());           
            nodes.add(liveDoc.area().getSite().getRepositoryNode());
            nodes.add(doc.area().getSite().getRepositoryNode());           
            return (org.apache.lenya.cms.repository.Node[]) nodes.toArray(new org.apache.lenya.cms.repository.Node[nodes.size()]);           
        } catch (Exception e) {
            throw new UsecaseException(e);
        }
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.