[Qgis-user] Update value in shape file using dbmanager and virtual layers

2017-05-30 Thread Luis Fernando Duque Quintero
Hello guys, I want to update a value in a shape file using dbmanager and 
virtual layers

I have a the virtual layer mydata with the column myfield

but when a run;

update mydata
set myfield = 1

dbmanager threw me this error:

An error occurred when executing a query:
Query execution error on CREATE TEMP VIEW _tview AS update mydata
set myfield = 1; : 1 - near "update": syntax error

I know that is much easier make this with field calculator but I need update 
the data with sql for other scenarios with certain types of conditions and 
several virtual layers involved.


Thanks before hand to everyone.
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Split features tool behavior

2017-05-30 Thread James Wood
Hey Andreas,
I haven't experienced the invalid geometry as you describe, but I did find that 
my QGIS install had some issues. I have upgraded to 2.18.9 on Win10. If you 
have a sample of your data available, I would be happy to try to corroborate. 

James
Sent from my iPhone

> On May 29, 2017, at 06:16, Andreas Wicht  wrote:
> 
>> On 28 May 2017 at 14:43, James Wood  wrote:
>> On the digitizing toolbar, try "Split Parts" instead of "Split Features" on 
>> multipart polygons.
> 
> Thank you for the hint, James. Somehow I always thought that this
> function is only suitable for separating an existing part from a
> feature (never used it though).
> Yet, if you cut a polygon with the "Split Parts" tool, the output will
> be an invalid geometry (I observed self-intersections). This as well
> can not be the intended behavior. I could observe those errors in
> simple scratch layers as well as in PostGIS layers.
> 
> Has anybody else experienced this behavior?
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] styled vector to raster layer

2017-05-30 Thread Andreas Plesch
I feel I am missing a basic function somewhere to "burn" (in gdal terms) a
vector layer as styled by QGIS, for example with labels, to a raster layer
(of some resolution).

The Rasterize (vector to raster) function is based on gdal_rasterize and
does not take into account styling as it focuses on preserving the actual
data.

The work around I am currently using is to use Project-Save as Image while
displaying only the styled vector layer which will generate a correct world
file helper, then loading the generated image as raster layer and assigning
the correct projection. Finally, I clip the raster with the original extent
of the vector layer.

This works but is limited as the resolution is constrained by the physical
size of the map window and requires the additional house keeping steps.

qgis2web or QTiles or OGR2Tiles as plugins do something like this
internally but I could not find a plugin which just generates a regular
raster layer (say geotiff).

I also know I could probably produce a short Python script (perhaps as
processing script) to do this but still think I am missing something ?

Any help or hint much welcome,

Andreas
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Split features tool behavior

2017-05-30 Thread Bernhard Ströbl

Hi Andreas,

I have no problem with invalid geometries in my PostGIS test layers with 
split parts using QGIS 2.14.15 on Linux.

Without having your data I cannot tell why yours are invalid.

Anyway you might try DigitizingTools plugin which has a tool that 
deletes a part of a multi feature and inserts it as a new (single-part) 
feature which might be easier to handle. You can later merge it to any 
feature you like. There is also a tool to fill gaps between features 
with a new feature.


Bernhard

Am 30.05.2017 um 16:41 schrieb Andreas Wicht:

On 29 May 2017 at 13:16, Andreas Wicht  wrote:

On 28 May 2017 at 14:43, James Wood  wrote:

On the digitizing toolbar, try "Split Parts" instead of "Split Features" on 
multipart polygons.


Thank you for the hint, James. Somehow I always thought that this
function is only suitable for separating an existing part from a
feature (never used it though).
Yet, if you cut a polygon with the "Split Parts" tool, the output will
be an invalid geometry (I observed self-intersections). This as well
can not be the intended behavior. I could observe those errors in
simple scratch layers as well as in PostGIS layers.

Has anybody else experienced this behavior?


