Re: [Qgis-user] Expression to read field value from composer layout?

2021-08-03 Thread Patrick Dunford
It is just an ordinary text field on a composer layout I think. I don't 
use the atlas functionality.


On 4/08/21 10:19 am, Nyall Dawson wrote:

On Wed, 4 Aug 2021 at 06:17, Patrick Dunford  wrote:

Good day

I am wishing to create a value in a field on a composer layout that
reads the value of another field on the layout and calculates a value to
be displayed.

For example, I have an existing field called Filename on the layout and
in a python script running in the main window console, I have this code
that reads the value of the Filename field as follows:

layoutTitle = "Landscape 16:9 Header Nav Copyright Filename 2021"

project = QgsProject.instance()
projectLayoutManager = project.layoutManager()
layout = projectLayoutManager.layoutByName(layoutTitle)

fileNameLabel = layout.itemById('Filename')
fileNameText = fileNameLabel.text()


Obviously I am hoping that doing this from a field within the layout
that reads another field on the same layout will be much simpler than
the above. How exactly would I achieve that?

Just to clarify -- by "field" do you mean "a field value from the
atlas layer", or "a text label item"?

Nyall

___
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] Expression to read field value from composer layout?

2021-08-03 Thread Patrick Dunford

What's an atlas layer? I don't use the atlas functionality.


On 4/08/21 10:19 am, Nyall Dawson wrote:

On Wed, 4 Aug 2021 at 06:17, Patrick Dunford  wrote:

Good day

I am wishing to create a value in a field on a composer layout that
reads the value of another field on the layout and calculates a value to
be displayed.

For example, I have an existing field called Filename on the layout and
in a python script running in the main window console, I have this code
that reads the value of the Filename field as follows:

layoutTitle = "Landscape 16:9 Header Nav Copyright Filename 2021"

project = QgsProject.instance()
projectLayoutManager = project.layoutManager()
layout = projectLayoutManager.layoutByName(layoutTitle)

fileNameLabel = layout.itemById('Filename')
fileNameText = fileNameLabel.text()


Obviously I am hoping that doing this from a field within the layout
that reads another field on the same layout will be much simpler than
the above. How exactly would I achieve that?

Just to clarify -- by "field" do you mean "a field value from the
atlas layer", or "a text label item"?

Nyall

___
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] Single lines for road network

2021-08-03 Thread Nyall Dawson
On Sat, 31 Jul 2021 at 10:58, krishna Ayyala  wrote:
>
> Hello,
> I have a huge road network that has double lines such as below. We see such 
> roads mostly for express highways.
>
> In the same road network, there are also some streets with single lines such 
> as below.
>
>
>
> Is it possible to convert the entire road network such that we have only 
> single lines and not double lines such as above. Since the road network is 
> huge, it may not be possible to select manually each segment and run the 
> tools. Is there an automated tool that can do this for the entire network?

The "Cartography Tools" plugin has some (beta quality!) processing
tools which may help in this situation.

Nyall

>
> Regards.
> ___
> 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] Expression to read field value from composer layout?

2021-08-03 Thread Patrick Dunford

Good day

I am wishing to create a value in a field on a composer layout that 
reads the value of another field on the layout and calculates a value to 
be displayed.


For example, I have an existing field called Filename on the layout and 
in a python script running in the main window console, I have this code 
that reads the value of the Filename field as follows:


layoutTitle = "Landscape 16:9 Header Nav Copyright Filename 2021"

project = QgsProject.instance()
projectLayoutManager = project.layoutManager()
layout = projectLayoutManager.layoutByName(layoutTitle)

fileNameLabel = layout.itemById('Filename')
fileNameText = fileNameLabel.text()


Obviously I am hoping that doing this from a field within the layout 
that reads another field on the same layout will be much simpler than 
the above. How exactly would I achieve that?


Thanks in advance.

___
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] Adding Spatial Table

2021-08-03 Thread Yamen Tekaji
Hello all,

I am trying to add an Oracle spatial table to QGIS but I am getting this
error.

ORA-00932: inconsistent datatypes: expected CHAR got SDE.ST_GEOMETRY


