[Qgis-user] Questions regarding the QgsProcessingAlgorithm class

2023-11-22 Thread Bo Victor Thomsen via QGIS-User

Hi list -

I have a couple of (probably dumb) questions on how to use the 
"QgsProcessingAlgorithm" class.


 * A have a lot parameter inputs placed in the "advanced" section af
   the processing input dialog. It's parameters that seldom has to be
   changed.
   How do I present the "Avanced" section /not/ unfolded? The default
   is to unfold this section and thus possibly confuse users by showing
   a lot of seldom changed parameters.

 * One of my input parameters is a "QgsProcessingParameterString"
   parameter that will contain a password.
   How can I obfuscate the parameter input, i.e showing '***'
   instead of the password ?

--
Med venlig hilsen / Best regards

Bo Victor Thomsen
___
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] Flatgeobuf in google drive ?

2023-10-06 Thread Bo Victor Thomsen via QGIS-User

Thanks for all the answers.

I made a Google cloud bucket and uploaded my files to that. It is 
(surprisingly) stable and fast ! The only downside is that it takes a 
long time the first time you open the layer, because QGIS will read the 
entire layer to ascertain the number of objects. When you have a layer 
with ca. 6.000.000 objects it takes a looong time. But opening the 
project after that is snappy.


Med venlig hilsen / Best regards

Bo Victor Thomsen

On 06-10-2023 09:33, Ujaval Gandhi via QGIS-User wrote:
Google Drive doesn't allow static file hosting (it used to, but 
stopped around 2015). So you cannot use it to get a file URL that can 
be directly used to get the file contents. You'll need to host the 
file on a static file server or a cloud bucket (Google Cloud Storage 
or AWS s3)


---
Ujaval Gandhi
Spatial Thoughts
www.spatialthoughts.com 





On Fri, Oct 6, 2023 at 11:56 AM Adam Nielsen via QGIS-User 
 wrote:


> However, I would like to use Google Drive as a data repository
instead
> of the website,  so I uploaded the same file to (my) Google
Drive in the
> "Shared Data" directory and made it public viewable using a https
> address similar to this:
>
> *https://drive.google.com/file/d/180sZv..
.. a lot of letters and
> numbersUe/view?usp=sharing*
>
> The question: Is there any method so QGIS can access to the .fgb
file
> located in Google Drive using the information in the above https
address ?

I'm no expert on Google Drive but it looks like you're using the URL
for the friendly "view this file" page, rather than the URL that
contains the raw file content itself.

You'll probably have to try to download the file and grab the download
URL it gives you there and use that instead.

Cheers,
Adam.
___
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


[Qgis-user] Flatgeobuf in google drive ?

2023-10-04 Thread Bo Victor Thomsen via QGIS-User

Hi list -

I'm experimenting using the flatgeobuf file format with files placed on 
the web.


My current test setup is a simple web site located at one.com. I 
uploaded the .fgb file to the site and let QGIS access it using the data 
manager:


That worked as a charm !

However, I would like to use Google Drive as a data repository instead 
of the website,  so I uploaded the same file to (my) Google Drive in the 
"Shared Data" directory and made it public viewable using a https 
address similar to this:


*https://drive.google.com/file/d/180sZv a lot of letters and 
numbersUe/view?usp=sharing*


The question: Is there any method so QGIS can access to the .fgb file 
located in Google Drive using the information in the above https address ?


--
Med venlig hilsen / Best regards

Bo Victor Thomsen
___
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] Technical specifications

2023-06-02 Thread Bo Victor Thomsen via QGIS-User
And one other point (outside the scope of QGIS workstation 
specifications ) -


Use a database server to store you primary spatial (and other) data. 
Preferably PostgreSQL/ PostGIS. It will enable the department to use and 
share data at the highest level.


Med venlig hilsen / Best regards

Bo Victor Thomsen

Den 01-06-2023 kl. 23:17 skrev Sébastien LAGARDE via QGIS-User:


Hello Mamady,

Question way to broad to be answered simply as it would depend on :

The tasks to be performed by the operator

Your Information system (network, storage of GIS data …)

And many other things …

Here are a few things I have in mind :

*_GIS operator Workstation (standard use)_*

  * Intel i5 or higher (12^th gen) or AMD equivalent
  * 16 Gb RAM
  * 512 Gb HD but only SSD or even better PCI / NVME drives
  * Small dedicated graphic card (any entry level card with 2-4 Gb of
dedicated memory)
  * 1 Gb network

*_GIS analyst Workstation (double up) :_*

  * Intel i7or higher (12^th gen) or AMD equivalent
  * 32Gb RAM
  * 1 Tb HD but only SSD or even better PCI / NVME drives
  * dedicated graphic card (4 Gb of dedicated memory)
  * 1 Gb network

And don’t forget to include in your quotations good interfaces 
(screens = min of 2*24 “, good keyboard and High DPI mouse), we tend 
to neglect them and use what comes was standard with orders but good 
large screens and a comfortable mouse does change your long term 
experience !!


With that kind of spec, you should be able to achieve a lot but once 
again it will depend on what type of task you’re looking at and also 
your GIS set up (for instance no need for extra-large local drives if 
you have DB servers and a good network).


Once again there is no one for all answer here .

Regards

*Sébastien LAGARDE*

Portable : (687) 76 82 24

Agissons au quotidien pour préserver notre environnement. N’imprimez 
ce courrier et les documents joints que si nécessaire


*De :* QGIS-User  *De la part de* 
KEITA Mamady kobélé via QGIS-User

*Envoyé :* jeudi 1 juin 2023 21:34
*À :* qgis-user@lists.osgeo.org
*Objet :* [Qgis-user] Technical specifications

Dear All,

We are supporting the development of a GIS department within an  
Environment Ministry.


Can you any help sharing some specifications for desktop computers and 
laptops?


Many thanks,

Mamady


/---/

