# 需要导入模块: from sextante.algs.ftools import FToolsUtils [as 别名]# 或者: from sextante.algs.ftools.FToolsUtils importextractPoints[as 别名]defprocessAlgorithm(self, progress):layer = QGisLayers.getObjectFromUri(self.getParameterValue(self.POINTS)) weightField = self.getParameterValue(self.WEI...
some features (for example, building roofs) may be incorrectly labelled as sand. To correct this, all the objects classified as sand containing less than a certain number of connected pixels are removed from the sand class. The default value is 4500 m^2, which...
earthquake_data = {"shake_id": shake_event.event_id,"magnitude": float(event_dict.get("mmi")),"depth": float(event_dict.get("depth-value")),"time": shake_event.shake_grid.time.strftime(INASAFE_REALTIME_DATETIME_FORMAT),"location": {"type":"Point","coordinates": [shake_event.shake_...
self.getParameterValue(self.INPUT)) writer = self.getOutputFromName( self.OUTPUT).getVectorWriter(layer.pendingFields().toList(), QGis.WKBPoint, layer.crs()) outFeat = QgsFeature() inGeom = QgsGeometry() outGeom = QgsGeometry() current =0features = vector.features(layer) total =100.0/ f...
Most importantly, the least-squares method is a technique for estimating the regression coefficient, which is one of the ways to minimize errors and is mainly used to derive patterns from data (Figure 1). It can be used when the value cannot be accurately measured intuitively and is also ...
to be enabled for the database. Similarly,hstorecan be used to store key-value pairs. Since PostgreSQL uses a database schema to describe data, the table structure needs to be defined first (Appendix G). Connecting to the database and populating it with data then can be done within a ...
The request contains a geocode parameter that consists of a pair of latitude and longitude values and a radius value. This is also an example of using an existing API wrapper from Section 3.2.1. As mentioned earlier, not all APIs have a wrapper available to make communication easy. One ...