self.addParameter(QgsProcessingParameterCrs(self.SOURCE_CRS, self.tr('Source CRS'), optional=True)) self.addParameter(QgsProcessingParameterCrs(self.TARGET_CRS, self.tr('Target CRS'),'EPSG:4326')) self.addParameter(QgsProcessingParameterNumber(self.NODATA, self.tr('Nodata value for output ban...
tb.setSRS("epsg:4326"); tb.add("geom", Point.class); SimpleFeatureBuilder b = new SimpleFeatureBuilder(tb.buildFeatureType()); b.add(new WKTReader().read("POINT(1 1)")); SimpleFeature f = b.buildFeature(null); 代码示例来源:origin: geotools/geotools /** * Builds a {@link Rena...
self.assertTrue(self.canvasImageCheck('theme1','theme1', canvas))# add another layerlayer2 = QgsVectorLayer("Polygon?crs=epsg:4326&field=fldtxt:string","layer2","memory") f = QgsFeature() f.setGeometry(QgsGeometry.fromRect(QgsRectangle(5,25,25,45))) self.assertTrue(layer2.dataProvider(...
ArcGIS Flight GCP processed data can only be as accurate as the original GCP position. Ideally, under 1-2 cm (0.4-0.8 in.). The coordinate reference system (CRS) in which the points are collected must be known, along with the units used, or the EPSG code. ...
New in Django 1.10. Availability: PostGIS, Oracle, SpatiaLite Tests if the geometry is valid. Example: Zipcode.objects.filter(poly__isvalid=True) BackendSQL Equivalent PostGIS, SpatiaLite ST_IsValid(poly) Oracle SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(poly, 0.05) = 'TRUE' Changed in Django...
crs Set this to True if you want the coordinate reference system to be included in the returned GeoJSON. bbox Set this to True if you want the bounding box to be included in the returned GeoJSON. gml¶ GeoQuerySet.gml(**kwargs)¶ Deprecated since version 1.9: Use the AsGML func...
self.df = GeoDataFrame(data, geometry='location')deftest_sindex(self):self.df.crs = {'init':'epsg:4326'}assertself.df.sindex.size ==5hits = list(self.df.sindex.intersection((2.5,2.5,4,4), objects=True))assertlen(hits) ==2asserthits[0].object ==3deftest_lazy_build(self):asser...
ok =Falseok, _ = execute_in_place_run( alg, parameters, context=context, feedback=feedback, raise_exceptions=True) new_features = [fforfininput_layer.getFeatures()]# Check ret valuesself.assertTrue(ok, alg_name)# Check geometry types (drop Z or M)self.assertEqual(new_features[0].g...
crs Set this to True if you want the coordinate reference system to be included in the returned GeoJSON. bbox Set this to True if you want the bounding box to be included in the returned GeoJSON. gml¶ GeoQuerySet.gml(**kwargs)¶ Availability: PostGIS, Oracle, SpatiaLite Attaches...
optional=True) target_extent_crs_param.setFlags(target_extent_crs_param.flags() | QgsProcessingParameterDefinition.FlagAdvanced) self.addParameter(target_extent_crs_param) multithreading_param = QgsProcessingParameterBoolean(self.MULTITHREADING, self.tr('Use multithreaded warping implementation'), ...