Re: [Qgis-user] Field Calculator Expression

2020-08-17 Thread David Greenewalt

You could try a "CASE" expression:


expression CASE

CASEWHEN conditionTHEN result[ …n ][ ELSE result]END

[ ] marks optional components

Arguments


WHEN condition- The condition expression to evaluate.

THEN result- If conditionevaluates to True then resultis evaluated and 
returned.


ELSE result- If none of the above conditions evaluated to True then 
resultis evaluated and returned.


Example

CASEWHEN "ID" = 1 THEN 'Yellow'
WHEN "ID" = 2 THEN 'Green'END


Hope this helps,
David


On 8/17/2020 7:20 PM, krishna Ayyala wrote:

I have the following attribute table with two fields ID and ID2
image.png

What expression can I use within the field calculator so that, I can 
fill the values for ID2 as below?


ID  ID2
1   Yellow
2   Green
3   White
4   Blue
5   Orange
6   Brown
7   Light Blue
8   Light Yellow
9   Light Green





___
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] Field Calculator Expression

2020-08-17 Thread qgis-user

  
  
If it's really just nine records, just edit them. Or are you trying
to do this for a larger number of records that share ID2? Or doing
this repeatedly? 
  

___
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] Field Calculator Expression

2020-08-17 Thread krishna Ayyala
I have the following attribute table with two fields ID and ID2
[image: image.png]

What expression can I use within the field calculator so that, I can fill
the values for ID2 as below?

ID ID2
1 Yellow
2 Green
3 White
4 Blue
5 Orange
6 Brown
7 Light Blue
8 Light Yellow
9 Light Green
___
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] Checking SRTM resolution .

2020-08-17 Thread Kirk Schmidt

Hi Jean:

Load the raster into QGIS and left click on the name in the Layers 
View.  Click on properties item and then information tab . Scroll down 
to the "Dimensions / Origin/Pixel size" Labels. The fisrt integer next 
the pixel size will be the resolution in meters if you are using a 
projected coordinate system.


You can always double check by zooming into a few pixels and use the 
measure tool to measure the pixel extent.


Kirk

On 8/16/2020 7:49 AM, jean Lukusa wrote:

I have downloaded SRTM from QGIS 3.14.1.
How Can I Check its  resolution?

___
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


--
Kirk Schmidt, MScF, BScF, RPF
General Manager
Nortek Resource Solutions Inc.
RR # 1
Thorburn, NS
B0K 1W0
Tel (902) 922.3607
Email: k...@nortekresources.com
Web: www.nortekresources.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] Displaying two or more labels(fields) in a Map

2020-08-17 Thread jean Lukusa
Great, thanks!

Le lun. 17 août 2020 à 12:12, Richard McDonnell 
a écrit :

> Hi,
>
> To add to this, you can also create a single string, with symbols like
> hyphens to break up the text,
>
> For example
>
>
>
> 1.   “Attribute1”||”Attribute2”||”Attribute3” would result in
> Attribute1Attribute2Attribute3
>
> 2.   “Attribute1”||’_’||”Attribute2”||’_’|| “Attribute3” would result
> in Attribute1_Attribute2_Attribute3
>
> 3.   “Attribute1”||’ ‘||”Attribute2”||’ ‘|| “Attribute3” would result
> in Attribute1 Attribute2 Attribute3
>
> 4.   “Attribute1”||’ - ‘||”Attribute2”||’ - ‘|| “Attribute3” would
> result in Attribute1 - Attribute2 - Attribute3
>
>
>
> Hope that helps somewhat.
>
> Regards,
>
>
>
> Richard
>
>
>
> ——
> Richard McDonnell MSc GIS, FME Certified Professional
> *FRM Data Management*
>
> ——
> Oifig na nOibreacha Poiblí
> Office of Public Works
>
> Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
> Jonathan Swift Street, Trim, Co Meath, C15 NX36
> ——
> M +353 87 688 5964 T +353 1 647 6543
> https://www.opw.ie
>
> ——
> To send me files larger than 30MB, please use the link below
> https://filetransfer.opw.ie/filedrop/richard.mcdonn...@opw.ie
>
> Email Disclaimer: https://www.opw.ie/en/disclaimer/
>
> *From:* Qgis-user  *On Behalf Of *Charles
> Dixon-Paver
> *Sent:* 16 August 2020 11:56
> *To:* jean Lukusa 
> *Cc:* Qgis Users List 
> *Subject:* Re: [Qgis-user] Displaying two or more labels(fields) in a Map
>
>
>
> If I understand what you are trying to achieve correctly, you can build
> the required labels by concatenating values in the expression builder
>
> [image: image.png]
>
>
>
> On Sun, 16 Aug 2020 at 12:44, jean Lukusa  wrote:
>
> Hi all.
>
> I have created two fields in my shapefile attribute table.
>
> How Can I do to display all fields (labels) on  the Map ?
>
> ___
> 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] Python Plugin error "Host not found"

