Tag Info

Hot answers tagged

6

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 ...


6

While PostGIS can handle mixed geometry types, this won't help you for QGIS. Regardless of their source all layers in QGIS can only be of a single geometry type.


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

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 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

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

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

@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 ...


3

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

It's a already answered question, but I suppose that this could be helpful for the others. I had the same problem and finally ended up writing my own GUI utility. It allows a user to adjust Code Page of input data, rename/remap columns of the destination table, set it's name and primary key. Once imported, the data from the SQL Server can be viewed in ...


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

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

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

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

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

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

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".


2

At the moment (and I know it's a bit gross) but you also have to update the layer set on the canvas to update the layer state change canvas.setLayerSet([ml2, ml]) This will also control the render order. m1 will reneder first then ml2 on top of it.


2

It seems that there are two things going on here. First, your tiles are not seamless, in that in the areas of overlap at the edges of the tiles, the elevations are not identical. I can confirm this as I digitized several points along the overlapping area and extracted the elevations in both raster DEMs and found this: In the case of the two tiles that you ...


2

Apologies if I misunderstood your question but perhaps you could create a new attribute column and calculate the length of each feature from there using: $length Hopefully others will help if I am indeed mistaken.



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