*/Mamady Kobélé Keita/*



THINK ENVIRONMENT BEFORE PRINTING THIS EMAIL

*"We should leave this Planet a little bit better than we found it"*


___
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] Couldn't load plugin XY due to an error when calling its classFactory() method

2023-03-23 Thread Bo Victor Thomsen via QGIS-User

For example - using google search: https://issues.qgis.org/issues/21464

Med venlig hilsen / Best regards

Bo Victor Thomsen

Den 23-03-2023 kl. 15:24 skrev Johannes Kröger (WhereGroup):


Does it really happen all the time for you? It took me quite a while 
to reproduce.


Is there an existing issue already? I'll make one otherwise.

Remember: Bugs cannot be fixed if you keep the knowledge of their 
existence to yourself ;)


Cheers, Hannes

Am 23.03.23 um 15:09 schrieb Bo Victor Thomsen via QGIS-User:


That's an old error. And I really don't know why it hasn't been 
fixed. But to circumvent it:


  * Activate the "Override System Locale" checkbox in Menu:
"Settings" --> "Options" --> top of section "General"
  * Choose the right values in the now visible comboboxes: "User
Interface translation" and "Locale" (Just beneath the checkbox)
  * Save the new choices and restart QGIS

Dear QGIS developers: Please fix this problem ASAP. I (and about 
every other user in Denmark) have had this problem for ages. Being a 
non-english QGIS user is probably the cause of it.


Med venlig hilsen / Best regards

Bo Victor Thomsen
Den 23-03-2023 kl. 14:14 skrev Johannes Kröger (WhereGroup) via 
QGIS-User:


(@gary: I'm not sure but I think this comes from the plugin 
builder, is that possible?)


Yes, 
https://github.com/g-sherman/Qgis-Plugin-Builder/blob/e51befa0ab980a57311c6f33d8d026d02da21cc3/plugin_templates/toolbutton_with_dockwidget/template/module_name.tmpl#L53


Funnily enough I ran into this issue just today too, with no special 
setup but a clean new profile I created yesterday and had been using 
in a training since. Not sure what could have caused the key to get 
removed. I had switched between system locale, English and back 
once. The first plugin I installed crashed with this.


Cheers, Hannes


___
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

--
Johannes Kröger / GIS-Entwickler/-Berater

-
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei derwww.foss-academy.com
-

WhereGroup GmbH
c/o KK03 GmbH
Lange Reihe 29
20099 Hamburg
Germany

Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11

johannes.kroe...@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


Re: [Qgis-user] Couldn't load plugin XY due to an error when calling its classFactory() method

2023-03-23 Thread Bo Victor Thomsen via QGIS-User
I can't honestly answer that question. It's almost automatic (Like a 
Pavlov's dog) for me nowadays to manually set the locale for QGIS on 
every computer I'm using. So I normally don't experience the problem any 
more.


And I don't use the plugin builder anymore to generate the skeleton of a 
new plugin.


Med venlig hilsen / Best regards

Bo Victor Thomsen

Den 23-03-2023 kl. 15:24 skrev Johannes Kröger (WhereGroup):


Does it really happen all the time for you? It took me quite a while 
to reproduce.


Is there an existing issue already? I'll make one otherwise.

Remember: Bugs cannot be fixed if you keep the knowledge of their 
existence to yourself ;)


Cheers, Hannes

Am 23.03.23 um 15:09 schrieb Bo Victor Thomsen via QGIS-User:


That's an old error. And I really don't know why it hasn't been 
fixed. But to circumvent it:


  * Activate the "Override System Locale" checkbox in Menu:
"Settings" --> "Options" --> top of section "General"
  * Choose the right values in the now visible comboboxes: "User
Interface translation" and "Locale" (Just beneath the checkbox)
  * Save the new choices and restart QGIS

Dear QGIS developers: Please fix this problem ASAP. I (and about 
every other user in Denmark) have had this problem for ages. Being a 
non-english QGIS user is probably the cause of it.


Med venlig hilsen / Best regards

Bo Victor Thomsen
Den 23-03-2023 kl. 14:14 skrev Johannes Kröger (WhereGroup) via 
QGIS-User:


(@gary: I'm not sure but I think this comes from the plugin 
builder, is that possible?)


Yes, 
https://github.com/g-sherman/Qgis-Plugin-Builder/blob/e51befa0ab980a57311c6f33d8d026d02da21cc3/plugin_templates/toolbutton_with_dockwidget/template/module_name.tmpl#L53


Funnily enough I ran into this issue just today too, with no special 
setup but a clean new profile I created yesterday and had been using 
in a training since. Not sure what could have caused the key to get 
removed. I had switched between system locale, English and back 
once. The first plugin I installed crashed with this.


Cheers, Hannes


___
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

--
Johannes Kröger / GIS-Entwickler/-Berater

-
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei derwww.foss-academy.com
-

WhereGroup GmbH
c/o KK03 GmbH
Lange Reihe 29
20099 Hamburg
Germany

Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11

johannes.kroe...@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


Re: [Qgis-user] Couldn't load plugin XY due to an error when calling its classFactory() method

2023-03-23 Thread Bo Victor Thomsen via QGIS-User
Urgh.. There's a sh*tload of existing plugins, based on the plugin 
builder,  having this problem (Including some of my own)



Med venlig hilsen / Best rega ards

Bo Victor Thomsen

Den 23-03-2023 kl. 15:10 skrev Richard Duivenvoorde via QGIS-User:

On 3/23/23 14:00, Bruno Streit wrote:
Thank you, that works perfectly! I've set the userLocal with 
QSettings().setValue('locale/userLocale', 'en_US'). Now the plugins 
work.


But how do I happen to miss this setting (on more than one computer)? 
In Options - General, I override the System Local, use 'American 
English' as User Interface and 'German Switzerland (de_CH)' al locale 
for numbers, date and currency formats. Is it because of this 
settings, that I need to set locale/userLocale via python console? 
Would it be wort filling a bug report for the missing setting?


No, the locale on your computer is not connected to the locale in 
QGIS' QSettings.

There is a QSettings set in every QGIS profile.

If nothing has SET it yet, it is not there. Software should check IF 
it is set, OR give a default.


Regards,

Richard

___
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] Couldn't load plugin XY due to an error when calling its classFactory() method

2023-03-23 Thread Bo Victor Thomsen via QGIS-User
That's an old error. And I really don't know why it hasn't been fixed. 
But to circumvent it:


 * Activate the "Override System Locale" checkbox in Menu: "Settings"
   --> "Options" --> top of section "General"
 * Choose the right values in the now visible comboboxes: "User
   Interface translation" and "Locale" (Just beneath the checkbox)
 * Save the new choices and restart QGIS

Dear QGIS developers: Please fix this problem ASAP. I (and about every 
other user in Denmark) have had this problem for ages. Being a 
non-english QGIS user is probably the cause of it.


Med venlig hilsen / Best regards

Bo Victor Thomsen

Den 23-03-2023 kl. 14:14 skrev Johannes Kröger (WhereGroup) via QGIS-User:


(@gary: I'm not sure but I think this comes from the plugin builder, 
is that possible?)


Yes, 
https://github.com/g-sherman/Qgis-Plugin-Builder/blob/e51befa0ab980a57311c6f33d8d026d02da21cc3/plugin_templates/toolbutton_with_dockwidget/template/module_name.tmpl#L53


Funnily enough I ran into this issue just today too, with no special 
setup but a clean new profile I created yesterday and had been using 
in a training since. Not sure what could have caused the key to get 
removed. I had switched between system locale, English and back once. 
The first plugin I installed crashed with this.


Cheers, Hannes


___
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] Problems with transformation including height values

2023-03-21 Thread Bo Victor Thomsen via QGIS-User

Hi list -

Thanks to all for the prompt (and correct) responses.

Using ogr2ogr (and some fiddling with the csv file including a header 
row..) :


ogr2ogr -dim XYZ -oo X_POSSIBLE_NAMES=x -oo Y_POSSIBLE_NAMES=y -oo 
Z_POSSIBLE_NAMES=z -s_srs EPSG:4979 -t_srs EPSG:7416 -f GeoJSON 
d:\temp\data_7416.json d:\temp\data_4979.csv


did the trick.

And just for the fun of it: I tried changing the input projection to 
EPSG:4326:


ogr2ogr -dim XYZ -oo X_POSSIBLE_NAMES=x -oo Y_POSSIBLE_NAMES=y -oo 
Z_POSSIBLE_NAMES=z -s_srs *EPSG:4326* -t_srs EPSG:7416 -f GeoJSON 
d:\temp\data_7416.json d:\temp\data_4979.csv


And that didn't work. So "they" were serious about EPSG:4326 not 
handling z coordinates


Med venlig hilsen / Best regards

Bo Victor Thomsen

Den 21-03-2023 kl. 11:41 skrev Nyall Dawson:



On Tue, 21 Mar 2023, 8:21 pm Richard McDonnell, 
 wrote:


Hi,

Just to add to what Nyall said.

See link below, which suggests a way using OGR to carry out the
process you require.


https://gis.stackexchange.com/questions/324848/transform-datum-csv-csv-using-ogr2ogr

It suggests you preform your horizontal transformation first, this
can be done in QGIS, then carry out the Vertical Transformation.
This can be done in command line, if you are on windows, the best
option is to use the *OSGeo4w Shell*, as all the needed
environmental settings are applied.

I hope the above helps.

Maybe there is an opportunity to have QGIS preform Vertical
translations, even if these are a separate step? It’s something
that would be useful for both Raster and Vector Data.


It's definitely on the radar -- especially for transformation of point 
clouds. It's just a very involved task with a high degree of 
complexity, and will need funding to happen.


Nyall

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 <https://www.opw.ie>

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

*From:*QGIS-User  *On Behalf Of
*Nyall Dawson via QGIS-User
*Sent:* 21 March 2023 10:14
*To:* Bo Victor Thomsen 
*Cc:* qgis-user 
*Subject:* Re: [Qgis-user] Problems with transformation including
height values

On Tue, 21 Mar 2023, 8:06 pm Bo Victor Thomsen via QGIS-User,
 wrote:

Hi list -

I have a problem with transforming a csv file containing x,y
/and /z values from EPSG:4326 to EPSG:7416, i.e I want to
transform the height value from LongLat/ WGS84 ellipsoid
height to UTM32/Etrs89 with vertical reference DVR90.

The file look like this:

*== data.csv, EPSG:4326 id: col1, x: col3, y: col2, z: col4 ==
*a;55.0;12.0;42.0
b;55.05;12.0;43.0
c;55.10;12.0;44.0
d;55.15;12.0;45.0
e;55.20;12.0;46.0
*===*

*Step 1*: I import the file into QGIS using the Data Source
Manager --> "Delimited Text" and define the projection to be
EPSG:4326 /and/ to include z values. This works and the points
are shown on my map where I expect them to be (Somewhere in
the middle of Zealand, Denmark)

*Step 2*: I export the layer as a geojson file using "Export"
--> "Save features as.." from the layer manager and choose
EPSG:7416 (UTM32/ETRS89 with DVR90 as vertical reference. And
to include z-values

The resulting file looks like this:

*== data.geojson, EPSG:7416 ==
*{
"type": "FeatureCollection",
"name": "data",
"crs": { "type": "name", "properties": { "name":
"urn:ogc:def:crs:EPSG::4979" } },
"features": [
{ "type": "Feature", "properties": { "field_1": "a",
"field_2": 55.0, "field_3": 12.0, "field_4": 42.0 },
"geometry&

[Qgis-user] Problems with transformation including height values

2023-03-21 Thread Bo Victor Thomsen via QGIS-User

Hi list -

I have a problem with transforming a csv file containing x,y /and /z 
values from EPSG:4326 to EPSG:7416, i.e I want to transform the height 
value from LongLat/ WGS84 ellipsoid height to UTM32/Etrs89 with vertical 
reference DVR90.


The file look like this:

*== data.csv, EPSG:4326 id: col1, x: col3, y: col2, z: col4 ==**
*a;55.0;12.0;42.0
b;55.05;12.0;43.0
c;55.10;12.0;44.0
d;55.15;12.0;45.0
e;55.20;12.0;46.0
*===*

*Step 1*: I import the file into QGIS using the Data Source Manager --> 
"Delimited Text" and define the projection to be EPSG:4326 /and/ to 
include z values. This works and the points are shown on my map where I 
expect them to be (Somewhere in the middle of Zealand, Denmark)


*Step 2*: I export the layer as a geojson file using "Export" --> "Save 
features as.." from the layer manager and choose EPSG:7416 (UTM32/ETRS89 
with DVR90 as vertical reference. And to include z-values


The resulting file looks like this:

*== data.geojson, EPSG:7416 ==**
*{
"type": "FeatureCollection",
"name": "data",
"crs": { "type": "name", "properties": { "name": 
"urn:ogc:def:crs:EPSG::4979" } },

"features": [
{ "type": "Feature", "properties": { "field_1": "a", "field_2": 55.0, 
"field_3": 12.0, "field_4": 42.0 }, "geometry": { "type": "Point", 
"coordinates": [ 12.0, 55.0, 42.0 ] } },
{ "type": "Feature", "properties": { "field_1": "b", "field_2": 55.05, 
"field_3": 12.0, "field_4": 43.0 }, "geometry": { "type": "Point", 
"coordinates": [ 12.0, 55.05, 43.0 ] } },
{ "type": "Feature", "properties": { "field_1": "c", "field_2": 55.1, 
"field_3": 12.0, "field_4": 44.0 }, "geometry": { "type": "Point", 
"coordinates": [ 12.0, 55.1, 44.0 ] } },
{ "type": "Feature", "properties": { "field_1": "d", "field_2": 55.15, 
"field_3": 12.0, "field_4": 45.0 }, "geometry": { "type": "Point", 
"coordinates": [ 12.0, 55.15, 45.0 ] } },
{ "type": "Feature", "properties": { "field_1": "e", "field_2": 55.2, 
"field_3": 12.0, "field_4": 46.0 }, "geometry": { "type": "Point", 
"coordinates": [ 12.0, 55.2, 46.0 ] } }

]
}
*===*

The new file is shown in my map exactly on top of the original point 
layer, meaning the horizontal projection is accurate. However, my z 
coordinates are not reprojected to the new vertical reference. All the 
z-values are exactly the same as the values in the .csv - file.


After some digging through Google and other places, I discover that 
EPSG:4326 /doesn't/ have a z component. Surprise ! You have to use 
EPSG:4979, which is the same as EPSG:4326 with ellipsoid height.


But, /after /repeating *step 1*, /but/ using EPSG:4979 as CRS during 
import, and subsequently repeating *step 2*, I get the exact same 
result: No transformation of height values.


So, what is not working ? Am I doing something wrong ?? Or is QGIS 
incapable of transforming z values ???



--
Med venlig hilsen / Best regards

Bo Victor Thomsen
___
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] Fwd: Transformation of vertical datum for points

2023-03-16 Thread Bo Victor Thomsen via QGIS-User

"The data is in EPSG:32825 (UTM32N/ETRS89)"..

This is of course : EPSG:25832 (UTM32N/ETRS89)" ...



 Videresendt meddelelse 
Emne:   Transformation of vertical datum for points
Dato:   Thu, 16 Mar 2023 13:02:39 +0100
Fra:Bo Victor Thomsen 
Til:qgis-user@lists.osgeo.org



Hi list -

I have a question regarding transformation of ellisoid heights to geoid 
heights..


I have a dataset consisting of points, where the z coordinate is a 
attribute column for the layer. (If necessary, this can be changed to a 
3 dimensional layer type - or the x, y values can be placed i 2 
attribute columns - whatever)


The data is in EPSG:32825 (UTM32N/ETRS89) and the present height values 
are ellisoid height values for this CRS.


I would like to transform the height values the the corresponding DVR90 
( EPSG:5799) geoid height values


Can this be done in QGIS using some kind of expression function. Or 
using ogr2ogr ? or Postgis ??


--
Med venlig hilsen / Best regards

Bo Victor Thomsen
___
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] Fwd: [EXTERNAL] Re: Geopackage slow on NAS if not read-only

2023-03-16 Thread Bo Victor Thomsen via QGIS-User
Darn ! I missed one of the postings about you setting the file in 
read-only on the NAS. So this is an already known work-around. Sorry 
about the noise.




 Videresendt meddelelse 
Emne: 	Re: [Qgis-user] [EXTERNAL] Re: Geopackage slow on NAS if not 
read-only

Dato:   Thu, 16 Mar 2023 14:35:16 +0100
Fra:Bo Victor Thomsen 
Til:qgis-user@lists.osgeo.org



When any user on your network access the geopackage layer and (maybe 
unnecessarily) puts the layer in edit mode, there will be created 2 
extra files in the same directory as the gpkg file resides in. And QGIS 
behaves different regarding /both/ read and write operations when these 
file are present. This is probably the explanation of the longer reading 
times, even if nobody actually is editing the layer. When the user stops 
the editing mode for the layer, the 2 files disappear.


You can check if this is the explanation:

1. Open the gpkg layer in read mode on one computer, check the access
   speed of the same layer on /another/ computer.
2. Set the layer in edit mode on the first computer, check the access
   speed to the layer on the second computer
3. Revert the edit mode on the first computer, check the access speed
   to the layer on the second computer.

I am guessing, that situations 1 and 3 are fast, while situation 2 is slow.

First of all: Never, ever try to implement some kind of multi-user 
editing on a file based format, where the file resides on a networked 
drive. It will never, ever work reliably. At some point 2 users will try 
to edit the same layer at the same time and it will go kaboom (I can 
read from your mails that you are aware about this). This goes for - 
probably - every file based format on a network drive.


Secondly: What about making the gpkg file read-only at the network share 
level for most of the users. And only granting write access to the gpkg 
file for certain users that are instructed in /not/ setting the layer in 
edit mode unless it's strictly necessary ?


The best solution: Install Postgres/PostGIS on your NAS

Med venlig hilsen / Best regards

Bo Victor Thomsen

Den 16-03-2023 kl. 13:49 skrev Árni Geirsson via QGIS-User:

Thank you for the various responses.
Let me be clear that what I am griping about is not the locking aspect 
that would allow multiple users to edit without conflict. I fully 
understand that the geopackage is not safe for that, nor is the 
shapefile and perhaps also the file geodatabase. In my case, the 
likelihood of two people wanting to edit the same geopackage is 
negligible, so I take my chances. My only gripe is the rendering speed 
of larger geopackages on a shared network, if they are not set 
specifically to read-only. That is not a problem with the shapefile 
and I think probably not with a file geodatabase. I am a long time 
user of geopackages in a networked environment and I will continue to 
use them - they are great - there is just this problem of rendering 
speed over a network.


Árni


On Thu, 16 Mar 2023 at 12:33, Sebastian Gutwein  wrote:

This is all beyond my expertise but I have also struggled with the
effective use of gpkg’s. In my case over google drive.
Here is what SQLite (the underlying software for gpkgs) says about
using a SQLite database on a network:
https://www.sqlite.org/useovernet.html

I hope that someday someone implements a system that allows this
to work efficiently as gpkgs are better in many respects than
shapefiles. Perhaps Geodiff could be part of that solution.
https://github.com/MerginMaps/geodiff

On Thu, Mar 16, 2023 at 8:04 AM Árni Geirsson via QGIS-User
 wrote:

Hi Jorge
I understand what you are pointing at and I use databases such
as Postgres/PostGIS also with good results. The thing is that
working with data in files sometimes has advantages and that
is certainly how shapefiles have been used. The geopackage has
been suggested as a replacement for the shapefile in the
context of regular QGIS usage without any caveat saying that
geopackages only replace the storage and transfer role of
shapefiles and that geopackages should not be used for
editing in a shared environment, as is perfectly possible with
shapefiles and widely practiced. Not all users have access to
database systems such as Postgres. I'm just looking for some
clarity on best practices for the common scenario of working
with QGIS using file based data in a network environment.

Árni


On Thu, 16 Mar 2023 at 11:47, Jorge Gustavo Rocha via
QGIS-User  wrote:

Hi,

For data storage and manipulation databases are suitable.
Files are not.

Geopackages are wonderful to transfer data between systems
or to archive an entire project (snapshot of data, styles
and the project itself).

Regards,

   

Re: [Qgis-user] [EXTERNAL] Re: Geopackage slow on NAS if not read-only

2023-03-16 Thread Bo Victor Thomsen via QGIS-User
When any user on your network access the geopackage layer and (maybe 
unnecessarily) puts the layer in edit mode, there will be created 2 
extra files in the same directory as the gpkg file resides in. And QGIS 
behaves different regarding /both/ read and write operations when these 
file are present. This is probably the explanation of the longer reading 
times, even if nobody actually is editing the layer. When the user stops 
the editing mode for the layer, the 2 files disappear.


You can check if this is the explanation:

1. Open the gpkg layer in read mode on one computer, check the access
   speed of the same layer on /another/ computer.
2. Set the layer in edit mode on the first computer, check the access
   speed to the layer on the second computer
3. Revert the edit mode on the first computer, check the access speed
   to the layer on the second computer.

I am guessing, that situations 1 and 3 are fast, while situation 2 is slow.

First of all: Never, ever try to implement some kind of multi-user 
editing on a file based format, where the file resides on a networked 
drive. It will never, ever work reliably. At some point 2 users will try 
to edit the same layer at the same time and it will go kaboom (I can 
read from your mails that you are aware about this). This goes for - 
probably - every file based format on a network drive.


Secondly: What about making the gpkg file read-only at the network share 
level for most of the users. And only granting write access to the gpkg 
file for certain users that are instructed in /not/ setting the layer in 
edit mode unless it's strictly necessary ?


The best solution: Install Postgres/PostGIS on your NAS

Med venlig hilsen / Best regards

Bo Victor Thomsen

Den 16-03-2023 kl. 13:49 skrev Árni Geirsson via QGIS-User:

Thank you for the various responses.
Let me be clear that what I am griping about is not the locking aspect 
that would allow multiple users to edit without conflict. I fully 
understand that the geopackage is not safe for that, nor is the 
shapefile and perhaps also the file geodatabase. In my case, the 
likelihood of two people wanting to edit the same geopackage is 
negligible, so I take my chances. My only gripe is the rendering speed 
of larger geopackages on a shared network, if they are not set 
specifically to read-only. That is not a problem with the shapefile 
and I think probably not with a file geodatabase. I am a long time 
user of geopackages in a networked environment and I will continue to 
use them - they are great - there is just this problem of rendering 
speed over a network.


Árni


On Thu, 16 Mar 2023 at 12:33, Sebastian Gutwein  wrote:

This is all beyond my expertise but I have also struggled with the
effective use of gpkg’s. In my case over google drive.
Here is what SQLite (the underlying software for gpkgs) says about
using a SQLite database on a network:
https://www.sqlite.org/useovernet.html

I hope that someday someone implements a system that allows this
to work efficiently as gpkgs are better in many respects than
shapefiles. Perhaps Geodiff could be part of that solution.
https://github.com/MerginMaps/geodiff

On Thu, Mar 16, 2023 at 8:04 AM Árni Geirsson via QGIS-User
 wrote:

Hi Jorge
I understand what you are pointing at and I use databases such
as Postgres/PostGIS also with good results. The thing is that
working with data in files sometimes has advantages and that
is certainly how shapefiles have been used. The geopackage has
been suggested as a replacement for the shapefile in the
context of regular QGIS usage without any caveat saying that
geopackages only replace the storage and transfer role of
shapefiles and that geopackages should not be used for
editing in a shared environment, as is perfectly possible with
shapefiles and widely practiced. Not all users have access to
database systems such as Postgres. I'm just looking for some
clarity on best practices for the common scenario of working
with QGIS using file based data in a network environment.

Árni


On Thu, 16 Mar 2023 at 11:47, Jorge Gustavo Rocha via
QGIS-User  wrote:

Hi,

For data storage and manipulation databases are suitable.
Files are not.

Geopackages are wonderful to transfer data between systems
or to archive an entire project (snapshot of data, styles
and the project itself).

Regards,

Jorge

On 16/03/23 11:30, Árni Geirsson via QGIS-User wrote:

Thank you Jarosław. Isn't it strange that this was
discussed 5 years ago and SMB file sharing is very
common? Would a linux based NAS be able to use another
protocol? What are my options for file based data sharing
in QGIS? Abandoning 

[Qgis-user] Transformation of vertical datum for points

2023-03-16 Thread Bo Victor Thomsen via QGIS-User

Hi list -

I have a question regarding transformation of ellisoid heights to geoid 
heights..


I have a dataset consisting of points, where the z coordinate is a 
attribute column for the layer. (If necessary, this can be changed to a 
3 dimensional layer type - or the x, y values can be placed i 2 
attribute columns - whatever)


The data is in EPSG:32825 (UTM32N/ETRS89) and the present height values 
are ellisoid height values for this CRS.


I would like to transform the height values the the corresponding DVR90 
( EPSG:5799) geoid height values


Can this be done in QGIS using some kind of expression function. Or 
using ogr2ogr ? or Postgis ??


--
Med venlig hilsen / Best regards

Bo Victor Thomsen

___
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] SQL language in DB Manager

2023-03-01 Thread Bo Victor Thomsen via QGIS-User

You forgot the last part of the chapter (emphasis is mine..)


The whole chapter From the manual..






 14.2.5.2. Supported query language
 


The underlying engine uses SQLite and SpatiaLite to operate.

It means you can use all of the SQL your local installation of SQLite 
understands.


Functions from SQLite and spatial functions from SpatiaLite can also be 
used in a virtual layer query. For instance, creating a point layer out 
of an attribute-only layer can be done with a query similar to:


SELECTid,MakePoint(x,y,4326)asgeometry
FROMcoordinates

/*Functions of QGIS expressions 
*//*can 
also be used in a virtual layer query.   <-- You forgot this part

*/

