[Qgis-user] Create 3D polygons

2023-05-22 Thread Grant Boxer via QGIS-User
I am trying to create a 3D polygon using XYZ coordinates, like from vertices
of a rectangular prism for example, and wondered how to create this so I can
display is in 3D using the QGIS2Threejs or the 3D map view options in QGIS.
Any suggestions? 

Grant Boxer

___
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] Issue with QgsLayerTreeNode.itemVisibilityChecked

2023-05-22 Thread David Strip via QGIS-User

  
  
On 5/22/2023 7:44 PM, Patrick Dunford
  via QGIS-User wrote:


  extentGroup = root.findGroup(extentGroupName)
  
  extentLayers = extentGroup.children()
  
  for extentLayer in extentLayers:
  
      if extentLayer.itemVisibilityChecked:
  
          print (extentLayer.name())


shouldn't that be 
 if extentLayer.itemVisibilityChecked():   
(note the addition of parens after the method name).
  

___
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] Issue with QgsLayerTreeNode.itemVisibilityChecked

2023-05-22 Thread Patrick Dunford via QGIS-User

Good day

I am using a python script running in the Qgis scripting console to read 
a list of layers in the table of contents and it is supposed to be able 
to find out which layer's visibility check box is checked or not by 
calling the method itemVisibilityChecked.


So I have a top level group in the layer tree whose name is specified in 
a constant called extentGroupName and I am using the piece of code shown 
below to evaluate which of the layers in the group have their check box 
checked or not:


extentGroup = root.findGroup(extentGroupName)

extentLayers = extentGroup.children()

for extentLayer in extentLayers:

    if extentLayer.itemVisibilityChecked:

        print (extentLayer.name())

When I run this code it always prints the name of every layer in the 
group (I can see that it has the names right so that clearly these layer 
names have come from that group) but it is clear that the state of the 
checkbox is always found to be checked as far as the script is concerned 
so it ignores whether it is actually checked or not and always returns 
True as the result of calling the method itemVisibilityChecked.


I can't see if there is anything wrong in my code and so it appears 
there is a bug in that it always returns True for the method 
itemVisibilityChecked regardless of what it is actually set to.


Qgis 3.28, Linux (both flatpak and LTS deb packages tested)

___
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 code generated during georeferencing in QGIS

2023-05-22 Thread Thayer Young via QGIS-User
 Hi Spaska,
Have you tried the Debugging/Development Tools panel? to see if you can get 
more of the information you are looking for? You also will probably want to use 
a better IDE than the Python Console, I have heard good things about the 
IPython plugin for QGIS.

If you have specific questions about PyQGIS you can post your code to this list 
with your errors and someone can respond directly to your problem. I hope this 
is helpful.
 -Thayer
PS if you are interested in the source code, a search of 'georef' on the Github 
QGIS repository gives:https://github.com/qgis/QGIS/search?q=georef

On Tuesday, May 16, 2023 at 03:00:30 PM EDT, 
 wrote:  From: Spaska Forteva 

To: qgis-user@lists.osgeo.org
Subject: [Qgis-user] python code generated during georeferencing in
    QGIS
Message-ID:
    
Content-Type: text/plain; charset=UTF-8; format=flowed

Hello,
I have a problem and I hope for an answer here. I know how to 
georeference a tif map with geopoints in QGIS. I have developed a shiny 
app and want to automate/program the georeferencing for several maps 
there (for loop). Unfortunately, I've tried a lot and can't get it 
directly under python without errors. My question, is there any way I 
can see the python code generated during georeferencing in QGIS? I can 
develop something myself in the Python console, but not the steps that I 
create with the QGIS program for georeferencing, right?
Is there a way to see the python code generated during georeferencing in 
QGIS? -GPT says yes, but nothing happens to me in the console :(
Best Regards,
Spaska Forteva
-- 
Dipl.-Inf. Spaska Forteva
Philipps-Universit?t Marburg
Fachbereich Geographie, Umweltinformatik
Deutschhausstr.12
35037 Marburg
Tel. 0049 6421 28-25954
Fax. 0049 6421 28-25670
fort...@staff.uni-marburg.de
--

  ___
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] Relationships between QGIS Server, QGIS Desktop, PostGIS

2023-05-22 Thread Steve Ediger via QGIS-User
Hello,



