:returns: The area of the polygon.
544537
def get_area(self):
        
        if self.area is None:
            self.area = self.to_2d().get_shapely().area
        return self.area
167415
def size(self):
        """"""
        return np.multiply.reduce(self.shape, dtype=np.int32)
927307
def Integrate(self):
        
        area = 0.
        X = self.GetX()
        Y = self.GetY()
        for i in range(self.GetN() - 1):
            area += (X[i + 1] - X[i]) * (Y[i] + Y[i + 1]) / 2.
        return area
933702
def area_fraction_dict(self):
        
        return {hkl: self.miller_area_dict[hkl] / self.surface_area
                for hkl in self.miller_area_dict.keys()}
18779
def get_area_def(self, key, info=None):
        
        # TODO Get projection information from input file
        a = 6378169.
        h = 35785831.
        b = 6356583.8
        lon_0 = 0.
        # area_extent = (-5432229.9317116784, -5429229.5285458621,
        #                5429229.5285458621, 5432229.9317116784)
        area_extent = (-5570248.4773392612, -5567248.074173444,
                       5567248.074173444, 5570248.4773392612)
        proj_dict = {'a': float(a),
                     'b': float(b),
                     'lon_0': float(lon_0),
                     'h': float(h),
                     'proj': 'geos',
                     'units': 'm'}

        area = geometry.AreaDefinition(
            'LI_area_name',
            "LI area",
            'geosli',
            proj_dict,
            self.ncols,
            self.nlines,
            area_extent)
        self.area = area
        logger.debug("Dataset area definition: \n {}".format(area))
        return area
632115
def set_area_geometry(w, src):
    
    assert "areaSource" in src.tag
    geometry_node = src.nodes[get_taglist(src).index("areaGeometry")]
    area_attrs = parse_area_geometry(geometry_node)
    w.poly(parts=[area_attrs["polygon"].tolist()])
971783
def extract_polygon_area(self, pid, polygon_points):
        
        polygon = shapgeo.Polygon(polygon_points)
        xy = self.grid.get_element_centroids()
        in_poly = []
        for nr, point in enumerate(xy):
            if shapgeo.Point(point).within(polygon):
                in_poly.append(nr)

        values = self.parsets[pid][in_poly]
        return np.array(in_poly), values
568988
def area(x,y):
    
    # http://stackoverflow.com/questions/24467972/calculate-area-of-polygon-given-x-y-coordinates
    return 0.5 * np.abs(np.dot(x, np.roll(y, 1)) - np.dot(y, np.roll(x, 1)))
747644
def area
      vec1 = vertices[1] - vertices[0]
      vec2 = vertices[2] - vertices[0]
      outer_product = vec1.cross(vec2)
      return outer_product.length / 2.0
    end
472893
def facets_area(self):
        
        # avoid thrashing the cache inside a loop
        area_faces = self.area_faces
        # sum the area of each group of faces represented by facets
        # use native python sum in tight loop as opposed to array.sum()
        # as in this case the lower function call overhead of
        # native sum provides roughly a 50% speedup
        areas = np.array([sum(area_faces[i])
                          for i in self.facets],
                         dtype=np.float64)
        return areas
1213003
def volume(self):
        
        volume = abs(self.primitive.polygon.area *
                     self.primitive.height)
        return volume
807590
def to_polygon(self):
        
        x,y = self.corners.T
        vertices = PixCoord(x=x, y=y)
        return PolygonPixelRegion(vertices=vertices, meta=self.meta,
                                  visual=self.visual)
1110753
def AREA(a, b):
        """"""
        return cmp(b[0] * b[1], a[0] * a[1]) or cmp(b[1], a[1]) or cmp(b[0], a[0])
905753
def get_unit_primitive_area(self):
        

        A_ads = self.surface_area
        A_clean = self.clean_entry.surface_area
        n = (A_ads / A_clean)
        return n
1182332
def get_poly_area_geo(poly):
    
    minx, miny, maxx, maxy = poly.bounds
    # reproject polygon to get area
    reprojected_for_area = Proj("+proj=aea +lat_1={0} +lat_1={1} "
                                "+lat_0={2} +lon_0={3}"
                                .format(miny,
                                        maxy,
                                        (miny + maxy) / 2.0,
                                        (minx + maxx) / 2.0))
    geographic_proj = Proj(init='epsg:4326')
    project_func = partial(transform,
                           geographic_proj,
                           reprojected_for_area)
    reprojected_poly = shapely_transform(project_func, poly)
    return reprojected_poly.area
349796
def get_area(self):
        '''
        
        '''
        d_z = self.lower_depth - self.upper_depth
        self.downdip_width = d_z / np.sin(self.dip * np.pi / 180.)
        self.surface_width = self.downdip_width * np.cos(self.dip *
                                                         np.pi / 180.)
        self.area = self.length * self.downdip_width
        return self.area
373992
public static Geometry scaleToUnitaryArea( Geometry polygon ) throws Exception {
        double area = polygon.getArea();
        double scale = sqrt(1.0 / area);
        AffineTransform scaleAT = new AffineTransform();
        scaleAT.scale(scale, scale);
        AffineTransform2D scaleTransform = new AffineTransform2D(scaleAT);
        polygon = JTS.transform(polygon, scaleTransform);
        return polygon;
    }