//

To refer the geometry column of a layer, use the name |geometry|.

Contrary to a pure SQL query, all the fields of a virtual layer query 
must be named. Don’t forget to use the |as| keyword to name your columns 
if they are the result of a computation or a function call.







 



Med venlig hilsen / Best regards

Bo Victor Thomsen

Den 28-02-2023 kl. 17:37 skrev Antonio Valanzano via QGIS-User:
Does someone know which dialect of SQL QGIS uses when working with 
virtual layers ?


I have got a shapefile named "subway" and when i run the following 
query using the DB Manager


SELECT s.gid, s.geometry
FROM subway s
WHERE (strpos(s.routes, 'Q') <> 0);

it produces a result that I can add to the map canvas as a virtual layer.

Such result is in contrast with the QGIS documentation for version 3.22





14.2.5. Creating virtual layers



The SQL query will be executed, regardless of the underlying provider 
of the |airports| layer, even if this provider does not directly 
support SQL queries.



  14.2.5.2. Supported query language
  


The underlying engine uses SQLite and SpatiaLite to operate.

It means you can use all of the SQL your local installation of SQLite 
understands.


--


However  the query I have used contains a function "strpos" which is 
not part of the SQL language as understood by SQLite.


If I run the same query on a layer which is part of a Spatialite 
database the DB Manager produces the error "no such function: strpos".