We  love QGIS, and have been using it for years, but from a standpoint of a 
single user developing maps that we share as PDFs, etc.  For our production 
maps, we are using PostGreSQL (without PostGIS) for data, mapping layers via 
queries to that DB in umap, a middleware project that then displays those 
layers in Open Street Maps.  It's been working pretty well for us despite some 
bugs (https://prod.chicommons.coop), but we want to introduce other views, 
write articles that point out specific analysis, etc.  Also, we want multiple 
people to have access to the data and map project(s) to produce these views and 
articles.  Here's the use case:

Use PostGreSQL/PostGIS to store the data (we're finalizing a normalized DB 
architecture that will be robust enough to capture the information on which we 
want to focus)

We have an application that allows crowd-sourcing of the data, combined with 
curation by an admin to ensure that it meets our standards and fits our 
criteria.

Use QGIS to develop layers querying the DB and views that we want to publish. 
Ideally, it must allow

Multiple users to be editing the database concurrently

Multiple users to be working on the QGIS project concurrently.

Versioning retaining authority for the master version.


Use QGIS with the leaflet plugin (and potentially other plugins, to be 
researched and implemented) to publish the views


Our question is how to set up QGIS Server, Desktop, and PostGreSQL/PostGIS to 
meet these goals.

Should we have individual workers 

use their desktop version and connect to stored projects and shape files in 
PostGreSQL/PostGIS?

Use their desktop version and connect to QGIS Server?

Use their web browser and connect to the QGIS Server?




Thanks for your pointers.



Steve Ediger



Founding Worker-Owner, ChiCommons LWCA

http://www.chicommons.coop___
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] QGIS-server: strange slowness if outside extent

2023-05-22 Thread Richard Duivenvoorde via QGIS-User

Mmm, looks to have something to do with the GPKG format.
If I create shp and use it, there is no slowness...

First thought that it has something to do with the read/write 
permissions in the mounted /etc/qgisserver volumen... but that did not 
help too


(note, trying out to run this in a kubernetes cluster)

Regards,

Richard


On 2023-05-22 15:34, Richard Duivenvoorde via QGIS-User wrote:

Having a QGIS-container servicing a very simple country file with
labels (EPSG:28992).
All is super responsive < 150ms as long as I stay within the bbox of
the country...
As soon as I zoom out further, the response time goes up to 3 -4 
seconds...


QGIS_CATCH_SEGV=1
QGIS_SERVER_LOG_LEVEL=0
there is no sign of errors in the logs...

Anybody a clue for a reason that is happening?

Regards for any input,

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

___
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] QGIS-server: strange slowness if outside extent

2023-05-22 Thread Richard Duivenvoorde via QGIS-User
Having a QGIS-container servicing a very simple country file with labels 
(EPSG:28992).
All is super responsive < 150ms as long as I stay within the bbox of the 
country...
As soon as I zoom out further, the response time goes up to 3 -4 
seconds...


QGIS_CATCH_SEGV=1
QGIS_SERVER_LOG_LEVEL=0
there is no sign of errors in the logs...

Anybody a clue for a reason that is happening?

Regards for any input,

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


[Qgis-user] QGIS Open Day 26th May 2023

2023-05-22 Thread Amy Burness via QGIS-User
Dear QGIS Users

On Friday, 26th May 2023 we will be holding our monthly QGIS Open Day! What
is a QGIS Open Day you may be wondering to yourself? It is an initiative to
replace the wonderful community meetups we used to hold every six months
when times were different. Like our in-person meetings, the event is
organised on the principle of self-organisation and community participation.

*Programme*

   - Session 1: Imaging spectroscopy data in QGIS: Challenges and
   Opportunities,YouTube Link
   ,Jitsi Link
   
   - Session 2: Publishing difficult? Not with the GeoCat Bridge
plugin! YouTube
   Link ,Jitsi Link
   

*Where to watch*

Please see the event wiki page at QOD-May-2023 Wiki
 for all the details of
times and links for participation.
Recordings

All the events are recorded and made available to users who couldn't make
the live events. Youtube live streams are automatically available for
catch-up viewing. Reviewing video links for individual events should work
without a hitch, but you can also catch up on recordings from the QGIS
Youtube channel:

   - https://www.youtube.com/@qgishome

Code of
Conduct

Participants are kindly reminded to please read and observe our QGIS Code
of Conduct and Diversity Statement to make these events a great experience
for everyone!

   - Code of Conduct
   

   - Diversity Statement
   


Please contact the Lead QOD Event Organiser, Amy by email a...@kartoza.com,
or via the Telegram Channel 
 username @Amz if you have any queries or need help setting up events.

We look forward to seeing you there!


-- 

Amy Ternent
GIS Technician
Visit http://kartoza.com to find out about open source:
* Desktop GIS programming services
* Geospatial web development
* GIS Training
* Consulting Services
Office: +27(0)71 225 0039
___
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] Click to open layer

2023-05-22 Thread Richard McDonnell via QGIS-User
Hi Grant,
My advice would be to have a shared drive, or network drive, which both 
machines access with the same path.
But...in the absence of that, you could also modify your path if you prefer...
The Filepath attribute could be shortened/modified, and you can manually set 
the start of the path. So for example..

You can set your "filepath" attribute to something like..  
someRootfolder/somesubfolders/ and your action text would be


