Re: [Qgis-user] Configuring QGIS server on Ubuntu 20.4

2021-10-02 Per discussione Richard Greenwood
On Sat, Oct 2, 2021 at 10:02 AM Mats Elfström 
wrote:

> Hi!
> Let me just recuperate that the goal for QGIS server is to be used as a
> map and data server for webmaps on MapStore and to be harvestable by
> Geonetwork for a metadata catalogue. MapStore and Geonetwork are running on
> another machine. QGIS server shall run on a Ubuntu machine, along with data
> in PostGIS. The address for this machine is http://geonet.se
> Essentially, I see QGIS Server as an equivalent to Geoserver but with
> outstanding design capabilities.
>
> Here comes a run-through of an attempt to install QGIS server on an Ubuntu
> 20.4 system, using these instructions:
>
> https://docs.qgis.org/testing/en/docs/server_manual/getting_started.html#installation-on-debian-based-systems
> The first step is to install QGIS, according to this page
> https://qgis.org/en/site/forusers/alldownloads.html
> I opted to install qgis-server by adding that in the last command as
> suggested.
> No problems so far. Only, when returning to the first manual page, I see
> that I probably should have installed the LTR version instead of 3.20. If
> this is important, the user should be advised earlier, and instructed how
> to get the LTR version. For this review I will continue with 3.20.
> Next, the user is again advised to install qgis-server and optionally
> python-qgis. The motive for this is rather unclear at this stage, but I
> chose to install python as advised.
> Testing the installation by calling the fcgi seems to give a correct
> response, even if it differs from the two samples. Notice error code 302
> for instance.
> root@geonet:~# /usr/lib/cgi-bin/qgis_mapserv.fcgi
> Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment
> variable.
> Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment
> variable.
> Warning 1: Unable to find driver JP2ECW to unload from GDAL_SKIP
> environment variable.
> "Loading native module /usr/lib/qgis/server/libdummy.so"
> "Loading native module /usr/lib/qgis/server/liblandingpage.so"
> "Loading native module /usr/lib/qgis/server/libwcs.so"
> "Loading native module /usr/lib/qgis/server/libwfs.so"
> "Loading native module /usr/lib/qgis/server/libwfs3.so"
> "Loading native module /usr/lib/qgis/server/libwms.so"
> "Loading native module /usr/lib/qgis/server/libwmts.so"
> Content-Length: 0
> Location: http:/index.json
> Server:  QGIS FCGI server - QGIS version 3.20.3-Odense
> Status:  302
>
> Next, it is suggested that I download a QGIS project or ‘use your own’ so
> I manually created the /home/qgis/projects/ folder, and then saved a simple
> QGIS project file to the folder. By default, this was saved in the qgz
> format.
> Then an HTTP server is needed.
> A note says *In the following, please replace localhost with the name or
> IP address of your server.*
> But localhost only appears in the string webmaster@localhost where it
> probably does not matter. There is no other mention of localhost in the
> configuration file.
> I go on to install Apache, as I have never used NGINX.
> *You can run QGIS Server on your default website*
> This is probably what I would want to do, but I do not know how, so I go
> on to create a virtualhost as instructed by the name qgis.demo. I make the
> log and qgisserverdb folders as instructed and set their permissions. Then
> I enable fcgid and the site qgis.demo. The last command advises to run
> systemctl reload apache2, but the manual suggests systemctl restart
> apache2. I do both just to make sure. Then comes a tricky part, adding the
> virtualhost to the hosts file. After that operation, it contains this. Note
> that the server IP address got two definitions. I am bothered by this.
> 127.0.0.1   localhost
> ::1 localhost ip6-localhost ip6-loopback
> ff02::1 ip6-allnodes
> ff02::2 ip6-allrouters
>
> # Auto-generated hostname. Please do not remove this comment.
> 206.72.203.32 geonet.se geonet
> 206.72.203.32 qgis.demo
>
> Calling
> http://qgis.demo/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS=1.3.0=GetCapabilities
> from within the server gives
>
>
> *Project file error. For OWS services: please provide a
> SERVICE and a MAP parameter pointing to a valid QGIS project
> file*
>
> This seems correct. However, there is a totally confusing note here.
> *Remember that both the myhost.conf and /etc/hosts files should be
> configured for your setup to work. You can also test the access to your
> QGIS Server from other clients on the network (e.g. Windows or macOS
> machines) by going to their /etc/hosts file and point the myhost name to
> whatever IP the server machine has on the network (not 127.0.0.1 as it is
> the local IP, only accessible from the local machine). On *nix machines the
> hosts file is located in /etc, while on Windows it’s under the
> C:\Windows\System32\drivers\etc directory. Under Windows you need to start
> your text editor with administrator privileges before opening the hosts
> file.*
> What is myhost.conf and what 