If I run the same query on a layer which is part of a PostGIS database 
the DB Manager produces the same result of the virtual layer created 
from the shapefile.



So the question is "which dialect does QGIS use for running the query"?

Does it depend on the type of layer on which the query is applied ?

Is there a default SQL, which is used in case of a provider that does 
not directly support SQL queries (such as shapefiles)?



Any info would help.

Antonio Valanzano







___
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] QGIS_process not mutli-threaded? or option?

2022-10-24 Thread Bo Victor Thomsen via Qgis-user

"A picture is worth a thousands words"...

I don't have any tips on using more cores from QGIS.

However, My own hack:

 * Install a Postgres/PostGIS database system local on the same
   computer as QGIS.
 * Setup Postgres to use as many cores as you wish. Newer version of
   Postgres is *much better* at multiprocessing.
 * Upload necessary data to the database.
 * Redesign the data processing workflow as table-creating queries in
   Postgres.
 * Use QGIS as a visualisation tool for Postgres data results.

I know, it's not the solution for everybody or any data processing 
situation, but it works at lot of the time for me.



Med venlig hilsen / Best regards

Bo Victor Thomsen

Den 21-10-2022 kl. 21:43 skrev Dennis Burgess via Qgis-user:


44 cores with hyperthreading, looks like 1 is used ☹

