Tag Info

Hot answers tagged

5

It seems like there's no way to just symbolise the line as a zigzag: unfortunately, you'll have to alter the underlying data. You can get a reasonably good zigzag line by first splitting the original line into many equidistant line segments, and then offsetting every other point by a fixed amount. Here's a Python script that does this, taking NathanW's ...


5

This was a tough problem to track down because I had thought that the effect was at the edges of tiles when it fact they are throughout the data. You're right that the phenomena isn't in the data before mosaicking the data. The problem results from the resampling process that is inherent in mosaicking. You need to use either the cubic convolution or bilinear ...


4

Not stupid at all buddy! Everyone has to learn sometime :) You may have already tried the way I am going to describe as I use QGIS 2.2 instead of 2.4. Open the attribute table, select New column and add the name and change the type: The format I normally use is YYYY-MM-DD when typing in the Date column: Hope this helps.


3

In 2.4 there is even calendar widget ("date picker"). In the layers "Fields" tabs, select "Date/Time" widget for a date field and check "calendar popup" option in widget detail settings.


3

You have to use a projected CRS like UTM (for your part of the world) to get real circles and meters as units. Please do not use Google/Web Mercator, it does not use real meters as units (only at the aequator).


3

I've tried to do this before and haven't had much luck. qGIS places repeated symbols on a line based on one reference point (by default, the center, though you can set it to top/middle/bottom x left/center/right), and rotates that symbol based on the slope of the line at that point. On a straight line, where the slope doesn't change from one symbol ...


3

Achieving this goal is somewhat a basic task in GIS, however the method in QGIS might not be trivial. Your best chance is to use GRASS's r.walk function, which creates an anisotropic cost surface (dem+slope+other factors). First, you have to create a friction surface as an input to r.walk. In your case it can be a single-valued raster (1.0) matching the ...


3

The v.split.length function from GRASS should do exactly what you want by splitting the line into equal segments defined by the user without the need for a point layer. Here's a simple example of a straight line (it also works on non-straight and multiple lines): I added a column to calculate its length using $length in the expression: Using the ...


3

I just found a solution. There is also an active psycop2 connection. When I commit it or close the connection before osm2pgsql runs and open it afterwards again it works. Probably osm2pgsql can't access to the database if this connection is open.


3

I recommend you to read the qgis cookbook: http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/ There you can read how to program a plugin that suits your needs. In the section plugins: http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/plugins.html it is shown how to set up a plugin with a user interface that is using qt


3

@Martin has provided excellent links in order to create plugins for QGIS. To make life a little easier, there is a plugin called Plugin Builder which very easily creates all the core files you need for your plugin. You can download and install this from the QGIS toolbar: There is also a tutorial here which describes how to use the Plugin Builder ...


3

Given the forumla: GVF = (x - min) / (max - min) (Notice the brackets.) It is impossible for the values to be outside the range 0 - 1 for all values of x between min and max, which by definition it is. In fact, it should occupy the full range from 0 - 1. So we can conclude that either your min and max values aren't representative of the actual range of ...


2

@DarrenCope made a very good point, your layer contained inconsistencies. Please note: I only posted this as an answer as to include a screenshot of the results, please accept Darren's answer when he posts one as he came up with the correct solution. I used the Multiparts to singleparts function (via Vector > Geometry Tools > Multiparts to singleparts) ...


2

Finnish Airports Isochrones using the Interpolation plugin Site analyses can benefit greatly from using “drive-time” isochrones to define the study area. Drive time isochrones are often significantly different from simple buffer areas which disregard natural barriers such as rivers or slow roads. ...


2

It turned out I did not properly initialize QGis like you're supposed to when writing standalone scripts. Adding the following lines made everything work: QgsApplication([], True) #a path was not needed QgsApplication.initQgis() #do all the things with your QgsProject here QgsApplication.exitQgis() This question and the PyQGIS Developer Cookbook got me ...


2

So... I'm answering my own question. I'm just selecting my answer because it's not using GRASS and, at the moment, I'm trying to stick to the QGIS environment (in the future, I'm almost sure I'll need to invest more in GRASS). So... this is what I've did: I selected the select attributes by rectangle selected my whole layer Opened the layer attribute ...


2

Cleaning the original shapefile using GRASS v.clean snap from the Processing Toolkit (using a Threshold of 10) produces a line shapefile that can be polygonised using 'Polygonize' also from the Processing Toolkit.


2

You can use the Openlayers plugin (http://hub.qgis.org/projects/openlayers/wiki) which introduces OpenStreetMap, Google Maps, and Yahoo Maps as basemaps. See these blogs and youtube videos (http://www.digital-geography.com/qgis-plugins-openlayers/#.VEP5-cnYff0; https://www.youtube.com/watch?v=6N3h4KQW_XQ) for information. Or you can use ESRI's basemapping, ...


2

You can use the SAGA Contour lines from grid tool, and there set both the minimum and maximum to your elevation contour of choice Here's an example with an elevation of 500 meters


2

give the qspatialite plugin a try (https://plugins.qgis.org/plugins/QspatiaLite/) (Create empty db, now you can select all your layers and add at one go. see screenshot 1)


2

If you load the file, the CRS should be assigned automatically. You can check that with Rightclick, Set CRS for Layer. If not, create a custom CRS with the proj string you mentioned under Settings -> Custom CRS. Then rightclick on the layer, Save As ... under a different file name, Select CRS and navigate to a lat/lon CRS from list.


2

For the Openlayers plugin, the Project CRS must be in EPSG:3857. Your other layers can have different Layer CRS, if you have enabled On-the-fly-reprojection. BTW, current version of QGIS is 2.4, and the openlayers plugin does not support older versions anymore.


2

It looks like you're trying to get a unique integer field for QGIS to use as a key. I've had luck using the row_number window function for this. The basic syntax is: SELECT row_number() OVER () As vid, ... That will give each row a sequential integer starting with 1.


2

You could use the Intersect function (Vector > Geoprocessing Tools > Intersect) to provide you with another line layer with where the duplicates lie. You can then give your 2 layers different colours (eg. make the original layer to be thicker and darker; the intersect layer to be thinner and lighter): If you want to see the duplicates in a single line ...


2

You can use the Field Calculator to create a new column and then use a similar command like the following in the expression: toreal("your column") for real numbers. toint("your column") for integers.


2

Given a starting point, bearings and distances the Azimuth and Distance plug-in will do this too.


2

There are a number of sources with examples showing what syntax can be used for rasters. Basically, common mathematical logics are used such as: Mathematical (+, -, *, /) Trigonometric (sin, cos, tan, asin, acos, atan) Comparison (<, >, =, <=, >=) Logical (AND, OR) Here you can find how some of those syntax are used in some examples. Other sources ...


2

You are looking for what is called the "strongly connected components" in graph theory jargon. These network islands can be computed in QGIS with the grass plugin - See v.net.components.


2

The plugin layer has no functionality to export to an image file. Instead, you can save map canvas image (File - Save as Image. A world file is outputted together), and then convert the image to GeoTIFF with the Translate (Convert format) tool of GDALTools. In the tool dialog, the target SRS field should be filled with the CRS of your map (EPSG:27039).


2

You just right click the layer and select Properties. Then go the Metadata tab. Scroll down and look for "Pixel Size".



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