I wonder why QGIS is expecting CHAR? it is correct that this column
contains SDE.ST_GEOMETRY values.


Any suggestions please?


Regards,

Yamen
___
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] Scalebar segments always go to 2 displayed on units change

2021-08-03 Thread Andrea Giudiceandrea

On Mon, 02 Aug 2021 16:57:01 -0700 Jeff Sonnentag wrote

Anyway, in a Layout once you have Units set and Segments set to 4 (or anything 
other than 2) and then you change the Units to something else the number of 
Segments still says 4 in that option but the displayed Scalebar only shows 2 
Segments.


Hi Jeff,
when the scalebar unit is changed, then a default size (scale bar 1/5 of 
map item width) and a default number of segments for the left and the 
right part are applied to the scale bar.


Anyway, as you have reported, the two spinboxes displaying the number of 
segments of the scalebar are not properly updated when the scalebar unit 
is changed.


So please file a bug report, so somebody (myself too) can fix it.

Regards.

Andrea Giudiceandrea
___
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] Online Course Now Open for Registration - An Introduction To Using GIS/QGIS In Biological Research, 6th - 9th September 2021

2021-08-03 Thread cdmacleod
_GIS In Ecology_ will be holding a new online training course on using 
GIS in biological research between the 6th and 9th of September 2021. It 
will be held using the Zoom video-conferencing platform, and will 
consist of four three-hour sessions. One session will need to be 
completed each day. However, you will have a choice of completing it 
between 10:00 and 13:00 British Summer Time (primarily for those living 
in Europe, Asia and Africa) or 18:00 to 21:00 British Summer Time 
(primarily for those living in North and South America). This choice of 
time slots for each session allows participants from as wide a range of 
time zones to participate in the course.


Attendance will be limited to a maximum of 24 people per session. The 
fees for this course are GBP 250 per person (with a discounted rate of 
GBP 195 for students, the unwaged and those working for registered 
charities). To book a place on it, or for more information, visit  the 
course's dedicated webpage at 
http://gisinecology.com/online-course-an-introduction-to-using-gis-qgis-in-biological-research/, 
 Alternatively, you can email i...@gisinecology.com with the subject 
line _Introductory Online GIS Course September 202_1.


This course will be taught by Dr Colin D. MacLeod, the author of _ GIS 
For Biologists: A Practical Introduction For Undergraduates_ [1] 
(Pictish Beast Publications), and will provide an introduction to using 
GIS in a wide variety of biological research situations ranging from the 
basics of making maps through to studying the spread of diseases and 
creating maps of species biodiversity. It will consist of a series of 
background sessions on using GIS mixed in with practical sessions where 
you will work directly with GIS software to complete various tasks which 
biological researchers commonly need to be able to do.


Each three-hour session will consist of a background talk covering a 
specific topic, followed by practical exercises based on instructions 
from one of our workbooks. While you are encouraged to remain online 
during the practical sessions, you can choose to go off-line as you work 
though the exercises (or if you need to take a break). However, if you 
have any questions, the course instructor will be available for you to 
ask any questions you wish at any point.


This course will primarily be based around QGIS (also known as Quantum 
GIS), which provides a user-friendly, open-source, free alternative to 
commercial GIS software packages, and it is becoming increasingly widely 
used in both academic and commercial organisations As a result, it is 
aimed at both those with no GIS experience, but wish to learn how to to 
do GIS with QGIS, and also those who are familiar with using commercial 
GIS software, such as ArcGIS, but who wish to learn how to use QGIS as 
an alternative. However, this course is taught using 
software-independent approach, and it is also open to those who wish to 
learn how to use ArcGIS to do biological GIS.


When you attend this course you will receive a free copy of _GIS For 
Biologists: A Practical Introduction for Undergraduates [1] _as the 
practical exercises in that course are based on the ones contained in 
that book.


At the end of the course, all attendees will receive a certificate of 
attendance and completion. Each certificate is embossed with the GIS In 
Ecology official stamp to prevent its fraudulent reproduction. In 
addition, each certificate has its own unique identification number that 
we will record, along with your name, meaning that we can verify the 
authenticity of the certificates we issue (and the course you have 
completed) on request.