*LTI-Full_175px*

*Dennis Burgess, Mikrotik Certified Trainer
MTCNA, MTCRE, MTCWE, MTCTCE, MTCINE, MTCSE, HE IPv6 Sage, Cambium ePMP 
Certified *


Author of "Learn RouterOS- Second Edition”

*Link Technologies, Inc*-- Mikrotik & WISP Support Services

*Office*: 314-735-0270 Website: http://www.linktechs.net 



Need to Automate MikroTik Backups: https://cloud.linktechs.net

Create Wireless Coverage’s with www.towercoverage.com 



*From:* Qgis-user  *On Behalf Of 
*Dennis Burgess via Qgis-user

*Sent:* Friday, October 21, 2022 2:42 PM
*To:* qgis-user@lists.osgeo.org
*Subject:* [Qgis-user] QGIS_process not mutli-threaded? or option?

Looks like QGIS_process is not multi-threaded ☹  At least what I am 
seeing in one core taken up? Any method to speed this thing up?


*LTI-Full_175px*

*Dennis Burgess, Mikrotik Certified Trainer
MTCNA, MTCRE, MTCWE, MTCTCE, MTCINE, MTCSE, HE IPv6 Sage, Cambium ePMP 
Certified *


Author of "Learn RouterOS- Second Edition”