Re: [Qgis-user] Couldn't load SIP module - Windows 10

2021-10-02 Per discussione Fred Perloff
Just for grins, I uninstalled Anaconda. I started QGIS and Python support WAS 
enabled. Clearly there is a problem with Anaconda and QGIS learning to play 
together!


Fred Perloff
f...@perloff.us

From: Alexandre Neto
Sent: Saturday, October 2, 2021 1:12 AM
To: Richard Duivenvoorde
Cc: Fred Perloff; QGIS User
Subject: Re: [Qgis-user] Couldn't load SIP module - Windows 10

There shouldn't be any problems in using conda and osgeo4w side by side, they 
should both have isolated python environments.

If I remember well, during conda installation you are asked if you want to add 
conda to the PATH environment variable (can't remember the exact wording), you 
need to say NO. Otherwise conda python will be the default python on your 
machine.

I agree with Richard, don't mess with osgeo4w scripts or you will end up with 
with an even worst mess.

Alexandre Neto
A sábado, 2/10/2021, 08:32, Richard Duivenvoorde  escreveu:
Hi Fred,

I think indeed the source of your problem is the mixing of different versions 
of python: the one in osgeo4w and the Conda one. When SIP is not loaded 
correctly, you will not have any python based stuff in QGIS (so no plugins and 
processing).

The osgeo4w scripts normally 'isolate' the (python) paths pretty good. If I'm 
correct by actually even clearing your own PATH variable  (??)
But I think that Conda add's it's path's to your normal (python)path's (PATH or 
PYTHONPATH) variables.

For what I know you should not have  to 'fix' things in the osgeo4w scripts, 
better to make sure your system PATH is not filled with PYTHONPATH's or 
python/bin dirs in PATH.

You could try to start the osgeo4w 'terminal' and check what the environment 
variables PATH and PYTHONPATH are there. If you see conda-paths in it, these 
should be removed (either by removing them from your environment (but then you 
have to 'fix' conda) or by clearing them in the osgeo4w bat files...

Hope this helps, regards,

Richard Duivenvoorde



On 10/2/21 1:14 AM, Fred Perloff wrote:
> Hi,
> 
> After a fresh install of OSGeo4W network installer, I start QGISD Desktop.  A 
> python error box pops up with the error copied below. I close the error 
> window and the program loads. However, if I click on plugins settings, I 
> receive the error: No Python support detected.
> 
> I suspect I know the source of the problem. I have installed Python from 
> Anaconda. Anaconda uses an older version of Python and of qt. I modified 
> C:\OSGeo4W\etc\ini\python3.bat by prepending 
> %OSGEO4W_ROOT%\apps\Python39;%OSGEO4W_ROOT%\apps\Python39\Lib;%OSGEO4W_ROOT%\apps\Python39\Lib\site-packages;
>  to PYTHONPATH. There's a curious mix of / and escaped \\ in the resulting 
> path.
> 
> How do I enable loading python __init__.py when the desktop starts?
> Thanks!
> 
> Error window:
> 
> Couldn't load SIP module.
> Python support will be disabled.
> 
> Traceback (most recent call last):
> File "", line 1, in
> File "C:\OSGeo4W/apps/qgis/./python\qgis\__init__.py", line 82, in
> from qgis.PyQt import QtCore
> File "C:\OSGeo4W/apps/qgis/./python\qgis\PyQt\QtCore.py", line 24, in
> from PyQt5.QtCore import *
> ImportError: DLL load failed while importing QtCore: The specified procedure 
> could not be found.
> 
> Python version:
> 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
> QGIS version:
> 3.20.3-Odense 'Odense', 495fbaec
> Python path:
> ['C:/OSGeo4W/apps/qgis/./python', 
> 'C:/Users/Fred/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python', 
> 'C:/Users/Fred/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins', 
> 'C:/OSGeo4W/apps/qgis/./python/plugins', 'C:\\ProgramData\\Anaconda3', 
> 'C:\\ProgramData\\Anaconda3\\DLLs', 'C:\\ProgramData\\Anaconda3\\lib', 
> 'C:\\ProgramData\\Anaconda3\\lib\\site-packages', 
> 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\win32', 
> 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\win32\\lib', 
> 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\Pythonwin', 
> 'C:\\Users\\Fred\\Documents', 'C:\\OSGeo4W\\bin\\python39.zip', 
> 'C:\\OSGeo4W\\apps\\Python39\\DLLs', 'C:\\OSGeo4W\\apps\\Python39\\lib', 
> 'C:\\OSGeo4W\\bin', 'C:\\OSGeo4W\\apps\\Python39', 
> 'C:\\OSGeo4W\\apps\\Python39\\lib\\site-packages', 
> 'C:\\OSGeo4W\\apps\\Python39\\lib\\site-packages\\win32', 
> 'C:\\OSGeo4W\\apps\\Python39\\lib\\site-packages\\win32\\lib', 
> 'C:\\OSGeo4W\\apps\\Python39\\lib\\site-packages\\Pythonwin']
> OS version: Windows 10 Version 2009
> QGIS version: 3.20.3-Odense 495fbaec
> Qt version: 5.15.2
> Python version: 3.9.5
> Windows 10 Pro
> 
> Fred Perloff
> f...@perloff.us
> 
> ___
> 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

Re: [Qgis-user] Raster and vector layers appear mis-aligned on print layouts

2021-10-02 Per discussione Tomas Straupis
2021-09-27, pr, 01:23 Tony Shepherd (FarmMaps NZ) rašė:
> I logged this as a bug back in July (#44426). and since then there have been 
> a couple
> of new releases, but the issue has remained.  I’m curious to know if it’s a 
> common
> bug or something relevant to my setup perhaps.

  I have noticed the same issue with raster data (in my case
hillshade) moving westwards depending on zoom level (!=100%).
  I've added additional info on github issue
https://github.com/qgis/QGIS/issues/44426

-- 
Tomas
___
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] FW: Couldn't load SIP module - Windows 10

2021-10-02 Per discussione Fred Perloff
Thank you for your prompt and insightful replies! 

I decided to clean the slate – I uninstalled Anaconda & OsGEO4w, and rebooted. 
The PATH was clear of any references to python(s) and there were no PYTHONPATH 
or PYTHONHOME variables.

I reinstalled Anaconda, and made sure that I did NOT add conda to PATH. I 
installed QGIS desktop 3.20 and started the program. I received a very similar 
error message to last time. Both QGIS and Anaconda write to “Python path,” 
though QGIS entries are first in order.

Have any other thoughts on how to obtain Python support in QGIS?

Fred

Couldn't load SIP module.
Python support will be disabled.

Traceback (most recent call last):
  File "", line 1, in 
  File "C:\PROGRA~1/QGIS32~1.3/apps/qgis/./python\qgis\__init__.py", line 82, 
in 
    from qgis.PyQt import QtCore
  File "C:\PROGRA~1/QGIS32~1.3/apps/qgis/./python\qgis\PyQt\QtCore.py", line 
24, in 
    from PyQt5.QtCore import *
ImportError: DLL load failed while importing QtCore: The specified procedure 
could not be found.
Python version:
3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]

QGIS version:
3.20.3-Odense 'Odense', 495fbaec

Python path:
['C:/PROGRA~1/QGIS32~1.3/apps/qgis/./python', 
'C:/Users/Fred/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python', 
'C:/Users/Fred/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins', 
'C:/PROGRA~1/QGIS32~1.3/apps/qgis/./python/plugins', 
'C:\\ProgramData\\Anaconda3', 'C:\\ProgramData\\Anaconda3\\DLLs', 
'C:\\ProgramData\\Anaconda3\\lib', 
'C:\\ProgramData\\Anaconda3\\lib\\site-packages', 
'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\win32', 
'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\win32\\lib', 
'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\Pythonwin', 
'C:\\Users\\Fred\\Documents', 'C:\\Program Files\\QGIS 
3.20.3\\bin\\python39.zip', 'C:\\PROGRA~1\\QGIS32~1.3\\apps\\Python39\\DLLs', 
'C:\\PROGRA~1\\QGIS32~1.3\\apps\\Python39\\lib', 'C:\\Program Files\\QGIS 
3.20.3\\bin', 'C:\\PROGRA~1\\QGIS32~1.3\\apps\\Python39', 
'C:\\PROGRA~1\\QGIS32~1.3\\apps\\Python39\\lib\\site-packages', 
'C:\\PROGRA~1\\QGIS32~1.3\\apps\\Python39\\lib\\site-packages\\win32', 
'C:\\PROGRA~1\\QGIS32~1.3\\apps\\Python39\\lib\\site-packages\\win32\\lib', 
'C:\\PROGRA~1\\QGIS32~1.3\\apps\\Python39\\lib\\site-packages\\Pythonwin']

From: Alexandre Neto
Sent: Saturday, October 2, 2021 1:12 AM
To: Richard Duivenvoorde
Cc: Fred Perloff; QGIS User
Subject: Re: [Qgis-user] Couldn't load SIP module - Windows 10

There shouldn't be any problems in using conda and osgeo4w side by side, they 
should both have isolated python environments.

If I remember well, during conda installation you are asked if you want to add 
conda to the PATH environment variable (can't remember the exact wording), you 
need to say NO. Otherwise conda python will be the default python on your 
machine.

I agree with Richard, don't mess with osgeo4w scripts or you will end up with 
with an even worst mess.

Alexandre Neto
A sábado, 2/10/2021, 08:32, Richard Duivenvoorde  escreveu:
Hi Fred,

I think indeed the source of your problem is the mixing of different versions 
of python: the one in osgeo4w and the Conda one. When SIP is not loaded 
correctly, you will not have any python based stuff in QGIS (so no plugins and 
processing).

The osgeo4w scripts normally 'isolate' the (python) paths pretty good. If I'm 
correct by actually even clearing your own PATH variable  (??)
But I think that Conda add's it's path's to your normal (python)path's (PATH or 
PYTHONPATH) variables.

For what I know you should not have  to 'fix' things in the osgeo4w scripts, 
better to make sure your system PATH is not filled with PYTHONPATH's or 
python/bin dirs in PATH.

You could try to start the osgeo4w 'terminal' and check what the environment 
variables PATH and PYTHONPATH are there. If you see conda-paths in it, these 
should be removed (either by removing them from your environment (but then you 
have to 'fix' conda) or by clearing them in the osgeo4w bat files...

Hope this helps, regards,

Richard Duivenvoorde



On 10/2/21 1:14 AM, Fred Perloff wrote:
> Hi,
> 
> After a fresh install of OSGeo4W network installer, I start QGISD Desktop.  A 
> python error box pops up with the error copied below. I close the error 
> window and the program loads. However, if I click on plugins settings, I 
> receive the error: No Python support detected.
> 
> I suspect I know the source of the problem. I have installed Python from 
> Anaconda. Anaconda uses an older version of Python and of qt. I modified 
> C:\OSGeo4W\etc\ini\python3.bat by prepending 
> %OSGEO4W_ROOT%\apps\Python39;%OSGEO4W_ROOT%\apps\Python39\Lib;%OSGEO4W_ROOT%\apps\Python39\Lib\site-packages;
>  to PYTHONPATH. There's a curious mix of / and escaped \\ in the resulting 
> path.
> 
> How do I enable loading python __init__.py when the desktop starts?
> Thanks!
> 
> Error window:
> 
> Couldn't load SIP module.
> Python support will be 

Re: [QGIS-it-user] R: Assegnare geometria a tabella dati esistenti

2021-10-02 Per discussione Luca Lanteri
Puoi provare ad aggiungere la geometria selezionando il record e
utilizzando lo strumento aggiungi parte (add part).

Luca


Il giorno ven 1 ott 2021 alle ore 10:11 Alberto Poggi 
ha scritto:

> Ciao Francesco,
> hai sicuramente ragione sul fatto che dovendo considerare dati di tipo
> diverso le tabelle debbano essere due per la corretta gestione dei dati
> Comunque, parlando in generale e non del caso specifico, postgres ti
> consente di avere due o più campi geometrici nella stessa tabella
>
> Dal lato Qgis se tu fai due connessioni distinte sulla stessa tabella in
> fase di connessione puoi indicare qual è il campo geometrico da considerare
> nei due differenti casi.
> Ho provato e qgis accetta senza problemi la cosa rappresentando con due
> punti ovviamente differenti per posizione sia la imhoff che lo scarico (nel
> mio caso) con due campi geometrici differenti (geom per la imhoff e
> geom_sca per lo scarico)
>
> Di conseguenza la cosa sembra possibile.
>
> Il problema stà nella gestione dei dati
>
> Se, ad esempio, io inserisco una nuova imhoff, non c'è problema, aggiungo
> i dati che mi interessano, ho una nuova riga di dati in tabella e sono a
> posto.
> Subito dopo aver registrato il punto imhoff devo inserire anche il punto
> di scarico.
> Apro in editing la seconda connessione (lo scarico che punta al campo
> geometrico dedicato) ma in questo caso devo assegnare la geometria ad una
> riga già esistente (quella della imhoff creata prima) e non creare una
> nuova riga della tabella.
> Quindi mi ritrovo a dover assegnare la nuova geometria ad una riga di
> tabella già esistente.
>
> So che è possibile assegnare una geometria ad una tabella dati già
> esistente con il comando "fondi attributi degli elementi selezionati"
>
> in questo caso però non riesco a farlo perchè qgis considera tabelle
> differenti le due connessioni e dalla connessione dello scarico non vede la
> riga della imhoff appena creata perchè il campo geom_sca è vuoto.
>
> Forse, visto che in tabella ho due campi float per le coordinate x e y, si
> può risolvere il problema con un trigger su postgres che una volta inseriti
> i dati delle coordinate nei due campi vada ad aggiornare il campo geom_sca.
>
>
>
> > ciao,
> > concettualmente io credo che l'unica soluzione sia quella di gestire i
> > due oggetti in due layer (tabelle) distinti: nel caso di una geometria
> > multipoint non hai la possibilità di caratterizzare il punto (se
> > imhoff o scarico), mentre nella soluzione che stai provando in QGIS
> > (due campi geometry nella stessa tabella) non è possibile aggiungere
> > una geometria (lo scarico) ad un record esistente (imhoff) e comunque
> > si tratta di due oggetti distinti e ti troverai sicuramente ad avere
> > dei dati riferiti ad uno e dati all'altro, violando quindi la più
> > basilare norma dei database (normalizzazione).
> > in generale in un GIS l'elemento geografico non è un attributo in più
> > di un altro elemento, ma è una primitiva che contiene degli attributi
> > (che tu stai rappresentando).
>
> > saluti,
> > francesco
>
>
> > Da: QGIS-it-user  Per conto di
> Alberto Poggi
> > Inviato: giovedì 30 settembre 2021 10:00
> > A: QGIS-it-user@lists.osgeo.org
> > Oggetto: [QGIS-it-user] Assegnare geometria a tabella dati esistenti
> >
> >
> >
> > Buongiorno a tutti, ho un problema che non riesco a risolvere con una
> tabella dati in postgis.
> >
> > La tabella contiene i dati di fosse imhoff esistenti. Ho la necessità di
> registrare anche il punto di scarico di queste imhoff e il modo più
> "semplice" mi è sembrato quello di aggiungere un altro campo geometrico nel
> quale registrare il punto di scarico.
> >
> > Ho quindi sulla stessa riga due campi geometrici, uno per la imhoff e
> uno per lo scarico.
> >
> > Ho collegato due volte la stessa tabella in qgis, vestendola in modo
> diverso, utilizzando il primo campo geometrico per rappresentare la fossa
> imhoff  e il secondo per lo scarico.
> >
> >
> >
> > Il problema è: come faccio ad assegnare la geometria dello scarico alla
> singola riga della tabella già esistente?
> >
> >
> >
> > Ho cercato in rete e ho visto che la procedura in qgis dovrebbe
> utilizzare la funzionalità "fondi attributi degli elementi selezionati" ma
> non sono riuscito ad ottenere nulla.
> >
> > Qualcuno mi può aiutare?
> >
> > grazie in anticipo
> >
> ___
> QGIS-it-user mailing list
> QGIS-it-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/qgis-it-user
>
___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/qgis-it-user


Re: [Qgis-user] Configuring QGIS server on Ubuntu 20.4

2021-10-02 Per discussione Mats Elfström
Hi!
Let me just recuperate that the goal for QGIS server is to be used as a map
and data server for webmaps on MapStore and to be harvestable by Geonetwork
for a metadata catalogue. MapStore and Geonetwork are running on another
machine. QGIS server shall run on a Ubuntu machine, along with data in
PostGIS. The address for this machine is http://geonet.se
Essentially, I see QGIS Server as an equivalent to Geoserver but with
outstanding design capabilities.

Here comes a run-through of an attempt to install QGIS server on an Ubuntu
20.4 system, using these instructions:
https://docs.qgis.org/testing/en/docs/server_manual/getting_started.html#installation-on-debian-based-systems
The first step is to install QGIS, according to this page
https://qgis.org/en/site/forusers/alldownloads.html
I opted to install qgis-server by adding that in the last command as
suggested.
No problems so far. Only, when returning to the first manual page, I see
that I probably should have installed the LTR version instead of 3.20. If
this is important, the user should be advised earlier, and instructed how
to get the LTR version. For this review I will continue with 3.20.
Next, the user is again advised to install qgis-server and optionally
python-qgis. The motive for this is rather unclear at this stage, but I
chose to install python as advised.
Testing the installation by calling the fcgi seems to give a correct
response, even if it differs from the two samples. Notice error code 302
for instance.
root@geonet:~# /usr/lib/cgi-bin/qgis_mapserv.fcgi
Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment
variable.
Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment
variable.
Warning 1: Unable to find driver JP2ECW to unload from GDAL_SKIP
environment variable.
"Loading native module /usr/lib/qgis/server/libdummy.so"
"Loading native module /usr/lib/qgis/server/liblandingpage.so"
"Loading native module /usr/lib/qgis/server/libwcs.so"
"Loading native module /usr/lib/qgis/server/libwfs.so"
"Loading native module /usr/lib/qgis/server/libwfs3.so"
"Loading native module /usr/lib/qgis/server/libwms.so"
"Loading native module /usr/lib/qgis/server/libwmts.so"
Content-Length: 0
Location: http:/index.json
Server:  QGIS FCGI server - QGIS version 3.20.3-Odense
Status:  302

Next, it is suggested that I download a QGIS project or ‘use your own’ so I
manually created the /home/qgis/projects/ folder, and then saved a simple
QGIS project file to the folder. By default, this was saved in the qgz
format.
Then an HTTP server is needed.
A note says *In the following, please replace localhost with the name or IP
address of your server.*
But localhost only appears in the string webmaster@localhost where it
probably does not matter. There is no other mention of localhost in the
configuration file.
I go on to install Apache, as I have never used NGINX.
*You can run QGIS Server on your default website*
This is probably what I would want to do, but I do not know how, so I go on
to create a virtualhost as instructed by the name qgis.demo. I make the log
and qgisserverdb folders as instructed and set their permissions. Then I
enable fcgid and the site qgis.demo. The last command advises to run
systemctl reload apache2, but the manual suggests systemctl restart
apache2. I do both just to make sure. Then comes a tricky part, adding the
virtualhost to the hosts file. After that operation, it contains this. Note
that the server IP address got two definitions. I am bothered by this.
127.0.0.1   localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

# Auto-generated hostname. Please do not remove this comment.
206.72.203.32 geonet.se geonet
206.72.203.32 qgis.demo

Calling
http://qgis.demo/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS=1.3.0=GetCapabilities
from within the server gives


*Project file error. For OWS services: please provide a
SERVICE and a MAP parameter pointing to a valid QGIS project
file*

This seems correct. However, there is a totally confusing note here.
*Remember that both the myhost.conf and /etc/hosts files should be
configured for your setup to work. You can also test the access to your
QGIS Server from other clients on the network (e.g. Windows or macOS
machines) by going to their /etc/hosts file and point the myhost name to
whatever IP the server machine has on the network (not 127.0.0.1 as it is
the local IP, only accessible from the local machine). On *nix machines the
hosts file is located in /etc, while on Windows it’s under the
C:\Windows\System32\drivers\etc directory. Under Windows you need to start
your text editor with administrator privileges before opening the hosts
file.*
What is myhost.conf and what should it contain? The rest is very strange.
My goal is to access QGIS server from the internet, using the
http://geonet.se address, looked up by DNS as usual. Not from ‘other
clients on the network’ and the *myhost *name. What would be the 

Re: [Qgis-user] CSV Import records missing on map

2021-10-02 Per discussione Peter Devanney
Andrea, Garth

Thanks for the suggestions and tips.

I would have shared the file or some of the data but was unable to get in
touch with the data owner for permission in a timely manner.

I thought I would share the workaround and experience in case anyone else
runs into this.

Based on Garth's comments I updated the DMS to ensure it used the specific
characters mentioned above ( "The degree symbol ° fails while º works.
Under Mac OS X 10.13 the first is Option-Shift-8, the second is Option-0
(opt-zero)."). QGIS still would only successfully assign geometry
attributes to a few of the imported records and none to others.

In the end I used the Microsoft support site VBA code to do the conversion
in Excel from DMS to D.D and then 100% records imported ok as a delimited
text file into QGIS.

I did have to change the degree symbol from Option-0 to Option-Shift-8 and
the seconds symbol from a double single quote to proper double quotes or I
could have changed it in the VBA script as well.

If I had been a better Python text wrangler I probably could have dealt
with modifying a N45 00 00.0 to 45° 00' 00.0 " programmatically without
going through the data and adding the ° ' and " manually but at least I
have a solution. There are not too many records.

Thanks again for the suggestions.

Peter

On Mon, Sep 27, 2021 at 3:56 PM Garth Fletcher  wrote:

> CVS import of DMS coords is touchy in my experience.
> The degree symbol ° fails while º works.
>   Under Mac OS X 10.13 the first is Option-Shift-8, the second is
> Option-0 (opt-zero).
> Also, it seems to want ' for minutes and ' ' for seconds, i.e., a single
> ' and two separate '.
> It rejects a normal " double quotes, and I'm sure will reject "smart"
> quotes, i.e., the ones
> that lean in different directions.
>
> Since I figured those quirks out I have not had any problems with DMS
> notation.
>
> --
> Garth Fletcher
>
> ___
> 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 SIP module - Windows 10

2021-10-02 Per discussione Alexandre Neto
There shouldn't be any problems in using conda and osgeo4w side by side,
they should both have isolated python environments.

If I remember well, during conda installation you are asked if you want to
add conda to the PATH environment variable (can't remember the exact
wording), you need to say NO. Otherwise conda python will be the default
python on your machine.

I agree with Richard, don't mess with osgeo4w scripts or you will end up
with with an even worst mess.

Alexandre Neto

A sábado, 2/10/2021, 08:32, Richard Duivenvoorde 
escreveu:

> Hi Fred,
>
> I think indeed the source of your problem is the mixing of different
> versions of python: the one in osgeo4w and the Conda one. When SIP is not
> loaded correctly, you will not have any python based stuff in QGIS (so no
> plugins and processing).
>
> The osgeo4w scripts normally 'isolate' the (python) paths pretty good. If
> I'm correct by actually even clearing your own PATH variable  (??)
> But I think that Conda add's it's path's to your normal (python)path's
> (PATH or PYTHONPATH) variables.
>
> For what I know you should not have  to 'fix' things in the osgeo4w
> scripts, better to make sure your system PATH is not filled with
> PYTHONPATH's or python/bin dirs in PATH.
>
> You could try to start the osgeo4w 'terminal' and check what the
> environment variables PATH and PYTHONPATH are there. If you see conda-paths
> in it, these should be removed (either by removing them from your
> environment (but then you have to 'fix' conda) or by clearing them in the
> osgeo4w bat files...
>
> Hope this helps, regards,
>
> Richard Duivenvoorde
>
>
>
> On 10/2/21 1:14 AM, Fred Perloff wrote:
> > Hi,
> >
> > After a fresh install of OSGeo4W network installer, I start QGISD
> Desktop.  A python error box pops up with the error copied below. I close
> the error window and the program loads. However, if I click on plugins
> settings, I receive the error: No Python support detected.
> >
> > I suspect I know the source of the problem. I have installed Python from
> Anaconda. Anaconda uses an older version of Python and of qt. I modified
> C:\OSGeo4W\etc\ini\python3.bat by prepending
> %OSGEO4W_ROOT%\apps\Python39;%OSGEO4W_ROOT%\apps\Python39\Lib;%OSGEO4W_ROOT%\apps\Python39\Lib\site-packages;
> to PYTHONPATH. There's a curious mix of / and escaped \\ in the resulting
> path.
> >
> > How do I enable loading python __init__.py when the desktop starts?
> > Thanks!
> >
> > Error window:
> >
> > Couldn't load SIP module.
> > Python support will be disabled.
> >
> > Traceback (most recent call last):
> > File "", line 1, in
> > File "C:\OSGeo4W/apps/qgis/./python\qgis\__init__.py", line 82, in
> > from qgis.PyQt import QtCore
> > File "C:\OSGeo4W/apps/qgis/./python\qgis\PyQt\QtCore.py", line 24, in
> > from PyQt5.QtCore import *
> > ImportError: DLL load failed while importing QtCore: The specified
> procedure could not be found.
> >
> > Python version:
> > 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit
> (AMD64)]
> > QGIS version:
> > 3.20.3-Odense 'Odense', 495fbaec
> > Python path:
> > ['C:/OSGeo4W/apps/qgis/./python',
> 'C:/Users/Fred/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python',
> 'C:/Users/Fred/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins',
> 'C:/OSGeo4W/apps/qgis/./python/plugins', 'C:\\ProgramData\\Anaconda3',
> 'C:\\ProgramData\\Anaconda3\\DLLs', 'C:\\ProgramData\\Anaconda3\\lib',
> 'C:\\ProgramData\\Anaconda3\\lib\\site-packages',
> 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\win32',
> 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\win32\\lib',
> 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\Pythonwin',
> 'C:\\Users\\Fred\\Documents', 'C:\\OSGeo4W\\bin\\python39.zip',
> 'C:\\OSGeo4W\\apps\\Python39\\DLLs', 'C:\\OSGeo4W\\apps\\Python39\\lib',
> 'C:\\OSGeo4W\\bin', 'C:\\OSGeo4W\\apps\\Python39',
> 'C:\\OSGeo4W\\apps\\Python39\\lib\\site-packages',
> 'C:\\OSGeo4W\\apps\\Python39\\lib\\site-packages\\win32',
> 'C:\\OSGeo4W\\apps\\Python39\\lib\\site-packages\\win32\\lib',
> 'C:\\OSGeo4W\\apps\\Python39\\lib\\site-packages\\Pythonwin']
> > OS version: Windows 10 Version 2009
> > QGIS version: 3.20.3-Odense 495fbaec
> > Qt version: 5.15.2
> > Python version: 3.9.5
> > Windows 10 Pro
> >
> > Fred Perloff
> > f...@perloff.us
> >
> > ___
> > 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: 

Re: [Qgis-user] Couldn't load SIP module - Windows 10

2021-10-02 Per discussione Richard Duivenvoorde
Hi Fred,

I think indeed the source of your problem is the mixing of different versions 
of python: the one in osgeo4w and the Conda one. When SIP is not loaded 
correctly, you will not have any python based stuff in QGIS (so no plugins and 
processing).

The osgeo4w scripts normally 'isolate' the (python) paths pretty good. If I'm 
correct by actually even clearing your own PATH variable  (??)
But I think that Conda add's it's path's to your normal (python)path's (PATH or 
PYTHONPATH) variables.

For what I know you should not have  to 'fix' things in the osgeo4w scripts, 
better to make sure your system PATH is not filled with PYTHONPATH's or 
python/bin dirs in PATH.

You could try to start the osgeo4w 'terminal' and check what the environment 
variables PATH and PYTHONPATH are there. If you see conda-paths in it, these 
should be removed (either by removing them from your environment (but then you 
have to 'fix' conda) or by clearing them in the osgeo4w bat files...

Hope this helps, regards,

Richard Duivenvoorde



On 10/2/21 1:14 AM, Fred Perloff wrote:
> Hi,
> 
> After a fresh install of OSGeo4W network installer, I start QGISD Desktop.  A 
> python error box pops up with the error copied below. I close the error 
> window and the program loads. However, if I click on plugins settings, I 
> receive the error: No Python support detected.
> 
> I suspect I know the source of the problem. I have installed Python from 
> Anaconda. Anaconda uses an older version of Python and of qt. I modified 
> C:\OSGeo4W\etc\ini\python3.bat by prepending 
> %OSGEO4W_ROOT%\apps\Python39;%OSGEO4W_ROOT%\apps\Python39\Lib;%OSGEO4W_ROOT%\apps\Python39\Lib\site-packages;
>  to PYTHONPATH. There's a curious mix of / and escaped \\ in the resulting 
> path.
> 
> How do I enable loading python __init__.py when the desktop starts?
> Thanks!
> 
> Error window:
> 
> Couldn't load SIP module.
> Python support will be disabled.
> 
> Traceback (most recent call last):
> File "", line 1, in
> File "C:\OSGeo4W/apps/qgis/./python\qgis\__init__.py", line 82, in
> from qgis.PyQt import QtCore
> File "C:\OSGeo4W/apps/qgis/./python\qgis\PyQt\QtCore.py", line 24, in
> from PyQt5.QtCore import *
> ImportError: DLL load failed while importing QtCore: The specified procedure 
> could not be found.
> 
> Python version:
> 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
> QGIS version:
> 3.20.3-Odense 'Odense', 495fbaec
> Python path:
> ['C:/OSGeo4W/apps/qgis/./python', 
> 'C:/Users/Fred/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python', 
> 'C:/Users/Fred/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins', 
> 'C:/OSGeo4W/apps/qgis/./python/plugins', 'C:\\ProgramData\\Anaconda3', 
> 'C:\\ProgramData\\Anaconda3\\DLLs', 'C:\\ProgramData\\Anaconda3\\lib', 
> 'C:\\ProgramData\\Anaconda3\\lib\\site-packages', 
> 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\win32', 
> 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\win32\\lib', 
> 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\Pythonwin', 
> 'C:\\Users\\Fred\\Documents', 'C:\\OSGeo4W\\bin\\python39.zip', 
> 'C:\\OSGeo4W\\apps\\Python39\\DLLs', 'C:\\OSGeo4W\\apps\\Python39\\lib', 
> 'C:\\OSGeo4W\\bin', 'C:\\OSGeo4W\\apps\\Python39', 
> 'C:\\OSGeo4W\\apps\\Python39\\lib\\site-packages', 
> 'C:\\OSGeo4W\\apps\\Python39\\lib\\site-packages\\win32', 
> 'C:\\OSGeo4W\\apps\\Python39\\lib\\site-packages\\win32\\lib', 
> 'C:\\OSGeo4W\\apps\\Python39\\lib\\site-packages\\Pythonwin']
> OS version: Windows 10 Version 2009
> QGIS version: 3.20.3-Odense 495fbaec
> Qt version: 5.15.2
> Python version: 3.9.5
> Windows 10 Pro
> 
> Fred Perloff
> f...@perloff.us
> 
> ___
> 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