New answers tagged

3

I figured it out! It was something very small. Basically, the layers you would like to see displayed on the canvas is provided through canvas.setLayerSet(list_of_layers). # total list of layers actually displayed on map canvas canvas_layers = [] # load vector layers for files in os.listdir(source_dir): # load only the shapefiles if files.endswith("...


1

GRASS's r.statistics may be what you want. If you rasterize your shapefile (with unique id's for each polygon) you can include it as the 'base' layer, with your land use raster as the 'cover' layer. GRASS zonal statistics will not work for what you want.


1

I don't know if there is a similar tool in QGIS, but in ArcGIS there is a function called Extract to Points (under Spatial Analyst Tools - Extraction). I have been using this with big datasets, and it works. However, you would have to define the points initially that you want to extract the data too. If you wish to lower the resolution, you could use a tool ...


0

Raster format is not the best format to display points: you should display your data with points. That being said, you have two solutions : 1) change the rasterization settings by selecting a larger pixel size as an output. With v.to.rast you must first define the resolution of the region ( g.region vector=your_vector res=5000 -p -a), with gdal_rasterize ...


0

I'm assuming your habitats are regions, too. In that case you might need to split the habitat regions with your admin regions in order to get the exact area within each region. The good thing is that you can do all this in a single SQL Select statement: Select ADMIN_NAME, Sum(CartesianArea(Overlap(ADMIN.obj, HABITATS.obj), "hectare")) "Summed_Areas_Ha" ...


0

It's happening because by OGC Filter specification the first element of an intersects filter must be a property name. Now, that said, GeoServer should be able to deal with an expression as the first argument internally, it's just that there is one class in GeoServer that's still enforcing the the above limitation while processing the request. You can open a ...


2

you could also do the conversion from degrees to meters which changes depending on the coordenates , on my case NE of Spain 0.000004°=0.9 mts approx. There are on line calculators like http://msi.nga.mil/MSISiteContent/StaticFiles/Calculators/degree.html


0

It sounds like you have multiple points stacked on top of each other. Try dragging a selection box over a point and check the attribute table to see how many features you have selected. If it really is duplicating then you might want to update QGIS to a newer version (2.14) and try it again.


2

Use QgsFieldComboBox instead - then all the work is already done for you, including nice features like showing the field type in an icon. See https://qgis.org/api/classQgsFieldComboBox.html


1

The plugin in the accepted answer is not available anymore. The Affine Transformations is available and is very useful. With this plugin you can create a formula. In the screenshot I shifted all cells with 17.396 (meters) to the north.


3

This should help: if layer.type() == QgsMapLayer.VectorLayer and (layer.wkbType()==QGis.WKBPoint or layer.wkbType() == QGis.WKBMultiPoint): But it is not the best approach. Just use QgsMapLayerComboBox https://qgis.org/api/classQgsMapLayerComboBox.html use: comboBox.setFilters(QgsMapLayerProxyModel.PointLayer) On your combobox object.


2

The solution was: Right-Click on the Layer > Save As > Change the CRS to (NC State Plane) > New Project > Project > Project Properties > On the Fly > NC State Plane > Vector > Geoprocessing Tools > Buffer > Unit = 98.424 (30 * 3.2808)



Top 50 recent answers are included