1.   MACHINE1  
qgis.utils.iface.addRasterLayer('C:/somefilepath/[%filepath%][%filename%]','[%filename%]')

2.   MACHINE2  
qgis.utils.iface.addRasterLayer('E:/someOTHERfilepath/[%filepath%][%filename%]','[%filename%]')

As long as the attributes stay the same, as in the same Root and Subfolders, 
then the first path can be anything...
So for arguments sake...


1.   MACHINE1  
qgis.utils.iface.addRasterLayer('D:/00_DATA_VALIDATION/[%filepath%][%filename%]','[%filename%]')

2.   MACHINE2 
qgis.utils.iface.addRasterLayer('//some_network_host/localdrive/00_DATA_VALIDATION/[%filepath%][%filename%]','[%filename%]')

I hope that's helps.
Kind 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 46 942 2409
https://gov.ie/opw

--
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.gov.ie/en/organisation-information/439daf-email-disclaimer/

--
MSc GIS, FME Certified Professional

--
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 46 942 2409
https://https://gov.ie/opw

--
Email Disclaimer: 
https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/
From: box...@iinet.net.au 
Sent: 20 May 2023 00:29
To: Richard McDonnell 
Subject: RE: [Qgis-user] Click to open layer

Hi Richard,

Thanks for that. Can I use a project path that points to the project folder, 
something like  '.\' ? I use two different machines and so it would be good to 
be able to use the local address.

Cheers Grant


From: Richard McDonnell 
mailto:richard.mcdonn...@opw.ie>>
Sent: Friday, May 19, 2023 11:42 PM
To: box...@iinet.net.au
Cc: qgis-user@lists.osgeo.org
Subject: RE: [Qgis-user] Click to open layer

Hi Grant,
Do you mean insert a GeoTIFF in?
If that's the case, then you want the following Action..

Type: Python
Description: Add Raster to Canvas or whatever you want
Action Text: 
qgis.utils.iface.addRasterLayer('[%filepath%][%filename%]','[%filename%]')

For the above to work, you will need two attributes in your Polygon, a 
"filepath" and a "filename" attribute. In the fileparh is the Path to the 
folder containing the GeoTiff and the filename is the name of the file you are 
looking to load... so something like this...

[cid:image001.png@01D98C99.DC1C7E00]

This should then load any GeoTIFF into your Canvas.
Kind 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 46 942 2409
https://gov.ie/opw

--
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.gov.ie/en/organisation-information/439daf-email-disclaimer/



--
MSc GIS, FME Certified Professional

--
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 46 942 2409
https://https://gov.ie/opw

--
Email Disclaimer: 
https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/

From: QGIS-User 
mailto:qgis-user-boun...@lists.osgeo.org>> 
On Behalf Of Grant Boxer via QGIS-User
Sent: 19 May 2023 09:47
To: qgis-user@lists.osgeo.org
Subject: [Qgis-user] Click to open layer

I am sure there is a simple way to do this but I would like to click on a 
polygon and get it to open a tiff file into my map canvas. Do I use an Action 
and an "open" command?
Regards Grant Boxer

___
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 code generated during georeferencing in QGIS

2023-05-22 Thread Spaska Forteva via QGIS-User

thank you so much :-)

Spaska

Am 20.05.2023 um 16:53 schrieb Mike Flannigan:


Theoretically QGIS is open source code.  I have not proved that
myself, but that is what I hear.  If that is the case, Yes,
you can see the QGIS code used for georeferencing - if you can
find it :-)


Mike


On 5/16/23 14:00, qgis-user-requ...@lists.osgeo.org wrote:

Message: 2
Date: Tue, 16 May 2023 12:55:48 +0200
From: Spaska Forteva
To:qgis-user@lists.osgeo.org
Subject: [Qgis-user] python code generated during georeferencing in
QGIS
Message-ID:

Content-Type: text/plain; charset=UTF-8; format=flowed

Hello,

I have a problem and I hope for an answer here. I know how to
georeference a tif map with geopoints in QGIS. I have developed a shiny
app and want to automate/program the georeferencing for several maps
there (for loop). Unfortunately, I've tried a lot and can't get it
directly under python without errors. My question, is there any way I
can see the python code generated during georeferencing in QGIS? I can
develop something myself in the Python console, but not the steps that I
create with the QGIS program for georeferencing, right?
Is there a way to see the python code generated during georeferencing in
QGIS? -GPT says yes, but nothing happens to me in the console 

Best Regards,
Spaska Forteva




Viele Grüße,
Spaska Forteva

--
Dipl.-Inf. Spaska Forteva
Philipps-Universität Marburg
Fachbereich Geographie, Umweltinformatik
Deutschhausstr.12
35037 Marburg

Tel. 0049 6421 28-25954
Fax. 0049 6421 28-25670
fort...@staff.uni-marburg.de
___
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