Re: [Qgis-user] Raster Calculator Error Questions
Wanda Norman wrote > I tried: ( "aspect@1" < = 90) OR ( "aspect@1" > = 270) - I get > Expression is not valid. Hi Wanda, have you tried not putting spaces between the characters "<" and "=" and between ">" and "="? Regards. Andrea -- Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html ___ 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] Raster Calculator Error Questions
Thanks Nicolas for the quick response. But I am still having issues. I did upgrade to the 3.16 version and I am still unable to write the formula. I tried: ( "aspect@1" < = 90) OR ( "aspect@1" > = 270) - I get Expression is not valid. As soon as I put anything other than "aspect@1" I get a message that the expression is not valid. This is the first time using the raster calculator and it looks as if I can't move forward with the lesson without this step. Any other suggestions? Thanks for your help! Wanda On Fri, Feb 12, 2021 at 10:08 AM Nicolas Cadieux < njacadieux.git...@gmail.com> wrote: > Hi, > I have not used the raster calculator in a while but I am not sure about > you use of the \. > Examples in the user manual ( > https://docs.qgis.org/3.16/en/docs/user_manual/working_with_raster/raster_analysis.html#raster-calculator) > use this as examples. > > ("elevation@1" < 50) * 1 + ("elevation@1" >= 50) * 2 > > > I would try (expression 1) OR (expression 2). Layers names must be placed > between quotes “”. > > You could also update your QGIS version to 3.16. > > Nicolas Cadieux > https://gitlab.com/njacadieux > > Le 12 févr. 2021 à 09:09, Wanda Norman a > écrit : > > > > Greetings friends: > > > > I am working on lesson 7.3.5 in the User Guide / Manual (QGIS 3.10) – > Following along: Using the Raster Calculator. > > > > I am having difficulty with the calculation formula as indicated below: > > > > The manual states this formula should be used: > >Aspect@1 <=90 OR Aspect@1 >= 270 > > Which I am assuming is incorrect because a) I get an error when I run it; > and b) when I set the parameters using the expression operators the formula > looks like this: > >“Aspect@1” <=90 OR “Aspect@1” >=270 > > However, I still get the error: > > Error parsing formula > > Execution failed after 0.02 seconds > > > > With some help – I then tried this formula > > \“Aspect@1”\ <=90 OR \“Aspect@1”\ >=270 > > Which worked for this assignment. > > > > However, moving on to lesson 7.3.6 – More criteria: which takes me to > 21.12.2. Calculate slope (less than 2 and 5 degrees) > > I get the same error as above again. > > > > I am steadily working my way through the Manual and would appreciate any > help. I am using QGIS version 3.10.9-A Coruna (64 bit) on a Windows PC. > > > > Thank you! > > Wanda Norman > ___ > 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] 2 different Pythons in QGIS folder
Hello, I have just installed QGIS via QGIS-OSGeo4W-3.16.2-1-Setup-x86_64.exe (I am transitioning from R/SAGA GIS/ArcGIS) and I see two different Pythons in my QGIS installation folder: C:\Program Files\QGIS 3.16\apps\Python37\python.exe C:\Program Files\QGIS 3.16\bin\python3.exe Can someone please explain why both are there? Which one should I use if I want to use it to experiment/learn geospatial Python and also tap into QGIS? thank you and have a nice weekend! -- Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html ___ 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] Geometries of labels - automatic positioning (no covering)
Hey Matej, please disregard my last message. I got lost in the thread. Would it help your problem if you lock the scale of your project and use the Magnifier to zoom in and out? That way, you can lock the symbols and labels to the scale you want to plot your map in and you would have greater awareness and control over the placement of you labels. (assuming that changing label positions manually is feasible in your case) greetings, silvio ‐‐‐ Original Message ‐‐‐ On Thursday, February 11, 2021 3:08 PM, Matej Mailing wrote: > Thanks, I already have this enabled. > > What I would like is to achieve this result (img1) instead now having > labels covering each other as in img2. > > Thanks, > Matej > > V V tor., 9. feb. 2021 ob 14:02 je oseba Matej Mailing > mail...@tam.si napisala: > > > Thanks, I already have this enabled. > > What I would like is to achieve this result (img1) instead now having > > labels covering each other as in img2. > > Thanks, > > Matej > > V V tor., 9. feb. 2021 ob 13:34 je oseba Richard Duivenvoorde > > rdmaili...@duif.net napisala: > > > > > On 2/9/21 1:29 PM, Matej Mailing wrote: > > > > > > > Hello Regis, > > > > I cannot find that option you mention: "the placement option "always > > > > displays" on the layers" > > > > I seem to have checked all the options - I am using QGIS 3.16.3. > > > > > > See screenshot, it is in the last tab, checkbox "Show all labels for this > > > layer (including colliding labels)" > > > Regards, > > > Richard Duivenvorde > > 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] Geometries of labels - automatic positioning (no covering)
Hey Matej, I think they are referring to the checkbox under Layer Styling -> Labels -> Rendering Tab -> "Show all labels for this layer (including colliding ones)". See this image: https://i.imgur.com/Tifx1FC.png greetings, silvio ‐‐‐ Original Message ‐‐‐ On Tuesday, February 9, 2021 1:29 PM, Matej Mailing wrote: > Hello Regis, > > I cannot find that option you mention: "the placement option "always > displays" on the layers" > > I seem to have checked all the options - I am using QGIS 3.16.3. > > Thanks, > Matej > > V V pet., 5. feb. 2021 ob 15:20 je oseba Régis Haubourg > regis.haubo...@gmail.com napisala: > > > Back on the mailing list. > > mm, so you want to force labels on all features right, especially on > > crowded locations? > > Did you try the placement option "always displays" on the layers you > > want to force? > > I you get a screenshot, that would help > > Best > > Régis > > On 05/02/2021 13:53, Matej Mailing wrote: > > > > > Hi, > > > I would like that the collision engine positions all the labels of > > > selected layers at every scale. I am aware that I can play with the > > > labeling priorities, but when there are two geometries, for example > > > short line and a long line in case of roads or some crossings, there > > > are locations on the map where a large number of labels should be > > > visible and I cannot get a result that all of the labels are visible > > > generally no matter what fixed positions are and their priorities. > > > I need to plot out the map at the fixed scale and have all the labels > > > of the selected layers visible at that scale in this scenario. I don't > > > mind their exact location, just that they have to be visible and not > > > covered by each other. The labels are from a number of layers and > > > represent different types of information (i.e. road names, blocks, > > > crossing names etc.) and I need them to be positioned in a way they > > > are all always visible, which is currently impossible as a small > > > crossing is such a small geometry that is covered with labels from > > > other objects although trying all the priority combinations. > > > Maybe the scale parameter isn't important in this equation as I am > > > thinking now as if enabled, this feature would simply work at all the > > > scales :) > > > Hopefully I was able to define this clear enough. If not, please let me > > > know ;) > > > Thanks, > > > Matej > > > V V pet., 5. feb. 2021 ob 13:20 je oseba Régis Haubourg > > > regis.haubo...@gmail.com napisala: > > > > > > > Hi, > > > > I'm not sure I get correctly what you mean here. You would like the > > > > collision engine to take into account a subset of selected layers? How > > > > would you select them ? Are you aware that you can already play with > > > > labeling priorities on a layer level, and also use some layers to block > > > > labeling on its features. > > > > Let us know a bit more precisely how you see it. > > > > Best regards > > > > Régis > > > > On 05/02/2021 13:14, Matej Mailing wrote: > > > > > > > > > Hello Regis, > > > > > thank you for the clarification. What would help very much would be an > > > > > optional input to the collision engine to execute itself for the > > > > > labels of the selected layers at the selected scale. The result would > > > > > then, if I understand correctly, mean that no labels of the selected > > > > > layers cover each other at that scale. Would that make sense? > > > > > Thanks, > > > > > Matej > > > > > V V pet., 29. jan. 2021 ob 18:20 je oseba Régis Haubourg > > > > > regis.haubo...@gmail.com napisala: > > > > > > > > > > > Hi Matej, > > > > > > There is no geometry stored for labels, it is all up to the > > > > > > collision > > > > > > engine to compute on the fly for each context where to draw labels. > > > > > > You can "pin" labels, and a XY location is stored then, either in > > > > > > the > > > > > > dataset if you set dedicated fields in the advanced labeling > > > > > > options, > > > > > > and your layer is editable, Or in the auxiliary database (a sqlite > > > > > > .qgd > > > > > > side car file) linked to your layer. > > > > > > You can access the auxiliary data in the layer properties. > > > > > > Last option I know of, you can use geometry generators to provide > > > > > > "paths" for labels. Ex: smoothen a sharp line with some smooth / > > > > > > generalize expressions so that the curved labels are better looking. > > > > > > Best regards > > > > > > Régis > > > > > > On 19/01/2021 15:41, Matej Mailing wrote: > > > > > > > > > > > > > Hello, > > > > > > > where are the geometries of the labels stored in the 3.16.x > > > > > > > branch? > > > > > > > We would like to get them to PostGIS to autmatically manipulate > > > > > > > the > > > > > > > positions in a way that the labels do not cover each other in a > > > > > > > smaller scale, i.e. 1:1000. Or is there any plugin that would do > > > > > > > this? > > > > > > > Thanks, > > > > > > >
Re: [Qgis-user] Raster Calculator Error Questions
Hi, I have not used the raster calculator in a while but I am not sure about you use of the \. Examples in the user manual (https://docs.qgis.org/3.16/en/docs/user_manual/working_with_raster/raster_analysis.html#raster-calculator) use this as examples. ("elevation@1" < 50) * 1 + ("elevation@1" >= 50) * 2 I would try (expression 1) OR (expression 2). Layers names must be placed between quotes “”. You could also update your QGIS version to 3.16. Nicolas Cadieux https://gitlab.com/njacadieux > Le 12 févr. 2021 à 09:09, Wanda Norman a écrit : > > > Greetings friends: > > I am working on lesson 7.3.5 in the User Guide / Manual (QGIS 3.10) – > Following along: Using the Raster Calculator. > > I am having difficulty with the calculation formula as indicated below: > > The manual states this formula should be used: >Aspect@1 <=90 OR Aspect@1 >= 270 > Which I am assuming is incorrect because a) I get an error when I run it; and > b) when I set the parameters using the expression operators the formula looks > like this: >“Aspect@1” <=90 OR “Aspect@1” >=270 > However, I still get the error: > Error parsing formula > Execution failed after 0.02 seconds > > With some help – I then tried this formula > \“Aspect@1”\ <=90 OR \“Aspect@1”\ >=270 > Which worked for this assignment. > > However, moving on to lesson 7.3.6 – More criteria: which takes me to > 21.12.2. Calculate slope (less than 2 and 5 degrees) > I get the same error as above again. > > I am steadily working my way through the Manual and would appreciate any > help. I am using QGIS version 3.10.9-A Coruna (64 bit) on a Windows PC. > > Thank you! > Wanda Norman > ___ > 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] Unreadable streetnames during export as image from print composer
Hey, that is a common thing to happen when exporting maps using a WM(T)S or Tile layer. This is due to the difference in DPI between your monitor (probably ~ 96dpi) and the exported map (probably ~300dpi). Service layers will send you more tiles of a smaller scale instead of something that resembles what you see on your screen. A solution would be to use service layers that have a fixed scale. I'm not familiar with maptiler/pdok but if they have a layer for, let's say, 1:1, then use this one if your map is 1:1. Hope this helps. greetings, silvio ‐‐‐ Original Message ‐‐‐ On Friday, February 12, 2021 11:54 AM, wrote: > I’m encountering an issue where the streetnames from maptiler/pdok services > are barely visible on the exported image but are properly scaled when viewed > in QGIS-composer. Can anyone recommend a fix for this?___ 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] Unreadable streetnames during export as image from print composer
As Silvio said this is a limitation of the online basemaps. They are not designed for printing. As Sivlio mentioned the size is determined by the export resolution In your Layout window try setting your output resolution under *layout>properties>export settings* to 96dpi. This will make your labels the right size but any rasters you have will be fuzzy. If rasters being fuzzy is a problem then it is good that you are using Maptiler because it gives you control over the styles. This means you can make all of the adjustment to label size in the style tab of the vector tile. If you are printing at 300 dpi make them 3 times larger than you think you need. They will look way too big in QGIS but when you print them they will be the right size. I have gone as far as creating a style with a project variable that I can adjust the scale of the vector tile style tile at any point. 1. First add tile_zoom_mag as a project property 2. If you set iit to 1- you will see it as you would expect. For 150dpi something like 2 might be better. If it is set to a high number in the map and layout view before printing it will look wrong. 1. To create the style I added @tile_zoom_mag * (original expression) in front of all the size expressions for line work. 2. For label size and lines that did not have an expression I used @value *@tile_zoom_mag. This takes the currently set value and multiplies it by the tile_zoom_mag variable. On Fri, Feb 12, 2021 at 6:06 AM silvio.bentzien < silvio.bentz...@protonmail.com> wrote: > Hey, > that is a common thing to happen when exporting maps using a WM(T)S or > Tile layer. This is due to the difference in DPI between your monitor > (probably ~ 96dpi) and the exported map (probably ~300dpi). > > Service layers will send you more tiles of a smaller scale instead of > something that resembles what you see on your screen. A solution would be > to use service layers that have a fixed scale. I'm not familiar with > maptiler/pdok but if they have a layer for, let's say, 1:1, then use > this one if your map is 1:1. > > Hope this helps. > > greetings, > silvio > > ‐‐‐ Original Message ‐‐‐ > On Friday, February 12, 2021 11:54 AM, wrote: > > I’m encountering an issue where the streetnames from maptiler/pdok > services are barely visible on the exported image but are properly scaled > when viewed in QGIS-composer. Can anyone recommend a fix for this? > > > ___ > 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] Raster Calculator Error Questions
Greetings friends: I am working on lesson 7.3.5 in the User Guide / Manual (QGIS 3.10) – Following along: Using the Raster Calculator. I am having difficulty with the calculation formula as indicated below: The manual states this formula should be used: Aspect@1 <=90 OR Aspect@1 >= 270 Which I am assuming is incorrect because a) I get an error when I run it; and b) when I set the parameters using the expression operators the formula looks like this: “Aspect@1” <=90 OR “Aspect@1” >=270 However, I still get the error: Error parsing formula Execution failed after 0.02 seconds With some help – I then tried this formula \“Aspect@1”\ <=90 OR \“Aspect@1”\ >=270 Which worked for this assignment. However, moving on to lesson 7.3.6 – More criteria: which takes me to 21.12.2. Calculate slope (less than 2 and 5 degrees) I get the same error as above again. I am steadily working my way through the Manual and would appreciate any help. I am using QGIS version 3.10.9-A Coruna (64 bit) on a Windows PC. Thank you! Wanda Norman ___ 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] Geometries of labels - automatic positioning (no covering)
Hi, no magic anwser here again. But when I face this kind of need, I switch on the option of the rendering engine that displays the labeling candidate paths, and play a lot with the number of candidates. Of course, the more candidates, the more CPU work, but the more chances to have a 99 % good result. Best luck Régis On 12/02/2021 14:02, Matej Mailing wrote: > Hi Silvio. > > Basically my issue is that I need to have all the symbols and labels > visible, but since the number of those is huge, I want to have the > need to place them automatically as much as possible. If somehow I > could use the collision engine to recalculate the positions - I just > need the labels to be visible, the exact label position (little more > to the each side as it must be to avoid colliding) is not important, I > just need them to be visible near the objects basically... > > Positioning every label by hand takes an enormous amount of time of > manual work that seems to be meaningless in the current state of > automation :) > > Thanks, > Matej > > V V pet., 12. feb. 2021 ob 12:49 je oseba silvio.bentzien > napisala: >> Hey Matej, >> >> please disregard my last message. I got lost in the thread. >> >> >> Would it help your problem if you lock the scale of your project and use the >> Magnifier to zoom in and out? That way, you can lock the symbols and labels >> to the scale you want to plot your map in and you would have greater >> awareness and control over the placement of you labels. (assuming that >> changing label positions manually is feasible in your case) >> >> greetings, >> silvio >> >> >> ‐‐‐ Original Message ‐‐‐ >> On Thursday, February 11, 2021 3:08 PM, Matej Mailing wrote: >> >>> Thanks, I already have this enabled. >>> >>> What I would like is to achieve this result (img1) instead now having >>> labels covering each other as in img2. >>> >>> Thanks, >>> Matej >>> >>> V V tor., 9. feb. 2021 ob 14:02 je oseba Matej Mailing >>> mail...@tam.si napisala: >>> Thanks, I already have this enabled. What I would like is to achieve this result (img1) instead now having labels covering each other as in img2. Thanks, Matej V V tor., 9. feb. 2021 ob 13:34 je oseba Richard Duivenvoorde rdmaili...@duif.net napisala: > On 2/9/21 1:29 PM, Matej Mailing wrote: > >> Hello Regis, >> I cannot find that option you mention: "the placement option "always >> displays" on the layers" >> I seem to have checked all the options - I am using QGIS 3.16.3. > See screenshot, it is in the last tab, checkbox "Show all labels for this > layer (including colliding labels)" > Regards, > Richard Duivenvorde >>> 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 pEpkey.asc Description: application/pgp-keys ___ 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] Geometries of labels - automatic positioning (no covering)
Hi Silvio. Basically my issue is that I need to have all the symbols and labels visible, but since the number of those is huge, I want to have the need to place them automatically as much as possible. If somehow I could use the collision engine to recalculate the positions - I just need the labels to be visible, the exact label position (little more to the each side as it must be to avoid colliding) is not important, I just need them to be visible near the objects basically... Positioning every label by hand takes an enormous amount of time of manual work that seems to be meaningless in the current state of automation :) Thanks, Matej V V pet., 12. feb. 2021 ob 12:49 je oseba silvio.bentzien napisala: > > Hey Matej, > > please disregard my last message. I got lost in the thread. > > > Would it help your problem if you lock the scale of your project and use the > Magnifier to zoom in and out? That way, you can lock the symbols and labels > to the scale you want to plot your map in and you would have greater > awareness and control over the placement of you labels. (assuming that > changing label positions manually is feasible in your case) > > greetings, > silvio > > > ‐‐‐ Original Message ‐‐‐ > On Thursday, February 11, 2021 3:08 PM, Matej Mailing wrote: > > > Thanks, I already have this enabled. > > > > What I would like is to achieve this result (img1) instead now having > > labels covering each other as in img2. > > > > Thanks, > > Matej > > > > V V tor., 9. feb. 2021 ob 14:02 je oseba Matej Mailing > > mail...@tam.si napisala: > > > > > Thanks, I already have this enabled. > > > What I would like is to achieve this result (img1) instead now having > > > labels covering each other as in img2. > > > Thanks, > > > Matej > > > V V tor., 9. feb. 2021 ob 13:34 je oseba Richard Duivenvoorde > > > rdmaili...@duif.net napisala: > > > > > > > On 2/9/21 1:29 PM, Matej Mailing wrote: > > > > > > > > > Hello Regis, > > > > > I cannot find that option you mention: "the placement option "always > > > > > displays" on the layers" > > > > > I seem to have checked all the options - I am using QGIS 3.16.3. > > > > > > > > See screenshot, it is in the last tab, checkbox "Show all labels for > > > > this layer (including colliding labels)" > > > > Regards, > > > > Richard Duivenvorde > > > > 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] Unreadable streetnames during export as image from print composer
I'm encountering an issue where the streetnames from maptiler/pdok services are barely visible on the exported image but are properly scaled when viewed in QGIS-composer. Can anyone recommend a fix for this? ___ 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