New answers tagged

0

Use the Rasterize (Vector to Raster) tool in QGIS. Go to Raster -> Conversion -> Rasterize. Assuming your vector file and the reference raster (g) are in the same coordinate reference system (CRS), do the following: Browse the input file (shapefile). Define which attribute from shapefile to assign in the raster cells. Choose path and name for the output ...


0

Im running into a similar issue with a particular raster dataset. The tiles gdal2tiles produces for this input raster have much digital noise, but you can still make out some features through the haze. I tried varying the input raster as ArcGIS grid, GeoTiff, as well as a regular tiff, all with the same result. Although the GeoTiff ran the fastest :) ...


1

I know this is an old question, but I think the answer I just found was introduced since the previous ones here, so I'm sharing it for people who find this in a search. QGIS (as of version 2.14 at least), has a "Fill Holes" in the Processing toolbox, under QGIS geoalgorithms > Vectory geometry tools. I find that dissolving shapes and then running Fill ...


1

As people pointed out in the comments, switching to a different version of QGIS (in my case, the 2.8 long term release) fixed this issue.


1

There is now native export into DXF in newer versions of QGIS which allows to export map layers including the labels: More about the functionality can be found here: https://www.qgis.ch/en/projects/dxf-export The DXF export functionality was developed by Jürgen Fischer (Norbit) and Marco Hugentobler (Sourcepole AG). The project was co-financed by SIGE ...


0

There is now native export into DXF in newer versions of QGIS which allows to export map layers including the labels: More about the functionality can be found here: https://www.qgis.ch/en/projects/dxf-export The DXF export functionality was developed by Jürgen Fischer (Norbit) and Marco Hugentobler (Sourcepole AG). The project was co-financed by SIGE ...


0

There is now native export into DXF in newer versions of QGIS which allows to export map layers including the labels: More about the functionality can be found here: https://www.qgis.ch/en/projects/dxf-export The DXF export functionality was developed by Jürgen Fischer (Norbit) and Marco Hugentobler (Sourcepole AG). The project was co-financed by SIGE ...


0

As Goldring mentionned in his comment you should probably join the 2 tables and compute the percentage, assuming of course that your districts in both years do overlap


1

Save the style Layer (.qml or sld). Export .dgn to shp. Load your shp. Load style(.qml or .sld) for this shape.


0

Maybe,your questions for this? from PyQt4.QtCore import * from PyQt4.QtXml import * layers =iface.legendInterface().layers() for layer in layers: myFile = "PATH_TO_COMPOSER_TEMPLATE" myTemplateFile = file(myFile, 'rt') myTemplateContent = myTemplateFile.read() myTemplateFile.close() myDocument = QDomDocument() ...


1

check this: from PyQt4.QtCore import * from PyQt4.QtXml import * myFile = "PATH_TO_COMPOSER_TEMPLATE" myTemplateFile = file(myFile, 'rt') myTemplateContent = myTemplateFile.read() myTemplateFile.close() myDocument = QDomDocument() myDocument.setContent(myTemplateContent, False) newcomp = iface.createNewComposer() ...


1

The tutorial in the answer posted by Venug uses the Raster > Miscellaneous > Merge functionality. What I don't like about that method is that it requires you to find the files you want to merge in your file system. This can be tedious in a directory with hundreds of files. I prefer to use the Processing tools, which use the layers as inputs. Here I have an ...


4

You simply have to save your style file(.qml/.sld). and everytime you import a new shape file, just load that style file.


2

I hope below link will help you to complete the task as you want.. http://www.qgistutorials.com/en/docs/raster_mosaicing_and_clipping.html


1

It's likely caused by the fact that the canvas renders a cached image instead of requesting a new one. This will cause the cache to be cleared. timer.timeout.connect(layer.triggerRepaint) To get a reference to your layer either create it from python or use the QgsMapLayerRegistry.


1

Upgrade to 2.14.2. It's been fixed already.


2

The error occurrs because the plugin does not filter out Raster layers from the QGIS ToC and lists them in its own GUI. The plugin should only deal with Vector layers, since it acts on vector geometries. I've just sent a pull request to the plugin's author with code to fix this problem. If you don't want to wait until the author releases a new Simplipy ...


0

I think i cracked it. I get skewed rater if my Project CRS is set up as Slovenian National Grid. If i set it up as WGS84 and import Tif Raster it gives me error and sets up raster CRS to WGS84. That puts tif in the middle of Atlantic. But if i then correct project CRS back to Slovenian National Grid and also Raster CRS - Raster is not skewed and in right ...


2

This will convert ALL last 2 characters to uppercase, even if these characters are not directions (Nw, Sw,...) : concat( substr( title( "fieldname"), 1, length( "fieldname")-2), upper(substr("fieldname", length( "fieldname")-1, 2)) )


0

Try browsing to the location you want to save your shapefile. The "save as" input field should have a path, for example: /Users/yourname/Desktop/example.shp


0

The solution seems to be using the "Value Relation" widget as the edit widget in the fields tab of the layer properties. I set the layer to my lookup table, the key value to the column containing the encoded integer column, and the value column to the string value column. Then I had to create a filter expression to match all the columns I require: ...


1

As a Linux Mint 'Cinnamon' 17.3 user I also struggled with these "unmet dependencies (libgdal.so.1-1.11.2 etc.)" and had to update the ppa. I did this by including the following links in the /etc/apt/sources.list: deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu trusty main deb-src http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu ...


2

No menu: Project >> Project Properties >> Selection color:


0

You can use the Translate tool which allows you to convert input rasters into RGB by setting the Expand option and selecting RGB. You can find the tool from the menu bar: Raster > Conversion > Translate


0

