New answers tagged

4

The value that is written into the attribute table depends on what field calculator returns. In your case: CASE WHEN "Z" = 0 THEN "Z" = rand(1,100) END means that it compares Z and 0, and if that's true, it compares Z and a random value from 1 to 100, which has to be false because Z is 0. That's why it writes 0 (=False) into the fields which were 0. And ...


0

The above link is timing out. But overall GRASS is very particular about CRS definitions. It makes no difference how the data was viewed/projected in QGIS. What is important is the original CRS of the shapefile itself. This is included in the *.prj file that should be available along the the *.shp, *.shx and *.dbf. If the *.prj is there, then you should ...


0

It's not possible yet - the relevant methods and classes aren't exposed to the python API. This will be addressed when 3.0 is released.


3

You can do both: At Using customized Coordinate System for Archaeological site data I have explained how to set up a local CRS based on the origin of the local system. The data in the local CRS remains untouched, and can still be edited. Or you can use the affine transformation plugin to shift the data into real world coordinates. This has the disadvantage ...


1

You can use rule based rendering for this. Every rule has minimum and maximum scale attributes and will only be visible within these bounds. For your case, make 2 rules: Filter: visibility >= 5, Min scale: 1:25000, Max scale: empty Filter: visibility >= 6, Min scale: 1:10000, Max scale: empty This way you can even give the features different ...


5

Plugins are 3rd party contributions to QGIS. As such, it is not possible for the core team to guarantee for their quality. A review process for plugins in place but this cannot catch every possible problem with or threat from plugins. While this may be clear for many, for a lot of users this distinction is not clear. To prevent the core QGIS project from ...


0

In general properties of the layer there is a Scale dependent visibility. I think you would need to set that manually for each layer. If you want to render different features of the same layer at different scales then you can just add copies of the layer with different filters and scale visibility settings. You can use pyqgis to automate this based on the ...


2

The following approach is simple to use and avoids duplication of styling rules: QGIS allows to define custom fields: "Layer Properties" -> "Fields". The best result is achieved by defining a new field for each style using expression. For example style_colour is defined as case when "roadtype" = "path" then 'black' when "surface" in (0,1) then 'red' ...


3

If you have some python skills, you could just fix the processing module. It should not be hard at all. locate it on your harddrive Replace the whole block dealing in complicated ways with geometries with a simple return QGis.singleType(wkbType) Test Optional extra step: make a processing test case for it Make a pull request on github so it's fixed for ...


1

You don't mention which version of QGIS you're using. I'm using 2.16.0 and this dialog has a 'select all' option:- Not used this function for a while now so I'm not sure when this was implemented, although I'm guessing it's probably in QGIS 2.x. but it seems to have been in 2.10 according to this commit I changed to using QuickOSM plugin (for small areas)...


4

Rendering can use multiple cores: Most processing/analyses are still single-threaded but devs are working on it, see How to enable multithreaded processing in qgis 2.2


2

As of QGIS 2.16, Globe now works on Windows as well, see: The plugin is installed by default. It only needs to be activated in the plugin manager.


1

Yes. Open the Attribute table and select a row by clicking on the row number: You may use the Ctrl or Shift key when you click to add or remove items from the selection.


0