To attend this course, you must have your own laptop computer with an 
appropriate GIS software package installed on it. Our recommended GIS 
software for this course is the freely available QGIS software. For 
those wishing to use QGIS, you will need to download and install QGIS 
2.8.3 (for those using Windows computers) or 2.8.4 (for those using 
Macs) rather than the latest version. The best way to download the 
correct version of QGIS for this course is to use the links on our GIS 
For Biologists webpage, which can be found here [2]. If you would prefer 
to use ESRI's ArcGIS software instead of GIS, this can be accommodated, 
but please let us know at the time of booking that this is the option 
you would like to use.


This course will be followed by a second, more advanced online course 
that will be held between the 13th and the 16th of September 2021 titled 
'An Introduction To Species Distribution Modelling (SDM) In The Marine 
Environment'. More information on this course can be found at 
http://gisinecology.com/online-course-an-introduction-to-species-distribution-modelling-in-the-marine-environment/.


---
==
GIS IN ECOLOGY - Providing Training, Advice And Consultancy On The Use 
Of GIS In Ecology


Web: 

Re: [Qgis-user] Scalebar segments always go to 2 displayed on units change

2021-08-03 Thread Richard Duivenvoorde
On 8/3/21 11:32 AM, Andrea Giudiceandrea wrote:
> On Mon, 02 Aug 2021 16:57:01 -0700 Jeff Sonnentag wrote
> 
>> Anyway, in a Layout once you have Units set and Segments set to 4 (or 
>> anything other than 2) and then you change the Units to something else the 
>> number of Segments still says 4 in that option but the displayed Scalebar 
>> only shows 2 Segments.
> 
> Hi Jeff,
> when the scalebar unit is changed, then a default size (scale bar 1/5 of map 
> item width) and a default number of segments for the left and the right part 
> are applied to the scale bar.
> 
> Anyway, as you have reported, the two spinboxes displaying the number of 
> segments of the scalebar are not properly updated when the scalebar unit is 
> changed.
> 
> So please file a bug report, so somebody (myself too) can fix it.

I'm trying to fix it :-)

(indeed it seems we always go back to default values (probably to not end up in 
a cascade of changes...)), but only that defaults are not reflected in the 
item. Seems an easy fix.

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] Scalebar segments always go to 2 displayed on units change

2021-08-03 Thread Stefan Giese (WhereGroup)

in QGIS 3.20.1 the behaviour is still the same.

Didn't found anything on 
https://github.com/qgis/QGIS/issues?q=is%3Aissue+is%3Aopen+label%3ABug+label%3A%22Print+Layouts%22+scalebar


so the best is to make a new issue on https://github.com/qgis/QGIS/issues

Am 03.08.2021 um 01:56 schrieb Jeff Sonnentag:


I don’t know what a person would search for in the “issues” or 
“commits” to see if this is already known or fixed, but it is an 
annoyance (nothing particularly critical).


Anyway, in a Layout once you have Units set and Segments set to 4 (or 
anything other than 2) and then you change the Units to something else 
the number of Segments still says 4 in that option but the displayed 
Scalebar only shows 2 Segments.  To get things right you just have to 
increment up or down and then back to what you want for number of 
segments and the displayed Scalebar switches to what is actually in 
the Segments option.


Does anybody know if it is already taken care of in something newer 
(using 3.16.9 here) or if it is already known/reported?



___
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


--
Mit freundlichen Grüßen
Stefan Giese
Projektleiter/Consultant

Aufbau von Geodateninfrastrukturen mit Open-Source-Software
FOSS Academy 5 Tage-Kompaktkurs „Sommerschule 2021“
Jetzt anmelden: https://foss-academy.com/kompaktkurse/
*
WhereGroup GmbH
Schwimmbadstr. 2
79100 Freiburg
Germany

Fon: +49 (0)761 / 519 102 - 61
Fax: +49 (0)761 / 519 102 - 11

stefan.gi...@wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885

___
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