I would allways recommend to use the OSGeo4W installer (http://trac.osgeo.org/osgeo4w/) which cares for all dependencies. And I never had problems running more than one (major) version on the same machine, even using the standalone installers. I allways install the latest version and ltr version.


2

QMS is certainly installable using Ubuntu 14.04 and QGIS 2.14.1 so I suspect your issue is the age of your QGIS install if it really is 2.0.


3

It's a known issue, which will be fixed when QGIS moves to QGIS 3.0 development (since the fix could potentially break existing plugins). To work around it, you need to force a copy of the geometry: geom = QgsGeometry( lay.getFeatures().next().geometry() ) Technical explanation below: Calling just geom = lay.getFeatures().next().geometry() results ...


2

I reproduced this in QGIS 2.14.2 on Ubuntu, both in Console and in a saved .py script. The issue you linked to has the answer - change your call from .geometry() to .geometryAndOwnership(). I tried that and it fixes the problem. According to the API docs this method is deprecated and you should use constGeometry() instead - but I find this also segfaults. ...


3

You can use the Concave hull (Concave, not Convex) tool in the QGIS geoprocessing algorithms. When setting the threshold, make sure it's big enough to encircle all the close points, but not too big to encircle separate clusters. Example: Here are the points: And after the Concave hull tool, 3 separate polygon features.


5

So, I've coded a plugin (Sort and Number) to solve your issue. It allows you to select up to 3 fields and order your attribute table according to these fields. Then, it numbers the attribute table in a new field (named "order" by default), starting from 1.


1

I believe the red layer is what you're after, yes? I used the "Polygon intersection" tool from the processing toolbox (under Geoalgorithms, Vector, Polygons)


2

Thanks to the comment above from DPSSpatial, I have found that the heatmap style in QGIS 2.14 style properties works great for this purpose. I can edit the color ramp so that it is transparent on one end and weight the heatmap based on the pressure value to create the heatmap I'm looking for. Many thanks all.


7

You can define a function which adds the project filename as an attribute and connect this function with the event that adds features. You can use the following code, change the name of the field to whatever you choose (I used Name) and paste it into the Python Console. Now whenever you add a new feature, the field will be populated with the current project ...


0

Possible alternative is to use the QgsPalLayerSettings class for labelling your layer. You can apply bold and italic fonts using the code below (method adapted from this post): layer = qgis.utils.iface.activeLayer() palyr = QgsPalLayerSettings() palyr.readFromLayer(layer) palyr.enabled = True palyr.fieldName = "Field_Name" ...


2

As @underdark suggested, it does seem like a bug. Another workaround is to, wierdly, load your svg file in the earlier QGIS version and save it as a new svg file: Then load this newly saved svg file into QGIS 2.14: Hopefully your text will be aligned correctly. Tested with QGIS 2.13.3-Lyon and QGIS 2.14.1-Essen.


0

Maybe a little bit late but I had the same problem and I figured this out (assuming you want to close the first composer): activeComposer = iface.activeComposers() composer = activeComposer[0] composerWindow = composer.composerWindow() composerWindow.close()


2

QGIS doesn't make use of the GPU for any work it does, render or otherwise.


6

I'm not sure you can with field calculator, but you can use a virtual layer with a query like : SELECT * , (SELECT count(*) FROM your_layer AS b WHERE a.length >= b.length) AS length_position FROM your_layer AS a ORDER BY a.length


0

It seems to that your .kml file might just link to a WMS (Web Mapping Service.) To find out, you can open you kml in a text editor, then look for an URL within the document. Look for WMS in the URL. If it's a WMS layer, then you cannot save it as a shapefile. WMS servers take the client request and push composite rasters back. However, if you are lucky, ...


1

Here is a step-wise process. Queries were made with Spatialite-gui and visualizations with OpenJUMP. Take some points into table "points" with an attribute "radius". Buffer points by taking the radius from an attribute with SQL CREATE TABLE "buffers" AS SELECT ST_Buffer("geometry", "radius") as geometry FROM points; Union the buffer areas with SQL ...


1

You could to use Dissolve Tool But, perhaps you could to create a buffer using the parameter: Dissolve result=YES


3

You could to use Processing Toolbox: SAGA >> Shapes - Grid >> Grid Value to Points


0

In SQL, it is an aggregation query. You can do something like: Select st_Union(geom) from your_table group by the_attribute_which_make_each_group


3

To answer both your questions. It depends on your OS and the encryption software you use. I use Linux and have a LUKS encrypted external HDD. Whenever I plug the drive in, it decrypts the contents and I can access them normally. Note depending on what you use, you may have to decrypt your files to a local folder before you can access them with your GIS ...


2

You could try to vectorize that raster area (first clip it, then vectorize) and then merge the resulting shapefile with the vector point you began with.


0

In QGIS, you'd use Layer > Add delimited text layer


2

You should save it as a template, so that each time you need it you can click project -> new from template. Just save your .qgs template file and copy it in the template directory (which can be found or specified in the General tab)


2

In QGIS you'd use the merge shapefiles function, just be sure to choose the correct couples/triplets/whatever. From the program menu, Vector -> Data management tools -> merge shapefiles


0

It's odd, usually WMS are the kinds of data fetched online. If you can manage to identify where that KMZ is hosted either locally or remotely, it's just a few clicks away in QGIS -> add layer -> load it -> right click -> save as


1

As stated by Mapperz there can't be any white spaces or special characters (like ö, ç, etc.) in the software path and input file paths. Here you can find the same issue (and answer) reported in the lists.osgeo.org mailing list. The issue was also brought up in the LAStools mailing list for QGIS 2.0.1 and Ubuntu 14.04. A workaround according to Edgar was to ...



Top 50 recent answers are included