I just placed the first bit that i wrote to a seperate table on the place where i refer to the table. Where eventually subline.st_linesubstring was the tricky bit. -- SELECT SUBLINE WHERE INPUT POINTS ARE SNAPPED TO LINE -- SELECT SUBPOINTS WITHIN DISTANCE OF SUBLINE SELECT points.geom, points.id FROM tbl_all_points AS points, (SELECT ...


0

I have had this problem and fixed it by saving the points (which I had loaded in through a CSV file) into a vector layer and trying again. Hope this helps


0

The first picture is from a KML that allows me to add the altitude column in the attributes list, and the second one is from a KML that just adds a column of zeros:


0

A WMS usually only displays a raster background. If the provider has enabled it, you can get additional information per mouseclick. Heremaps does not seem to do that, Openrouteservice neither. You can however download address data from OpenStreetMap, if someone has added it to the map. There is however not much adress information available for Malaysia.


-2

It's not possible to edit more than one layer now.


0

Slightly improved version of ArMoraer's answer: CASE WHEN to_date(substr("Copy of _4", 7,5) + '-' + substr("Copy of _4", 4,2) + '-' + substr("Copy of _4", 1,2)) > to_date('2016-09-01') AND to_date(substr("Copy of _5", 7,5) + '-' + substr("Copy of _5", 4,2) + '-' + substr("Copy of _5", 1,2)) > to_date('2016-09-18') THEN 'y' ELSE 'N' END Be aware ...


0

I post my response to your comment as a real answer for readability purpose. Your function should probably look like: case when ( to_date("Copy of _4") > '2016-09-01' and to_date("Copy of _5") < '2016-09-18') then 'Y' else 'N' end This assumes that both "Copy of _4" and "Copy of _5" contain dates with the following format: YYYY-MM-DD (it probably ...


2

Due to the drop of ftools, there is no chance to merge a whole folder of shapefiles from the GUI anymore. It should be possible with ogr2ogr on the commandline: http://www.northrivergeographic.com/ogr2ogr-merge-shapefiles , but you have to be sure only merging files of the same geometry type. The Merge Vector layers algorithm only deals with loaded layers ...


1

I've been trying to get the extrusion to work as well, and the closest thing I've found so far is this: Right click on the layer in qgis, go to Properties, and there should be a 'Globe' section you can play around with. You might need to set the height as 10*z or 10*height or something like that. Again, I've tried applying this to my own dataset but it ...


0

I'm three years late, but hopefully whoever else might be stuck on an issue like this will benefit from my answer. # adds a LineLayerStyle (Arrow, dotted) # layer being a vector layer object of QgsVectorLayer() def setLineLayerStyle(self, layer, style): if(style == "arrow"): sl = QgsSymbolLayerV2Registry.instance()....


0

Check this tutorial on Batch Processing using Processing Framework. For loading multiple files, the key is In the Batch Processing dialog, the first tab is Parameters where we define out inputs. Click the ... next to the first row in the Input layer column. Browse to the directory containing the global transportation layers that you had downloaded. ...


0

If you are fine with using ArcMap for this analysis alone, there is a tool called Minimum Bounding Geometry (Select Polygon) and Kernel Density. I found it to be way simpler than using Sextante/R in QGIS.


0

As an alternative approach, you could rasterize your polygon mangrove layer (assign pixels corresponding to mangrove polygons as 1 and everything else 0) and then use the Raster >Zonal Statistics algorithm to calculate both the "sum" and "count" statistics within each grid square. Zonal Statistics will append the values to the square grids and then you can ...


5

I'm not really sure but maybe check if you meant EPSG 4326 instead of 3857.


2

Sorry for answering my own question. After browsing the API I found the solution is to cast the QgsPaintEffect to QgsEffectStack and edit the existing effects, maybe someone can benefit from this code: QgsPaintEffect* oldEffect=p_Symbol->symbolLayer(0)->paintEffect(); QgsEffectStack* stackEffect=(static_cast<QgsEffectStack*>(oldEffect)); ...


1

You're creating a new canvas, not referencing the main window canvas. Use canvas = iface.mapCanvas() instead of canvas = QgsMapCanvas()


0

I just realized that the problem was in dictoxml or dom parsing. I changed my code a bit everything works nicely: xml = open(path, "r") org_xml = xml.read() dict_xml = xmltodict.parse(org_xml, process_namespaces=True) out = xmltodict.unparse(dict_xml, pretty=True) with open("path/new.qml", 'a') as file: file.write(out.encode('utf-8'))


1

The following is a 4-step approach with standard QGIS functions which might get what you want. Here's the TLDR: Buffer the fences Split the buffers along all boundaries Extract the overlap areas Remove the parts of the river that fall within the overlaps Here's a more detailed explanation: 1. Buffering the fences "Vector --> Geoprocessing Tools --> ...


0

Following I found out: For deploying a cpp-plugin for QGIS it is requiered building the dll separately for every version - even point releases of a LTR. From this perspective it makes no difference if it is the actual or the ltr release. We have to take care that customers are using same version/point realease. For setting up development environement I don'...


5

You can just go to Legend items and right-click the subgroup that you want to hide and click on Hidden. This will do what you are asking for.


1

There is a plugin named OpenWOR. You need to search for the plugin in the plugin manager. The plugin is experimental, so in order to find it, you should go to Plugins -> Manage and Install Plugins -> Settings -> Check the "Show experimental plugins". Then you should find OpenWOR Plugin.


0

I downloaded the files from the website mentioned by hlinak and then extracted them to the folder nominated by Daniel. After a quick reboot all was well.


0

If you have a vector polygon representing a wetland, then in Whitebox GAT, you just need to convert that polygon to a raster using the Vector Polygons to Raster tool. Use the DEM as the 'Base Raster File' to ensure that output polygon raster has the same dimensions as the DEM. Then you simply need to input this image as the 'Input Pour Point' file to the ...


0

I would recommend the Semi-Automatic Classification Plugin. Go to plugins -> Manage and Install Plugins -> type in 'semi-automatic classification' and you should be able to install it. The tool can be quite intimidating but it allows you to generate 'regions of interests' (e.g. from shapefiles), set different false colour band combinations, and even download ...


0

Create a unique ID field in the first column of the CSV file and populate it with a sequence (1,2,3...). Then load the CSV and join it to the shapefile. I've had Qgis display null values in the attribute table until I included an ID column to the data.


2

Thanks to the answer by @ahmadhanb, it led me in the right direction to find what I was looking for. Step-by-Step instructions: Add a rectangle shape that represents the "frame" that you want your map to sit within. The default will be a polygon with simple fill. Change its style to transparent fill and dark border. Adjust border width and style as ...


0

Thanks. That was a neat feature. I tried the different options under "Where the feature" and came out with a good solution. After trying this I searched some more in the menues and found a very similar way of doing it from the "Select by location" feature. In that dialog I got even more options of how to compare and possible to choose several at the same ...


4

'Vector > Research Tools > Regular Points'. Allows for an input boundary layer and various ways to space your points.


0

You could also try Settings -> Options -> System -> QSettings -> Reset which might reset the recent list.


1

What I would try: Densify river lines. Draw perpendicular lines on vertices. Split perpendicular lines by riverlines. Classify perpendicular lines left / right with sidebuffer. Analyse linecrossings perpendicular lines with fencelines. Join results to vertices. Check where left and / or right did not cross fencelines. I would use FME Desktop (build ...


0

Just for anyone that may still be looking around for an answer to this issue, I havent managed to find a feature within QGIS either... but i have figured an effective way of compensating for the issue. I simply add an image box into the Print Composer and use an corresponding image (Usually .SVG files) to cover the previous symbol that is too small. I ...


0

The problem is you don't close <gml:MultiCurve> in <geometry>. I used Notepad++ with XML pluging to check syntax and correct the code: <?xml version="1.0" encoding="UTF-8"?> <FeatureCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml/3.2" gml:...


0

if i check svg symbol, I don't have the windows svg groups and images, my screen shot it's different


2

From QGIS 2.14 and on: Create attribute and fill with field calculator with expression: z ($geometry) Screenshot from my data. Version QGIS: 2.16.0 EPSG:28992


0

You can use Mask plugin. Create polygon layer over the space you want to show, then use Mask plugin on it. Should work


5

You can create a collar using data frame or map frame within the layout view, as follows Set the data map position for both X and Y to 0 (Zero) Increase the thickness of the frame to desired value (I used 20 mm), The thickness increased from the center of the line (both outside and inside of the line), that is why I set the X and Y position to 0 to exclude ...


0

If your data is already projected properly into EPSG:26913 (NAD83/UTM13N) or something equivalent, then your problem might simply be that your project is set to WGS84. One easy way to fix this is to right click on a shape/grid that is in your MTM projection and select "Set Project CRS from Layer". If you are use the QGIS tool "Create Grid", you can specify ...



Top 50 recent answers are included