2020-08-17 Thread Richard Duivenvoorde
On 8/17/20 11:04 AM, Sarah Way wrote:
> Hello,
> 
> I am a relatively new user  and thus still learning as I go...
> 
> Can anyone please help me fix a Python plugin repository error?
> I was running QGIS 3.4.13 and trying to select the XYTools plugin when I 
> received the QGIS Python Plugin Installer error window: 
> 
> "Error reading repository: QGIS Plugin Repository: Host not found"
> 
> When I went into the Plugin settings, I noticed that the QGIS Official Plugin 
> Repository was showing the green connected status, but the QGIS Plugin 
> Repository was saying red disconnected.
> 
> I upgraded to QGIS 3.10.7 to try and address the issue, however I received 
> the same message. 

Hi Sarah,

There is just one plugin repository, so can you have a look and show us which 
url's you have?
You should only have: 
https://plugins.qgis.org/plugins/plugins.xml
(and QGIS will append "?qgis=3.4" for you)
If you have others, please remove those.
You can always create a new 'profile' and see if that one works.

Regards,

Richard Duivenvoorde

___
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] Displaying two or more labels(fields) in a Map

2020-08-17 Thread Richard McDonnell
Hi,
To add to this, you can also create a single string, with symbols like hyphens 
to break up the text,
For example


1.   “Attribute1”||”Attribute2”||”Attribute3” would result in 
Attribute1Attribute2Attribute3

2.   “Attribute1”||’_’||”Attribute2”||’_’|| “Attribute3” would result in 
Attribute1_Attribute2_Attribute3

3.   “Attribute1”||’ ‘||”Attribute2”||’ ‘|| “Attribute3” would result in 
Attribute1 Attribute2 Attribute3

4.   “Attribute1”||’ - ‘||”Attribute2”||’ - ‘|| “Attribute3” would result 
in Attribute1 - Attribute2 - Attribute3

Hope that helps somewhat.
Regards,

Richard


——
Richard McDonnell MSc GIS, FME Certified Professional
FRM Data Management

——
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
——
M +353 87 688 5964 T +353 1 647 6543
https://www.opw.ie

——
To send me files larger than 30MB, please use the link below 
https://filetransfer.opw.ie/filedrop/richard.mcdonn...@opw.ie

Email Disclaimer: https://www.opw.ie/en/disclaimer/
From: Qgis-user  On Behalf Of Charles 
Dixon-Paver
Sent: 16 August 2020 11:56
To: jean Lukusa 
Cc: Qgis Users List 
Subject: Re: [Qgis-user] Displaying two or more labels(fields) in a Map

If I understand what you are trying to achieve correctly, you can build the 
required labels by concatenating values in the expression builder
[image.png]

On Sun, 16 Aug 2020 at 12:44, jean Lukusa 
mailto:luku...@gmail.com>> wrote:
Hi all.
I have created two fields in my shapefile attribute table.
How Can I do to display all fields (labels) on  the Map ?
___
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] Displaying two or more labels(fields) in a Map

