:returns: The area of the surface.
        
        .. warning:: The area is computed as the sum of the areas of all
            the polygons minus the sum of the areas of all the holes.
183168
def get_area(self):
        
        polys = sum([polygon.get_area() for polygon in self])
        holes = sum([hole.get_area() for hole in self.holes])
        return polys-holes
727172
def mesh(self):
        
        meshes = [surface.mesh for surface in self.surfaces]
        lons = numpy.concatenate([m.lons for m in meshes])
        lats = numpy.concatenate([m.lats for m in meshes])
        depths = numpy.concatenate([m.depths for m in meshes])
        return Mesh(lons, lats, depths)
905107
def get_plotable3d(self):
        
        polyhedra = sum([polyhedron.get_plotable3d() 
                         for polyhedron in self.polyhedra], [])
        return polyhedra + self.surface.get_plotable3d()
1236581
def mesh(self,xyzs):
        
        return sum(c*p.mesh(xyzs) for c,p in self)
461166
private static double computePerimeter(Geometry geometry) {
        double sum = 0;
        for (int i = 0; i < geometry.getNumGeometries(); i++) {
            Geometry subGeom = geometry.getGeometryN(i);
            if (subGeom instanceof Polygon) {
                sum += ((Polygon) subGeom).getExteriorRing().getLength();
            } 
        }
        return sum;
    }
529214
def get_area_def(self, key):
        """"""
        projection = self.nc["goes_imager_projection"]
        a = projection.attrs['semi_major_axis']
        h = projection.attrs['perspective_point_height']
        b = projection.attrs['semi_minor_axis']

        lon_0 = projection.attrs['longitude_of_projection_origin']
        sweep_axis = projection.attrs['sweep_angle_axis'][0]

        # x and y extents in m
        h = float(h)
        x = self['x']
        y = self['y']
        x_l = h * x[0]
        x_r = h * x[-1]
        y_l = h * y[-1]
        y_u = h * y[0]
        x_half = (x_r - x_l) / (self.ncols - 1) / 2.
        y_half = (y_u - y_l) / (self.nlines - 1) / 2.
        area_extent = (x_l - x_half, y_l - y_half, x_r + x_half, y_u + y_half)

        proj_dict = {'a': float(a),
                     'b': float(b),
                     'lon_0': float(lon_0),
                     'h': h,
                     'proj': 'geos',
                     'units': 'm',
                     'sweep': sweep_axis}

        area = geometry.AreaDefinition(
            self.nc.attrs.get('orbital_slot', 'abi_geos'),
            self.nc.attrs.get('spatial_resolution', 'ABI L1B file area'),
            'abi_geos',
            proj_dict,
            self.ncols,
            self.nlines,
            np.asarray(area_extent))

        return area
1021948
def area(self, value=None):
        
        mass = vtk.vtkMassProperties()
        mass.SetGlobalWarningDisplay(0)
        mass.SetInputData(self.polydata())
        mass.Update()
        ar = mass.GetSurfaceArea()
        if value is not None:
            if not ar:
                colors.printc("~bomb Area is zero: cannot rescale.", c=1, end="")
                colors.printc(" Consider adding actor.triangle()", c=1)
                return self
            self.scale(value / ar)
            return self
        else:
            return ar
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
920545
def areas(self):
        
        v1 = self.points[self.simplices[:,1]] - self.points[self.simplices[:,0]]
        v2 = self.points[self.simplices[:,2]] - self.points[self.simplices[:,1]]

        area = 0.5*(v1[:,0]*v2[:,1] - v1[:,1]*v2[:,0])
        return area
1155660
def dimension(self):
        
        dim = sum(f.dimension for f in self.active_features)
        return dim
69161
def S(self):
        
        S = np.array([[self._plane_width / self._vol_width, 0, 0],
                      [0, self._plane_height / self._vol_height, 0],
                      [0, 0, self._depth_scale / self._vol_depth]])
        return S
737854
def node_to_area_geometry(node):
    
    assert "areaGeometry" in node.tag
    for subnode in node.nodes:
        if "Polygon" in subnode.tag:
            crds = [float(x)
                    for x in subnode.nodes[0].nodes[0].nodes[0].text.split()]
            polygon = Polygon([Point(crds[iloc], crds[iloc + 1])
                               for iloc in range(0, len(crds), 2)])
        elif "upperSeismoDepth" in subnode.tag:
            upper_depth = float_(subnode.text)
        elif "lowerSeismoDepth" in subnode.tag:
            lower_depth = float_(subnode.text)
        else:
            # Redundent
            pass
    assert lower_depth > upper_depth
    return polygon, upper_depth, lower_depth
436561
function() {
            var polygonArea = 0;
            for (var i = 0; i < this.vertices.length - 2; i++) {
                polygonArea += this.vertices[i+1].pos.minus(this.vertices[0].pos)
                    .cross(this.vertices[i+2].pos.minus(this.vertices[i+1].pos)).length();
            }
            polygonArea /= 2;
            return polygonArea;
        }
882347
def area(
            self):
        
        pi = numpy.pi
        area0 = 4.0 * pi / 8.0
        areadiv = 4.0 ** self.depth
        area = area0 / areadiv * (180.0 / pi) ** 2
        return area
1054675
function(coords) {
        var i, j, area = 0;
        for (i = 0; i < coords.length; i++) {
            j = (i + 1) % coords.length;
            area += coords[i][0] * coords[j][1];
            area -= coords[j][0] * coords[i][1];
        }
        return (area < 0);
    }
1282064
def get_signed_area(self):
        
        accum = 0.0
        for i in range(len(self.verts)):
            j = (i + 1) % len(self.verts)
            accum += (
                self.verts[j][0] * self.verts[i][1] -
                self.verts[i][0] * self.verts[j][1])
        return accum / 2
800182
def get_area_def(self, dsid):
        
        if self.pps:
            # PPS:
            raise NotImplementedError

        if dsid.name.endswith('_pal'):
            raise NotImplementedError

        proj_str, area_extent = self._get_projection()

        nlines, ncols = self.nc[dsid.name].shape

        area = get_area_def('some_area_name',
                            "On-the-fly area",
                            'geosmsg',
                            proj_str,
                            ncols,
                            nlines,
                            area_extent)

        return area