*Link Technologies, Inc*-- Mikrotik & WISP Support Services

*Office*: 314-735-0270 Website: http://www.linktechs.net 



Need to Automate MikroTik Backups: https://cloud.linktechs.net

Create Wireless Coverage’s with www.towercoverage.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___
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] ogr2ogr doesn't connect to MS SQL Server

2022-10-20 Thread Bo Victor Thomsen via Qgis-user

Hi Michael -

1) You can get a complete windows GDAL/OGR setup from 
https://www.gisinternals.com/


2) Have you read this article : 
https://alastaira.wordpress.com/ogr2ogr-patterns-for-sql-server/


Especially the chapter about exporting data from SQL-Server.

An example:

|ogr2ogr|
|-f ||"KML"|
|"C:\temp\precincts.kml"|
|"MSSQL:server=localhost\denali;database=tempdb;trusted_connection=yes;"|
|-sql ||"SELECT prcnts_id, geog4326.STAsBinary() FROM 
precincts_reprojected"|

|-overwrite|

I have a hunch, that your problem stems from the use of both a geometry 
and a geography column in the same table. The -sql "select a,b..." might 
eliminate this problem by only including one of the geometry columns in 
the field lidst.




Med venlig hilsen / Best regards

Bo Victor Thomsen

Den 20-10-2022 kl. 13:59 skrev Reetz, Michael (NLPV) via Qgis-user:


Hi Andrea and Ian,

yes, I’ve read the documentation and a lot of other tips. I’ve signed 
in to the gdal-dev mailing list and will post my problem there as soon 
as the registration is done. I will post the result here if there is a 
solution.


Thanks and best regards

Michael

*Von:* Qgis-user  *Im Auftrag von 
*Andrea Giudiceandrea via Qgis-user

*Gesendet:* Donnerstag, 20. Oktober 2022 11:14
*An:* qgis-user@lists.osgeo.org
*Betreff:* Re: [Qgis-user] ogr2ogr doesn't connect to MS SQL Server