Is my assumption right, that according to this issue
(https://issues.qgis.org/issues/12799) the current workflow would have
to look somewhat like this:
- use split parts tool to split the multipart polygon
- delete the newly created part (-> invalid geometry) using the
"Delete Part" tool

either
- create a new feature/new part (depending on the use case) inside the
hole created by deleting the part
- optional: attribute merging with other features surrounding the new
feature (depends on the complexity of the attribute table)
- change desired attribute(s) (which led to the decision to separate the area)

or
- use the "Reshape Features" tool to enlarge a neighbouring polygon by
the cut off area

or
- create new feature inside the hole and merge it ("Merge Selected
Features" tool) to enlarge a neighbouring polygon by the cut off area

Isn't that a bit too much post-processing for that cause?

Any thoughts?
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user





__ Information from ESET Mail Security, version of virus signature 
database 15501 (20170530) __

The message was checked by ESET Mail Security.
http://www.eset.com


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Split features tool behavior

2017-05-30 Thread Andreas Wicht
On 29 May 2017 at 13:16, Andreas Wicht  wrote:
> On 28 May 2017 at 14:43, James Wood  wrote:
>> On the digitizing toolbar, try "Split Parts" instead of "Split Features" on 
>> multipart polygons.
>
> Thank you for the hint, James. Somehow I always thought that this
> function is only suitable for separating an existing part from a
> feature (never used it though).
> Yet, if you cut a polygon with the "Split Parts" tool, the output will
> be an invalid geometry (I observed self-intersections). This as well
> can not be the intended behavior. I could observe those errors in
> simple scratch layers as well as in PostGIS layers.
>
> Has anybody else experienced this behavior?

Is my assumption right, that according to this issue
(https://issues.qgis.org/issues/12799) the current workflow would have
to look somewhat like this:
- use split parts tool to split the multipart polygon
- delete the newly created part (-> invalid geometry) using the
"Delete Part" tool

either
- create a new feature/new part (depending on the use case) inside the
hole created by deleting the part
- optional: attribute merging with other features surrounding the new
feature (depends on the complexity of the attribute table)
- change desired attribute(s) (which led to the decision to separate the area)

or
- use the "Reshape Features" tool to enlarge a neighbouring polygon by
the cut off area

or
- create new feature inside the hole and merge it ("Merge Selected
Features" tool) to enlarge a neighbouring polygon by the cut off area

Isn't that a bit too much post-processing for that cause?

Any thoughts?
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Combine several attribute tables

2017-05-30 Thread DelazJ
Hi,
"Vector menu --> Data Management Tools --> Merge Vector Layers" should do
that. Depending on the QGIS version,  you may need to enable in Plugins
Manager either Processing or FTools beforehand.

Also, you can use virtual layers as explained at
https://gis.stackexchange.com/questions/215041/can-i-combine-two-heat-maps-in-qgis/215063#215063
(thanks Alexandre)

Hope that helps,
DelazJ

2017-05-30 15:51 GMT+02:00 Anke zur Gölden :

> Hello
>
> i have some vector layer data in different vector layer tables (same
> structure!).
> Is there a way to combine them into one single attribute table?
>
> example
>
> table 1:
> row 1
> row 2
> row 3
>
> table 2:
> row 4
> row 5
> row 6
>
>
> put them together in one single table:
> row 1
> row 2
> row 3
> row 4
> row 5
> row 6
>
>
>
> thnaks
> anke
>
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Combine several attribute tables

2017-05-30 Thread Anke zur Gölden
Hello

i have some vector layer data in different vector layer tables (same 
structure!).
Is there a way to combine them into one single attribute table?

example

table 1:
row 1
row 2
row 3

table 2:
row 4
row 5
row 6


put them together in one single table:
row 1
row 2
row 3
row 4
row 5
row 6



thnaks
anke

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Snapping: Move Features vs Node Tool

2017-05-30 Thread Randal Hale
A question. 

In an attempt to help a client I'm doing some data cleanup - which is
good. I spend too much time talking and not enough doing. I need to
snap points to the endpoints of lines. If I set snapping up and use the
move features tool the point doesn't snap to the line. If I move the
point using the node tool the point snaps to the line. 

I've been looking for an option or something to change. I'm not seeing
one. Is this expected behavior? To me it would make more sense for both
tools to snap data - but I may be missing something. If I add data, the
data snaps as I would expect it. The good people I'm helping
immediately started moving data and it didn't snap - and I've
instructed them to use the node tool to make the edits. 

QGIS 2.18.9 - Linux

Thanks
Randy


-- 
Randal Hale 
rjh...@northrivergeographic.com
https://www.northrivergeographic.com
(423) 653-3611
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Selecting displaced symbols

2017-05-30 Thread Neumann, Andreas
Hi Karl-Magnus, 

I think this is a good idea. It could either be a separate selection
mode (we already have different modes for selection on the drop-down
button) or it could be toggled with a keyboard combination on the
existing "click" mode. Can you open a feature request at
https://issues.qgis.org/ [1] ? 

Greetings, 

Andreas 

On 2017-05-30 12:00, Karl Magnus Jönsson wrote:

> Hi! 
> 
> When talking about this. I've had a thought of improvement of the select 
> tool. When there is several features in the same (or almost the same) 
> location in one layer it is difficult to select one particular feature. Could 
> we have the same functionality with select tool as with identify? Right click 
> gets you a pull-down menu with potential features and you can select one from 
> the list that gets selected. Understandable? Has this already been thought 
> of? A workaround is to use the identify tool with right click. At the bottom 
> of the list you can open the attribute table and select the desired features 
> from the table. Works but one step more. 
> 
> KARL-MAGNUS 
> 
> FRÅN: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] FÖR Neumann, 
> Andreas
> SKICKAT: den 30 maj 2017 11:11
> TILL: Martin Bain
> KOPIA: qgis-user@lists.osgeo.org
> ÄMNE: Re: [Qgis-user] Selecting displaced symbols 
> 
> Hi Martin, 
> 
> As far as I know, picking is totally independent of the rendering. So the 
> "Info tool" doesn't know about the displacement renderer. I know it is not 
> ideal, but it is a technical limitation and there are no known workarounds. 
> 
> You can, however, display the central point (with a separate symbol) so the 
> user knows where to pick. Also, you can easily access each individual point 
> by changing the identify mode to "Layer choice" - where you get a pull-down 
> menu and you can identify each individual point by its "display attribute". 
> 
> Maybe a dev knows a solution to this problem - but currently I think there 
> are no known workarounds.  
> 
> Andreas 
> 
> On 2017-05-30 03:39, Martin Bain wrote:
> 
>> Hi, 
>> 
>> I have the familiar situation of a layer with multiple points at the same 
>> coordinates.  The points have data defined SVG symbols 
>> 
>> I'm using the Point Displacement renderer to overcome having overlapping 
>> symbols.  This definitely makes for an improved appearance.  
>> 
>> However if you want to use the info tool or the select tool you cant click 
>> on the displaced symbol.  You can only select all points via the central 
>> point. 
>> 
>> Is there a trick to select a point by its offset symbol instead of the true 
>> coordinates?  I have half a memory of reading something about this once 
>> before but maybe I imagined it :P 
>> 
>> I would prefer to leave the points in their original position - the data is 
>> of traffic accidents, provided by the state government. 
>> 
>> Thank you, 
>> 
>> Martin. 
>> 
>> This email is intended for the named recipient only. The information it 
>> contains may be confidential. If you are not the intended recipient you must 
>> not reproduce or distribute any part of this email, disclose its contents to 
>> any other party or take any action in reliance on it. If you have received 
>> this email in error, please contact the sender immediately and delete the 
>> message.
>> 
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

  

Links:
--
[1] http://issues.qgis.org/___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Selecting displaced symbols

2017-05-30 Thread Karl Magnus Jönsson
Hi!
When talking about this. I’ve had a thought of improvement of the select tool. 
When there is several features in the same (or almost the same) location in one 
layer it is difficult to select one particular feature. Could we have the same 
functionality with select tool as with identify? Right click gets you a 
pull-down menu with potential features and you can select one from the list 
that gets selected. Understandable? Has this already been thought of? A 
workaround is to use the identify tool with right click. At the bottom of the 
list you can open the attribute table and select the desired features from the 
table. Works but one step more.

Karl-Magnus

Från: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] För Neumann, Andreas
Skickat: den 30 maj 2017 11:11
Till: Martin Bain
Kopia: qgis-user@lists.osgeo.org
Ämne: Re: [Qgis-user] Selecting displaced symbols


Hi Martin,

As far as I know, picking is totally independent of the rendering. So the "Info 
tool" doesn't know about the displacement renderer. I know it is not ideal, but 
it is a technical limitation and there are no known workarounds.

You can, however, display the central point (with a separate symbol) so the 
user knows where to pick. Also, you can easily access each individual point by 
changing the identify mode to "Layer choice" - where you get a pull-down menu 
and you can identify each individual point by its "display attribute".

Maybe a dev knows a solution to this problem - but currently I think there are 
no known workarounds.

Andreas

On 2017-05-30 03:39, Martin Bain wrote:
Hi,
I have the familiar situation of a layer with multiple points at the same 
coordinates.  The points have data defined SVG symbols

I’m using the Point Displacement renderer to overcome having overlapping 
symbols.  This definitely makes for an improved appearance.

However if you want to use the info tool or the select tool you cant click on 
the displaced symbol.  You can only select all points via the central point.

Is there a trick to select a point by its offset symbol instead of the true 
coordinates?  I have half a memory of reading something about this once before 
but maybe I imagined it :P

I would prefer to leave the points in their original position – the data is of 
traffic accidents, provided by the state government.

Thank you,
Martin.

This email is intended for the named recipient only. The information it 
contains may be confidential. If you are not the intended recipient you must 
not reproduce or distribute any part of this email, disclose its contents to 
any other party or take any action in reliance on it. If you have received this 
email in error, please contact the sender immediately and delete the message.

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user



___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Selecting displaced symbols

2017-05-30 Thread Neumann, Andreas
Hi Martin, 

As far as I know, picking is totally independent of the rendering. So
the "Info tool" doesn't know about the displacement renderer. I know it
is not ideal, but it is a technical limitation and there are no known
workarounds. 

You can, however, display the central point (with a separate symbol) so
the user knows where to pick. Also, you can easily access each
individual point by changing the identify mode to "Layer choice" - where
you get a pull-down menu and you can identify each individual point by
its "display attribute". 

Maybe a dev knows a solution to this problem - but currently I think
there are no known workarounds.  

Andreas 

On 2017-05-30 03:39, Martin Bain wrote:

> Hi, 
> 
> I have the familiar situation of a layer with multiple points at the same 
> coordinates.  The points have data defined SVG symbols 
> 
> I'm using the Point Displacement renderer to overcome having overlapping 
> symbols.  This definitely makes for an improved appearance.  
> 
> However if you want to use the info tool or the select tool you cant click on 
> the displaced symbol.  You can only select all points via the central point. 
> 
> Is there a trick to select a point by its offset symbol instead of the true 
> coordinates?  I have half a memory of reading something about this once 
> before but maybe I imagined it :P 
> 
> I would prefer to leave the points in their original position - the data is 
> of traffic accidents, provided by the state government. 
> 
> Thank you, 
> 
> Martin. 
> This email is intended for the named recipient only. The information it 
> contains may be confidential. If you are not the intended recipient you must 
> not reproduce or distribute any part of this email, disclose its contents to 
> any other party or take any action in reliance on it. If you have received 
> this email in error, please contact the sender immediately and delete the 
> message.
> 
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user