Tag Info

Hot answers tagged

4

In this test raster (20x20), with values between 1 and 50, I replaced 19 value by -32768 value. In the following raster, the -32768 values were replaced by -3.40282e+38 values (see window of Value Tool Plugin): The used expression is in the window of "Raster calculator expression" (below image and code sample): ...


3

QGIS can not produce a legend like the right one on your color plate 1.2. There is a currently outstanding feature request to add size-scaled features to the legend in print composer, but it has not yet been implemented. Best try would be to generate it in a third party software or some drawing application, and then add the legend as an image to the print ...


3

ST_Collect is probably not the function you are looking for, as this simply combines geometries into a geometry collection of some type, and does not actually union/dissolve them. ST_Union, on the other hand, does dissolve overlaps, and assuming polygonal input (which is most probable in conjunction with ST_Buffer and an input table called point), and ...


2

I can answer my own question, because I found the solution. It is a known QGIS 2.8.1. bug that is going to be fixed with version 2.8.2. The problem is with rotational informations stored in the World File. The bug is causing the misreading of such informations. If you try to change rotational information in the World File to be zero (actually all the World ...


2

Being very keen on the TDD paradigm, I've spent some time putting together a dummy-interface (based on some code fragments I found on the internet) which enables calling QGIS and QGIS-plugins standalone. The interface I came up with looks as follows and I used it for all my unit-tests since: # coding=utf-8 """QGIS plugin implementation. .. note:: This ...


2

You can't sum columns using the Field Calculator (although it would be useful in certain situations). To be able to sum columns and obtain a value, you can use: QGIS function - Basic Statistics (Vector > Analysis Tools > Basic Statistics) QGIS Plugin - GroupStats (Plugins > Manage and Install Plugins) QGIS Plugin - Statist (Plugins > Manage and Install ...


2

After alot of trial and error, I found my answer. For GIS beginners, like myself, what I was looking for was a spatial join, which could be done easily with QGIS: Vector > Data Management Tools > Join Attributes by Location


2

One of the possibilities you've is to customize the QGIS interface in order to hide the tools you don't want any one see. Check this http://linfiniti.com/2011/07/customizing-the-qgis-ui/


2

A similar function has been introduced recently It requires the possible values to be grouped on the related layer and is slightly more involved in setup. If you have a layer Plots Name class (foreign key to Classes:pk) And a layer Classes pk Type [Agriculture/Forest] Plant [Pines/Olives/Corn/Wheat] You will need to add a new relation in Project ...


2

This looks to me like a network connection problem. Under Settings -> Options -> Network, you can enter proxy settings as needed for your network. Alternatively, take the project file home and try it on your own computer.


2

Sorry, but the layers are not in the same CRS. The Catchments is in an Albers Equal area projection (units-meters) and the other two are in Haartebeesthoek94, with degree as units. So your area calculations are in square degrees. If you reproject the transmissivity and intersect polygons to Albers Eq Area (with the "Save As..." option in QGIS) then ...


2

You have a few options (in no particular order): You could define a view in PostGIS and load the view as a layer in QGIS. You could open DBManager and perform the spatial query in the SQL window and check the box under the results window to "Load as new Layer". Perform your spatial query and save the selected features as a new dataset for use in your ...


1

You can either rename the layer in the layer panel and then add the legend into a composer again (so the changed name is used) or you can follow this manual that should answer your question as well.


1

At this point I haven't implemented this stuff myself, but the approach that I am planning on is combining boto with the information on Amazon's page on Landsat on AWS. At first glance, it appears to be a rather doable task. Another option is landsat-util which can be found on github, which is python-based and can interface with AWS.


1

OK so I wanted to convert islands to holes and holes into islands but couldn't find a command to do it in QGIS so I wrote a script myself. Here is that "simple" script which will invert an input_layer into a bbox polygon in an output_layer. The whole process ran over a couple of seconds to invert a 25MB shape file. Better than crashing out with a call to ...


1

To be honest I'm not sure that this will work but have you tried smoothing/simplifying the shapefile? This can be done in QGIS (alternatively try http://mapshaper.org/). I would try it myself but I don't have any shapefile data similar to what you've described. Regards, Eamon


1

You have to use signals. Here you have a nice documentation http://doc.qt.io/qt-4.8/signalsandslots.html. Every widget can send different signals. For example combobox (QComboBox object) send signal every time if you select another text inside: activated(const QString & text) This signal is sent when the user chooses an item in the combobox. The item's ...


1

You will have to go through several process. Here are a few indications to help your out. First create a new column in your layer BIG_ID_COLUMN. Update this column with the Id of each parishes Create a new shapefileBIG_SHAPEFILE with the largest parishes and one for the small ones SMALL_SHAPEFILE Use a closest neighbor tool (v.distance ; grass) or follow ...


1

The answer to your question is yes. You might like to clarify what kind of server-side software you have. You can use GeoServer to do WPS requests. You could use a Python library like Shapely. Or a C# library, or a Java library, or a JavaScript library. Or the QGIS API, or the ArcGIS API or the database, be that SQL Server, PostGIS or Oracle. So, to ...


1

Here are a few indications that could help : In the Layer properties select the Label Tab. In the Rendering subpage (rendu in french) on the right you can param a few things. For example, limit the amount of Labels to be printed or merge connected line labels The placement of labels can be customized under the Placement (Emplacement) subpage. You can ...


1

Your code is uncomplete and not well formated. However, this adaptation seems to work as it is espected: canvas1 = iface.mapCanvas() layers = [] n = canvas1.layerCount() for i in range(n): layers.append(canvas1.layer(i)) canvas2 = canvas1 properties = {"color": "255,0,0", "outline_color": "255,0,255"} symbol = ...


1

You write that you have reprojected the DEM from WGS84 to UTM, but the -projwin coordinates you give are in degrees. That does not work. You have to work either in degrees, or a projected CRS in metres (or else). Turning On-the-fly-reprojection OFF and work solely in one CRS is a good way to avoid such errors in raster operations.


1

Stelios is kind of on the right lines in his comment. However, you are using Projected coordinates in the dialog box and that is fine but it throws the error because the y value of corner 2 is less than the y value of corner 1. Fix it simply by swapping them over (i.e. go lower right to upper left instead of UL to LR).


1

You can do this in ArcMap. It's a little hacky but you should be able to get the results you're looking for. The concept of what you'll be doing is referencing the image to a cartesian coordinate system and then identifying points on it as if it were a map and those points were coordinates. First, split the images into separate files. Next, for each ...


1

the most easy way to do this in a script is to use the subprocess module and gdal_translate import subprocess image_in = "path_input_image" image_out = "path_output_image.tif" subprocess.call(["gdal_translate.exe","-co", "TILED=YES", "-co", "COMPRESS=LZW" "-ot", "Byte", "-scale", image_in, image_out ] if you are in Linux, you don't need the ".exe" after ...


1

You can do that directly in QGIS with Raster -> Conversion -> Translate (Convert Format). To test it, I used a Float64 (Sixty four bit floating point) raster (named test) loaded in the Map View of QGIS. To convert it to Byte (8 bit type), I named it first at the "output file space" as test_byte.tif and afterward, I click in the icon pencil of "Translate ...


1

You could use your file system's tools: put the project file and data in a directory that is read only for your users


1

Assuming that your projection is in meters, the procedure for rasterizing include: 1) At the layer properties, copy the extent of your 'rivers' shapefile and remove the text characters. In my example is: 168902.13 85311.7 831499.38 1271303.48 2) Click in Raster -> Conversión -> Rasterize menu option. Select the output file name and, afterward, click in ...


1

Under the map's Item Properties panel, look for the "Grids" section. Expand that out and click the green "+" button to add a new grid (you can now have multiple grids per map):


1

Yes, you can manually edit the file extension to be TFW instead of TIFW. It is a perfectly acceptable standard and QGIS should read it without breaking anything. The TFW file is just a very simple text file. You can open it with a text editor if you want to see the contents. If you really want, you can have both a TIFW and a TFW in the same folder without ...



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