ACHTUNG!!Diese E-Mail erreicht Sie von einem Absender außerhalb der 
niedersächsischen Landesverwaltungs-Infrastruktur mit 
TLS-Verschlüsselung. Bitte klicken Sie auf keine Links oder öffnen Sie 
keine E-Mail-Anhänge, falls Sie den Absender nicht kennen und nicht 
wissen, ob der Inhalt sicher ist.


*Reetz, Michael (NLPV)*
/Thu Oct 20 01:39:42 PDT 2022/



So, it looks as if ogr2ogr is not really helpful for me and I have
to look for another tool.


Hi Michael,
AFIAK QGIS has its own MSSQL provider since 2012, while ogr2ogr relies 
on the GDAL/OGR library to connect to an MSSQL server: have you 
already read the documentation at [1]?


I suggest you to also ask the gdal-dev mailing list [2] for help.

Best regards.

Andrea Giudiceandrea

[1] https://gdal.org/drivers/vector/mssqlspatial.html 

[2] https://lists.osgeo.org/mailman/listinfo/gdal-dev 




___
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] Functional dependency seem not working in group

2022-10-18 Thread Bo Victor Thomsen via Qgis-user

Hi Peter -

(This comment has nothing to do with your original question; however, 
the query caught my eye):


You query is probably not as efficient as it can be. If you read the 
documentation for PostGIS about "ST_Expand":


-- quote --

Pre version 1.3, ST_Expand was used in conjunction withST_Distance 
to do indexable distance 
queries. For example,|geom && ST_Expand('POINT(10 20)', 10) AND 
ST_Distance(geom, 'POINT(10 20)') < 10|. This has been replaced by the 
simpler and more efficientST_DWithin 
function.


-- quote end --

So if you're using a PostGIS later than 1.3 you could improve the query 
by doing this:


drop table if exists stevns_test_urban_ped; create table 
stevns_test_urban_ped as select urban.id as id, urban.geom as geom, 
min(urban.pop2019) as pop2019, count(forest) as ped, 
min(urban.pop2019)/(count(forest)+1)::float as pop_forest_ped from 
(select * from stevns_test_p where lu_type = 1) as urban join (select * 
from stevns_test_p where lu_type = 2) as forest on 
*ST_DWithin(urban.geom, forest.geom, 1000.0)* group by urban.id*, 
urban.geom* ;


Med venlig hilsen / Best regards

Bo Victor Thomsen

Den 17-10-2022 kl. 09:04 skrev Hans Skov-Petersen via Qgis-user:

Dear Michael

Functional dependencies are, according the Net, applied in 
PostgreSQL:https://stackoverflow.com/questions/66065987/postgres-sql-column-must-appear-in-the-group-by-clause-or-be-used-in-an-aggrega

And accordingly, you shouldn't worry about it in PostGIS. The funny thing is 
that sometime it works. Sometimes it doesn't.

Cheers
Hans

-Original Message-
From: Qgis-user  On Behalf Of Reetz, Michael 
(NLPV) via Qgis-user
Sent: 17. oktober 2022 08:47
To:qgis-user@lists.osgeo.org
Subject: Re: [Qgis-user] Functional dependency seem not working in group

Hello Hans,

as far as I know, it is an SQL rule, that all selected attributes that are not 
queried with an aggregate function have to be part of the group by clause. If 
you run that query, your database server will check the syntax and throw that 
error. I'm not sure if the SQL server realizes the 'functional dependency' in 
your query as assumed by you.

Cheers,
Michael

-Ursprüngliche Nachricht-
Von: Qgis-user  Im Auftrag von Hans 
Skov-Petersen via Qgis-user
Gesendet: Montag, 17. Oktober 2022 08:00
An:Qgis-user@lists.osgeo.org
Betreff: [Qgis-user] Functional dependency seem not working in group


Dear Friends

I have, what appears to be a classic problem: When running a selection including a group 
statement I get the good old 'ERROR:  column "urban.geom" must appear in the 
GROUP BY clause or be used in an aggregate function'.

I thought 'functional dependency' was in place to take care of that. The way I 
understand it, is that functional dependency will, as applied in e.g. the group 
statement, realize that e.g. the geom field is uniquely related to the id field 
(which is referred in the group statement). Am I right in my assumption?

This is the ode causing the trouble:

drop table if exists stevns_test_urban_ped; create table stevns_test_urban_ped 
as
   select urban.id as id, urban.geom as geom, min(urban.pop2019) as pop2019, 
count(forest) as ped, min(urban.pop2019)/(count(forest)+1)::float as 
pop_forest_ped
   from (select * from stevns_test_p where lu_type = 1) as urban
   join (select * from stevns_test_p where lu_type = 2) as forest on 
ST_Distance(urban.geom, forest.geom) < 1000 and forest.geom && 
(ST_Expand(urban.geom, 1000))
   group by urban.id
;

Never mind the logics or meaning :-)

Thanks
Cheers
Hans

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List 
info:https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fqgis-userdata=05%7C01%7Chsp%40ign.ku.dk%7C1eb7efbdf32e4c3e425908dab00c602f%7Ca3927f91cda14696af898c9f1ceffa91%7C0%7C0%7C638015864588678289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=outXdPjG2JC0yvxdhzHRhHRtLv%2FOsq9%2B6%2FaxU4df1%2Bk%3Dreserved=0
Unsubscribe:https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fqgis-userdata=05%7C01%7Chsp%40ign.ku.dk%7C1eb7efbdf32e4c3e425908dab00c602f%7Ca3927f91cda14696af898c9f1ceffa91%7C0%7C0%7C638015864588678289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=outXdPjG2JC0yvxdhzHRhHRtLv%2FOsq9%2B6%2FaxU4df1%2Bk%3Dreserved=0
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List 

Re: [Qgis-user] Functional dependency seem not working in group

2022-10-17 Thread Bo Victor Thomsen via Qgis-user
The "join" in your select makes it possible that the the primary key  
urban.id won't be unique in the result set. You have to either


 * Put the column geom in a agregating function (ex. min(), max() )
 * Or put column geom into your group by clause

Med venlig hilsen / Best regards

Bo Victor Thomsen

Den 17-10-2022 kl. 09:37 skrev Reetz, Michael (NLPV) via Qgis-user:

Hello Hans,