2020-08-17 Thread Christoph Jung
If letmegooglethat is an appropriate answer in the mailing list, than we could 
close this list. Really, letmegooglethat is the Internet way to say: „are you 
stupid? Use google instead of asking!“. I agree, that an Internet search should 
be the first way if anybody has a question. But there are many „easy and 
obvious“ questions on this mailing list (some of my questions in the past too) 
and I never read such an answer. I made the experience, that the QGIS community 
is very friendly and helpful also for unexperienced users with quite easy 
questions. What should someone new in this mailing list think about the 
community, if the first answer is just letmegooglethat. Sorry, but I do not 
think, that the GI-community should present itself in such a manner, because we 
are highly underrated compared to other information sciences and everyone, who 
will step into (FOSS-)GIS, should be welcomed. And this kind of answer is 
welcoming nobody.

>> Am 16.08.2020 um 12:56 schrieb Bernd Vogelgesang :
> 
> http://letmegooglethat.com/?q=qgis+label+multiple+fields
> 
>>> On 16.08.20 12:44, jean Lukusa wrote:
>> Hi all.
>> I have created two fields in my shapefile attribute table.
>> How Can I do to display all fields (labels) on  the Map ?
>> 
>> 
>> ___
>> 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 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] Adding layer slows down QGIS dramatically after adding a layer

2020-08-17 Thread Richard McDonnell
Hi Peter,
One further thing you could try, if not already done, is to create Spatial 
Index’s.
You can do this within QGIS under the Layer Properties, by going to the Source 
tab and selecting, Create Spatial Index.

See: 
https://medium.com/@wherelytics/understanding-spatial-indexes-in-ogc-geopackage-files-9960fdf71f82

Hope this helps

Richard.






——
Richard McDonnell MSc GIS, FME Certified Professional
FRM Data Management

——
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
——
M +353 87 688 5964 T +353 1 647 6543
https://www.opw.ie

——
To send me files larger than 30MB, please use the link below 
https://filetransfer.opw.ie/filedrop/richard.mcdonn...@opw.ie

Email Disclaimer: https://www.opw.ie/en/disclaimer/
From: Qgis-user  On Behalf Of Peter 
Cornelissen
Sent: 14 August 2020 00:19
To: rdmaili...@duif.net
Cc: qgis-user@lists.osgeo.org
Subject: Re: [Qgis-user] Adding layer slows down QGIS dramatically after adding 
a layer

Hi Richard

Thanks for the suggestion. They are plain filters and I tried indexing every 
table, but unfortunately it has made no noticeable difference.

Regards, Peter

On Thu, 13 Aug 2020 at 15:35, Richard Duivenvoorde 
mailto:rdmaili...@duif.net>> wrote:
On 8/13/20 3:57 PM, Peter Cornelissen wrote:
> Hi
>
> I am using a Geopackage with about 15 tables (a mixture of lines, polygons 
> and points), but each of these tables are
> used 40 or 50 times with filters as many of the elements are used on multiple 
> layers.
> However, I am now finding that as soon as I add a new layer QGIS slows down
> and it is taking 60 seconds or more to do almost any action that involves
> redrawing (zoom in/out/ pan etc) or even moving a layer within the layers
> panel. If I save the project, close down QGIS and restart, it is fine again
> until the next time.
>
> Any suggestions?
>
> Thanks, Peter

Looking at the attributes which are used in the filters, add 'indexes' too the 
tables in the Geopackage?

In QGIS you can do that by creating a connection to the gpkg with DataBase 
Manager and then:
 'edit table' > tab indexes, > add index

A geopackage is a sqlite database, so if you have some sql-client (DB-manager, 
DB-browser) you can fire the create index query there:
CREATE INDEX "foo_index" ON "mygeopackage" ("foo_column")

Note that these are plain indexes, no spatial ones.
IF your filters are spatial filters, then off course you need spatial indexes.

HTH

Regards,

Richard Duivenvoorde
___
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