[Qgis-user] QGIS and PostGIS raster (out-db)

2021-10-17 Thread tim dunlevie
Hi all,

Was wondering if someone has a similar experience.
I'm testing storing raster data in my PostGIS db as an 'out-db' option.
It seems to work via the raster2pgsql command line.
The table is generated and I can see the table thru the QGIS browser/DB
Manager.
However, if I drag/drop onto the map I get nothing.
I can, however, zoom to the extents of the imagebut I get no image
appearing.
The image is a geotiff.
In-database option works fine.
I'm using QGIS v3.20.3-Odense with Postgresql 13.4 windows.
Has anyone had success managing their raster data like this and viewing in
QGIS ?

My command to store out-db image is below:

raster2pgsql -s 28350 -C -I -F “path\[image_name].tif"
[schema1].[tablename] -R | psql -h localhost -d spatialDB -U postgres
-p 5432


thanks
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] QGIS server in professional use?

2021-10-17 Thread Richard Greenwood
Posting again without screenshot, which apparently caused my previous email
to await moderator approval.

Mats,

I fired up a new Ubuntu 20.04 instance on AWS and did the following 5 steps
which got me an XML capabilities document.

# standard practice when starting a new instance
sudo apt update && sudo apt upgrade -y
# reboot if a new kernel was installed by apt upgrade
sudo reboot
# install qgis-server and apache web server
sudo apt install qgis-server apache2 libapache2-mod-fcgid
# enable apache fcgi and cgi
sudo a2enmod fcgi cgi
sudo systemctl restart apache2
# in a web browser you should now get an XML document from the following
request
http://IP-ADDRESS-OR-HOST-NAME
/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities

And 3 more steps got me a map

# load some test data
wget https://github.com/qgis/QGIS-Training-Data/archive/v2.0.zip
sudo apt install unzip
unzip v2.0.zip
# in a web browser you should get a map from the following request
http://IP-ADDRESS-OR-HOST-NAME
/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&MAP=/home/ubuntu/QGIS-Training-Data-2.0/exercise_data/qgis-server-tutorial-data/world.qgs&LAYERS=countries&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&CRS=EPSG:4326&WIDTH=400&HEIGHT=200&BBOX=-90,-180,90,180

The tutorial tries to cover a lot of ground, maybe too much. And the 8
steps above certainly don't cover enough for a production server. But it's
quite unfair to say that "QGIS Server is not ready for production". As
Donovan pointed out, there are a lot of moving parts and you have to have
some proficiency with all of them if you are doing it on your own.

The basic principle is that QGIS Server is serving WMS, WFS, WCS requests
via CGI (or Fast-CGI). Apache, Ngix, IIS, Tomcat all can serve CGI and
Fast-CGI. Pick whatever operating system and web server you're the most
proficient with. Install QGIS Server, start with the simplest configuration
that you can, as I did above. Then start tuning it to your needs. If you
run into problems ask for help on the list or
https://gis.stackexchange.com/ with
specific details as to what the problem is.

-- 
Richard W. Greenwood
www.greenwoodmap.com
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] QGIS server in professional use?

2021-10-17 Thread Saulteau Don
I haven't had major issues getting a QGIS map server deployed on apache,
but sometimes there would be a thing or two not included in the
step-by-step because individual setups can be different and also require a
diverse level of knowledge and skill sets.

Consider that to get it going you likely had to:

 - deploy a server (windows or linux?)
 - setup a datastore (a database or traditional flat file?)
 - manage and prep your software, data and maps (qgis, qgis server)
 - configure and deploy the web host (iis, apache, nginx?)
 - configure the web host to host the qgis map server

Each one of those components is an industry in itself. As GIS we are often
allowed to or expected to dabble in one or all of them (hence the jack of
all trades, master of none).

So keep trying and reach out for support in any of those specific areas as
it can take a little to learn where the issues actually lie when problems
arise.

Good luck!



Donovan

On Sun, Oct 17, 2021 at 4:03 AM Paolo Cavallini 
wrote:

> Quite strange. We have tens of installations, never a failure.
> Maybe you can get some support?
> Cheers.
>
> Il 17 ottobre 2021 10:44:11 EEST, "giskraft.se" 
> ha scritto:
>>
>> Trust me, Paolo, I would very much more like to be the harbinger of
>> success and confidence in QGIS Server.
>> But in 5-6 years, ”following the instructions carefully” has never
>> worked. Once or twice, I have succeeded after much trial an error, on
>> Windows machines. Linux was supposed to be better. So I decided to give
>> that a try.
>> And I had no problems setting up PostGIS and Geoserver on this Ubuntu
>> machine, by following the instructions. Starting from scratch is not a
>> tempting option.
>>
>> Hälsning / Regards
>> Mats.E
>>
>> Skickat från min / Sent from my iPad, Ursäkta att jag är kortfattad /
>> Excuse my brevity.
>>
>> 17 okt. 2021 kl. 04:58 skrev Paolo Cavallini :
>>
>>  Please do not spread FUD.
>> We have tens of instances running smoothly. Just follow carefully the
>> instructions on a clean machine, and it will work.
>> Thanks.
>>
>> Il 17 ottobre 2021 00:53:58 EEST, "Mats Elfström" <
>> mats.elfst...@giskraft.se> ha scritto:
>>>
>>> Hi!
>>> Thanks to Jorge and Benoit for trying to assist with missing information.
>>> I have attempted to include the suggested code snippets into my virtual
>>> host file, and am at least able to start Apache2 now (there were errors I
>>> had to figure out).
>>> I am not too happy about the resulting mix.
>>>
>>> *Conclusion: FAIL*
>>> qgis_server.fcgi is running locally. check
>>> Apache2 is accessible on port 80 (http://geonet.se) check
>>> But despite all efforts, the request
>>>
>>> http://geonet.se/qgis/my_12?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities
>>> invariably gets a 404 Not Found response.
>>>
>>> *Conclusion*: QGIS Server is not ready for production.
>>> There is a fatal bug, the missing parts of the documentation which
>>> prevents the setup and configuration of the service.
>>>
>>> Now I have to fall back on Geoserver, despite the miserable cartography
>>> and the SLD file difficulties.
>>>
>>> Tired and not so happy, Mats.E
>>>
>>> --
>>>
>>>
>>> *GisKraft*, Geodatakonsult
>>>
>>> Mats Elfström, Marsvinsholms stationsväg 80, 271 93 Ystad, Sweden
>>> tel: +46 70 595 39 35 / www.giskraft.se
>>>
>>
>> --
>> Sorry for being short
>>
>>
> --
> Sorry for being short
> ___
> 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 server in professional use?

2021-10-17 Thread Paolo Cavallini
Quite strange. We have tens of installations, never a failure.
Maybe you can get some support?
Cheers.

Il 17 ottobre 2021 10:44:11 EEST, "giskraft.se"  ha 
scritto:
>Trust me, Paolo, I would very much more like to be the harbinger of
>success and confidence in QGIS Server. 
>But in 5-6 years, ”following the instructions carefully” has never
>worked. Once or twice, I have succeeded after much trial an error, on
>Windows machines. Linux was supposed to be better. So I decided to give
>that a try. 
>And I had no problems setting up PostGIS and Geoserver on this Ubuntu
>machine, by following the instructions. Starting from scratch is not a
>tempting option. 
>
>Hälsning / Regards
>Mats.E
>
>Skickat från min / Sent from my iPad, Ursäkta att jag är kortfattad /
>Excuse my brevity. 
>
>> 17 okt. 2021 kl. 04:58 skrev Paolo Cavallini :
>> 
>>  Please do not spread FUD.
>> We have tens of instances running smoothly. Just follow carefully the
>instructions on a clean machine, and it will work.
>> Thanks.
>> 
>> Il 17 ottobre 2021 00:53:58 EEST, "Mats Elfström"
> ha scritto:
>>> 
>>> Hi!
>>> Thanks to Jorge and Benoit for trying to assist with missing
>information.
>>> I have attempted to include the suggested code snippets into my
>virtual host file, and am at least able to start Apache2 now (there
>were errors I had to figure out).
>>> I am not too happy about the resulting mix.
>>> 
>>> Conclusion: FAIL
>>> qgis_server.fcgi is running locally. check
>>> Apache2 is accessible on port 80 (http://geonet.se) check
>>> But despite all efforts, the request 
>>>
>http://geonet.se/qgis/my_12?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities
>>> invariably gets a 404 Not Found response.
>>> 
>>> Conclusion: QGIS Server is not ready for production. 
>>> There is a fatal bug, the missing parts of the documentation which
>prevents the setup and configuration of the service.
>>> 
>>> Now I have to fall back on Geoserver, despite the miserable
>cartography and the SLD file difficulties.
>>> 
>>> Tired and not so happy, Mats.E
>>> 
>>> -- 
>>> 
>>> 
>>> GisKraft, Geodatakonsult
>>> 
>>> Mats Elfström, Marsvinsholms stationsväg 80, 271 93 Ystad, Sweden
>>> tel: +46 70 595 39 35 / www.giskraft.se
>>> 
>> 
>> -- 
>> Sorry for being short

-- 
Sorry for being short___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] QGIS server in professional use?

2021-10-17 Thread giskraft . se
Trust me, Paolo, I would very much more like to be the harbinger of success and 
confidence in QGIS Server. 
But in 5-6 years, ”following the instructions carefully” has never worked. Once 
or twice, I have succeeded after much trial an error, on Windows machines. 
Linux was supposed to be better. So I decided to give that a try. 
And I had no problems setting up PostGIS and Geoserver on this Ubuntu machine, 
by following the instructions. Starting from scratch is not a tempting option. 

Hälsning / Regards
Mats.E

Skickat från min / Sent from my iPad, Ursäkta att jag är kortfattad / Excuse my 
brevity. 

> 17 okt. 2021 kl. 04:58 skrev Paolo Cavallini :
> 
>  Please do not spread FUD.
> We have tens of instances running smoothly. Just follow carefully the 
> instructions on a clean machine, and it will work.
> Thanks.
> 
> Il 17 ottobre 2021 00:53:58 EEST, "Mats Elfström"  
> ha scritto:
>> 
>> Hi!
>> Thanks to Jorge and Benoit for trying to assist with missing information.
>> I have attempted to include the suggested code snippets into my virtual host 
>> file, and am at least able to start Apache2 now (there were errors I had to 
>> figure out).
>> I am not too happy about the resulting mix.
>> 
>> Conclusion: FAIL
>> qgis_server.fcgi is running locally. check
>> Apache2 is accessible on port 80 (http://geonet.se) check
>> But despite all efforts, the request 
>> http://geonet.se/qgis/my_12?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities
>> invariably gets a 404 Not Found response.
>> 
>> Conclusion: QGIS Server is not ready for production. 
>> There is a fatal bug, the missing parts of the documentation which prevents 
>> the setup and configuration of the service.
>> 
>> Now I have to fall back on Geoserver, despite the miserable cartography and 
>> the SLD file difficulties.
>> 
>> Tired and not so happy, Mats.E
>> 
>> -- 
>> 
>> 
>> GisKraft, Geodatakonsult
>> 
>> Mats Elfström, Marsvinsholms stationsväg 80, 271 93 Ystad, Sweden
>> tel: +46 70 595 39 35 / www.giskraft.se
>> 
> 
> -- 
> Sorry for being short
___
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