I didn't know that you are working with PostgreSQL. Since I don't work with 
PostgreSQL, I'm not familiar with the implementation of functional dependencies 
there. Maybe the problem is that you are using subselects or that geom is part 
of both tables. But this is just a guess, not knowledge.

Cheers,

Michael

-Ursprüngliche Nachricht-
Von: Hans Skov-Petersen  
Gesendet: Montag, 17. Oktober 2022 09:05

An: Reetz, Michael (NLPV)
Cc:Qgis-user@lists.osgeo.org
Betreff: RE: Functional dependency seem not working in group

Dear Michael

Functional dependencies are, according the Net, applied in 
PostgreSQL:https://stackoverflow.com/questions/66065987/postgres-sql-column-must-appear-in-the-group-by-clause-or-be-used-in-an-aggrega

And accordingly, you shouldn't worry about it in PostGIS. The funny thing is 
that sometime it works. Sometimes it doesn't.

Cheers
Hans

-Original Message-
From: Qgis-user  On Behalf Of Reetz, Michael 
(NLPV) via Qgis-user
Sent: 17. oktober 2022 08:47
To:qgis-user@lists.osgeo.org
Subject: Re: [Qgis-user] Functional dependency seem not working in group

Hello Hans,

as far as I know, it is an SQL rule, that all selected attributes that are not 
queried with an aggregate function have to be part of the group by clause. If 
you run that query, your database server will check the syntax and throw that 
error. I'm not sure if the SQL server realizes the 'functional dependency' in 
your query as assumed by you.

Cheers,
Michael

-Ursprüngliche Nachricht-
Von: Qgis-user  Im Auftrag von Hans 
Skov-Petersen via Qgis-user
Gesendet: Montag, 17. Oktober 2022 08:00
An:Qgis-user@lists.osgeo.org
Betreff: [Qgis-user] Functional dependency seem not working in group


Dear Friends

I have, what appears to be a classic problem: When running a selection including a group 
statement I get the good old 'ERROR:  column "urban.geom" must appear in the 
GROUP BY clause or be used in an aggregate function'.

I thought 'functional dependency' was in place to take care of that. The way I 
understand it, is that functional dependency will, as applied in e.g. the group 
statement, realize that e.g. the geom field is uniquely related to the id field 
(which is referred in the group statement). Am I right in my assumption?

This is the ode causing the trouble:

drop table if exists stevns_test_urban_ped; create table stevns_test_urban_ped 
as
   select urban.id as id, urban.geom as geom, min(urban.pop2019) as pop2019, 
count(forest) as ped, min(urban.pop2019)/(count(forest)+1)::float as 
pop_forest_ped
   from (select * from stevns_test_p where lu_type = 1) as urban
   join (select * from stevns_test_p where lu_type = 2) as forest on 
ST_Distance(urban.geom, forest.geom) < 1000 and forest.geom && 
(ST_Expand(urban.geom, 1000))
   group by urban.id
;

Never mind the logics or meaning :-)

Thanks
Cheers
Hans

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List 
info:https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fqgis-userdata=05%7C01%7Chsp%40ign.ku.dk%7C1eb7efbdf32e4c3e425908dab00c602f%7Ca3927f91cda14696af898c9f1ceffa91%7C0%7C0%7C638015864588678289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=outXdPjG2JC0yvxdhzHRhHRtLv%2FOsq9%2B6%2FaxU4df1%2Bk%3Dreserved=0
Unsubscribe:https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fqgis-userdata=05%7C01%7Chsp%40ign.ku.dk%7C1eb7efbdf32e4c3e425908dab00c602f%7Ca3927f91cda14696af898c9f1ceffa91%7C0%7C0%7C638015864588678289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=outXdPjG2JC0yvxdhzHRhHRtLv%2FOsq9%2B6%2FaxU4df1%2Bk%3Dreserved=0
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List 
info:https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fqgis-userdata=05%7C01%7Chsp%40ign.ku.dk%7C1eb7efbdf32e4c3e425908dab00c602f%7Ca3927f91cda14696af898c9f1ceffa91%7C0%7C0%7C638015864588678289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=outXdPjG2JC0yvxdhzHRhHRtLv%2FOsq9%2B6%2FaxU4df1%2Bk%3Dreserved=0

[Qgis-user] Latest development version of QGIS as a .msi standalone installer ?

2022-08-17 Thread Bo Victor Thomsen via Qgis-user
I have a customer who would like to follow the development cycle of the 
latest development versions of QGIS (i.e. QGIS ver. 3.27.nnn) .


I know you can use the OsGeo4W installer to install the development 
version of QGIS. However, the customer is not able to use this solution 
because of a veto from his IT department.


So is there a http- or ftp- location where I can download the QGIS 
development version as a msi package ?


--
Med venlig hilsen / Kind regards

Bo Victor Thomsen

___
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] passing parameters to QGIS Python-Script started via Command Line

2022-08-08 Thread Bo Victor Thomsen via Qgis-user
Try to look up "|QGIS Processing Executor|", 
https://docs.qgis.org/3.22/en/docs/user_manual/processing/standalone.html


Med venlig hilsen / Kind regards

Bo Victor Thomsen

Den 08-08-2022 kl. 15:47 skrev Drexel Peter via Qgis-user:


Hi everyone,

My goal: I want to open QGIS using the Command-Line, load a specific 
project, select specific features and zoom to the selected features.


What sounds rather difficult is actually mostly solvable using the 
following:


"C:\Program Files\QGIS 3.16\bin\qgis-ltr-bin.exe" -p 
"d:\standardebenen.qgs" --code myscript.py


This opens QGIS with the Project d:\standardebenen.qgs and after that 
it runs the script “myscript.py”.


Within the scrip I can do everything what I can do in a Python-script, 
so there I can select some features in a layer and show that selection.


But this selections are “hard-coded” in the script, I cannot pass over 
these parameters to the myscript.py.


In “Pure Python” I can pass parameters to a Python Script using 
“python myscript.py arg1 arg2 arg3”.


This seems to be not working in the QGIS-Command-Line  as the 
parameters are interpreted as “layers to load”.


Am I right with my analysis?

One workaround is to write the parameters to al file and use this file 
within the myscript.py to define the selections. But this is very unhandy…


Are there any ideas from any QGIS-Expert to solve my problem?

If this cannot be solved in the current version of QGIS is one of the 
developers willing to get in contact with me to make an offer the 
implement this feature ?


Thanks

Peter


___
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