Tag Info

Hot answers tagged

7

In spatial hydrology, DEM-based flow accumulation operations are typically static. That is, they represent a steady-state condition of the discharge of surface and near surface water passing through a point. Flow accumulation grids are actually accumulating contributing area downslope, i.e. areas not volumes. The accumulated cells that you described is ...


6

Excellent answer by @Martin but it seems you have 2 attributes you want to have a colour gradient (Plantation Cover and Forest Harvesting Intensity). If I'm mistaken then I will remove this post. You could set up a Rule-based style, create a new rule, edit the symbol layer from a Simple Fill to a Gradient Fill. Create a filter for your attribute column and ...


5

You have an option ate the Layer Labeling Settings > Rendering > Feature options > "Label every part of multi-part features" Just check that option.


4

You probably changed the location of the project file or the data files. The message means that QGIS cannot locate the data files at the location it expects them to be in. You can double-click on the paths to open a file dialog which allows you to manually search for the files in your file system. If this issue was caused by transferring a project, it ...


3

Yo can use ST_DumpPoints(geom) to get the points listed. Look at the example how to use it. The result contains both the geometry and a path telling where in the polygon the point belongs. So to just get the geometry (points) do like this: SELECT (ST_DumpPoints(the_geom)).geom


3

You can write defined columns from selected features in a csv file in this way: layer = qgis.utils.iface.activeLayer() features = layer.selectedFeatures() # Here you get a list of selected features columns=['id','country','city'] #here you write the columns you want to export. Or use a list with the columns # Here you write for every selected feature a ...


3

I think Hausdorff distance may be what your looking for. It's basically a measure of how similar two geometries are. General steps to apply it to this problem: Find the closest point on the track to beginning and end of each planned segment. divide the track into segments between these sets of points. Calculate the Hausdorff distance between the planned ...


3

You can use an intersection of the features. You can find it here: Vector > Geoprocessing Tools > Intersect... As the input layer you use the roads. As intersect layer you use the provinces of the netherlands. Either you can make a filter for the province you need or you select the province and check the Use only selected features box. Then you can ...


3

In QGIS 2.6 you can create a two color color ramp this way: Double click on the layer (or right click > Properties) > Style > Change from "Single Symbol" to "Categroized" > Color Ramp > Random colors> Select Gradient > Choose the colors and safe > Choose the column with the values > Classify > Apply In the "Column" field ...


3

Known issue which is already fixed http://hub.qgis.org/issues/12233 Please update to 2.8.1.


3

I have tried your WMTS in QGIS 2.8.1 (64-bit install on Win8.1) and for me it loads without problems. The layers load within 30 seconds. When using zoom to layer, the layers are however only showing as small object in the middle of the screen. They are not zoomed to the full extend of the map viewer. When zooming further in manually the layers show up on the ...


3

You can use the Interpolation function (Raster > Interpolation > Interpolation) to create a raster map based on multiple classes: You can choose various settings such as which interpolation method you prefer, how fine a resolution you want the output etc. Note that this is a plugin which I think should already be enabled by default. Hope this helps!


2

from the above example, I suggest that you 1) create points along the green lines at a regular interval 2) get the perpendicular distance from those points to the blue line and, finally, 3) compute the average error based on those distances. Note that you could reject points that are too far (above a given tolerance for GPS worst precision) due to the ...


2

Open your your-project-name.qgs~ file in any text editor software, for my case I used Adobe Dreamweaver. Save that file as your-project-name.qgs (Note that I removed the ~ at the end) overwritting the excisting one. Save and re-open the project.


2

The normal solution is to go to Natural Earth. You didn't say what scale you need, but the 1:10m might be useful. You can download cultural features (including Level 0 and Level 1 boundaries) as vectors. Note that Natural Earth uses defacto boundaries, and some political entities differ in opinion (or policy).


2

This use case should be covered by the Relations feature: see User Manual - Creating one to many relations or Matthias Kuhn's QGIS Relations post.


2

You can add a custom menu to the QGIS GUI this way: self.menu = QMenu( "&My tools", self.iface.mainWindow().menuBar() ) actions = self.iface.mainWindow().menuBar().actions() lastAction = actions[-1] self.iface.mainWindow().menuBar().insertMenu( lastAction, self.menu ) As you can see in the code snippet above, you are adding a menu to the second to ...


2

Here is a solution, with some limitation on the legend and classification due to data normalization. The steps are the following ones Unpivot your data and normalize the fields Create a coverage layer Use QGIS Atlas to generate the output We will use PostGIS to do the data processing part. Sample data We will use the following small sample dataset for ...


2

If you click in empty space (not touching any features of the current layer) with the select tool the current layer will drop it's selection.


2

Extracting coordinates of start/end vertices (not all line vertices) from lines is a nice use case for new functionality in QGIS v.2.8, namely, the function editor. This is the workflow: Load your line layer to QGIS and activate it. Open the field calculator and go to tab Function Editor. Click on New file, write vertices as the new file name, and click ...


2

Click on Vector -> Geometry Tools -> Extract Nodes A window will appears, choose a file to save and mark the option "Add result to canvas". Right click in the new layer created and click on "save as". Choose a name to your file and open it with a text editor to check the result.


2

For exporting the coordinates too, I assume you will have to add new columns for x and y coordinates and calculate these using the fieldcalculator with the appropriate operators.


2

Export table to excel: Right click layer in table of contents select Save As Under Format drop down select Comma Separated Value (CSV) option Open excel and browse for saved .csv to open


2

To set the color of a vector layer feature depending on the feature attributes with PyQGIS is necessary to change the QgsSingleSymbolRendererV2 default object in a, for example, QgsGraduatedSymbolRendererV2 object. To test this I created the 'random' field name in a Polygon Vector Layer and this field was filled with aleatory values between 1 and 24. These ...


2

You need to select an item on the composer page, for the properties to be shown for that item. Looks like you only have a map. Try to select it, with the select/move item tool in the print composer.


2

It may very well be a bug as I also cannot get the canvas to refresh. You can try the following as a workaround: myLayer.triggerRepaint() To refresh all layers following function can be used: def refresh_layers(self): for layer in qgis.utils.iface.mapCanvas().layers(): layer.triggerRepaint()


2

You need to define you own projection system: Find you x0 and y0 (the origin of you system) based on the points for which you know the real coordinates In the Coordinate Reference system selector (right click on a layer and Set Layer CRS), use user-defined coordinate-system (use the definition of the CRS you mentioned as "real coordinate" and change your ...


2

Yes this is a known issue in 2.8. It is fixed and will be in the 2.8.1 release very soon.


2

You would just need to make sure your layer has a name you can distinguish from others. Instead of layer = self.iface.activeLayer(), do: layer=None for lyr in QgsMapLayerRegistry.instance().mapLayers().values(): if lyr.name() == "YOUR_LAYER_NAME": layer = lyr break If you don't trust the layer name (after all, it can be changed by the ...


2

The legend property button 'Filter Legend By Map Content' will update the legend items based on the current visibly geometries in the map composer. Have tested it on polygon layers in QGIS 2.6.



Only top voted, non community-wiki answers of a minimum length are eligible