Re: [Qgis-user] Project files with local and remote connections to postgreSQL databases

2019-01-24 Thread Laurence Béchet
Thanks for the answers. Sorry have not checked Brent's suggestion as the 
pg_services just work beautifully.


Maybe I have not been looking carefully, but it would be nice if it were 
a bit more documented in qgis doc - at least mentioned with an example ;o)


Kind regards
Laurence
Ark in the Park volunteer co-ordinator
On 11/01/2019 8:00 PM, Paolo Cavallini wrote:

Use pg_services.

Il 11 gennaio 2019 01:54:24 CET, Brent Wood  ha 
scritto:


This is not tested, but I think it should work

Enable host based access for local connections via the server IP
address in your pg_hba file and use this for all QGIS access, so
you apply the same access approach for both local & remote
connections.


Cheers

Brent Wood

Programme leader: Environmental Information Delivery
NIWA
DDI:  +64 (4) 3860529






Brent Wood
Principal Technician - GIS and Spatial Data Management
Programme Leader - Environmental Information Delivery
T +64-4-386-0529

National Institute of Water & Atmospheric Research Ltd (NIWA)
301 Evans Bay Parade, Greta Point, Wellington
Connect with NIWA: niwa.co.nz Facebook
Twitter
LinkedIn
Instagram


To ensure compliance with legal requirements and to maintain cyber
security standards, NIWA's IT systems are subject to ongoing
monitoring, activity logging and auditing. This monitoring and
auditing service may be provided by third parties. Such third
parties can access information transmitted to, processed by and
stored on NIWA's IT systems.



From: Qgis-user  on behalf of
Laurence Béchet 
Sent: Friday, January 11, 2019 13:04
To: qgis-user@lists.osgeo.org
Subject: [Qgis-user] Project files with local and remote
connections to postgreSQL databases

Hi,

I am having a basic problem with my project files. I usually run qgis
locally, where the PostgreSQL database is. However, sometimes I
need to
have these same projects run on a remote computer (where a version a
qGIS is locally installed, but the connection to the database is
remote). And then the project file 'doesn't work' because the expected
connection to the database is locally not remotely, and I have not
figured out how to modify this parameter when the project is loaded in
qGIS. My current work around is to create a specific project for the
remote computer.

However this solution is annoying when you have plenty of
composers that
you lose in the process ... and playing directly in the xml
project file
is a bit scary ...
Anybody would have an idea how to fix the problem?

Kind regards
Laurence Béchet
ARK IN THE PARK Volunteer Co-Ordinator
Cascades Ranger Station
Falls Road, Waitakere
Phone:  (09) 810 7014

www.arkinthepark.org.nz www.forestandbird.org.nz




___
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




--
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] Project files with local and remote connections to postgreSQL databases

2019-01-11 Thread Andreas Neumann

Hi,

Yes - it is a perfect case for PostgreSQL service definitions.

See 
https://docs.qgis.org/testing/en/docs/user_manual/managing_data_source/opening_data.html#postgresql-service-connection-file


This way you are flexible: you don't connect to a 
hostname/ip/port/database connection but to a service definition - which 
can be managed centrally without having to change the data sources in QGIS.


On different computers and users you can have different service 
defitions (pg_service.conf files) - on one machine pointing to 
"localhost", on another to a "remote host".


That way you can also easily migrate your PostgreSQL server to a 
different hostname or IP without having to change hundreds of QGIS 
projects that point to a fixed hostname.


It is good practice to use PostgreSQL service definitions anyway.

On windows, make sure you use Unix line ending in your service defintion 
file, or you may get troubles using it.


Greetings,

Andreas

Am 11.01.19 um 08:00 schrieb Paolo Cavallini:

Use pg_services.

Il 11 gennaio 2019 01:54:24 CET, Brent Wood  ha 
scritto:


This is not tested, but I think it should work

Enable host based access for local connections via the server IP
address in your pg_hba file and use this for all QGIS access, so
you apply the same access approach for both local & remote
connections.


Cheers

Brent Wood

Programme leader: Environmental Information Delivery
NIWA
DDI:  +64 (4) 3860529






Brent Wood
Principal Technician - GIS and Spatial Data Management
Programme Leader - Environmental Information Delivery
T +64-4-386-0529

National Institute of Water & Atmospheric Research Ltd (NIWA)
301 Evans Bay Parade, Greta Point, Wellington
Connect with NIWA: niwa.co.nz Facebook
Twitter
LinkedIn
Instagram


To ensure compliance with legal requirements and to maintain cyber
security standards, NIWA's IT systems are subject to ongoing
monitoring, activity logging and auditing. This monitoring and
auditing service may be provided by third parties. Such third
parties can access information transmitted to, processed by and
stored on NIWA's IT systems.



From: Qgis-user  on behalf of
Laurence Béchet 
Sent: Friday, January 11, 2019 13:04
To: qgis-user@lists.osgeo.org
Subject: [Qgis-user] Project files with local and remote
connections to postgreSQL databases

Hi,

I am having a basic problem with my project files. I usually run qgis
locally, where the PostgreSQL database is. However, sometimes I
need to
have these same projects run on a remote computer (where a version a
qGIS is locally installed, but the connection to the database is
remote). And then the project file 'doesn't work' because the expected
connection to the database is locally not remotely, and I have not
figured out how to modify this parameter when the project is loaded in
qGIS. My current work around is to create a specific project for the
remote computer.

However this solution is annoying when you have plenty of
composers that
you lose in the process ... and playing directly in the xml
project file
is a bit scary ...
Anybody would have an idea how to fix the problem?

Kind regards
Laurence Béchet
ARK IN THE PARK Volunteer Co-Ordinator
Cascades Ranger Station
Falls Road, Waitakere
Phone:  (09) 810 7014

www.arkinthepark.org.nz www.forestandbird.org.nz




___
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




--
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] Project files with local and remote connections to postgreSQL databases

2019-01-10 Thread Paolo Cavallini
Use pg_services.

Il 11 gennaio 2019 01:54:24 CET, Brent Wood  ha scritto:
>This is not tested, but I think it should work
>
>Enable host based access for local connections via the server IP
>address in your pg_hba file and use this for all QGIS access, so you
>apply the same access approach for both local & remote connections.
>
>
>Cheers
>
>Brent Wood
>
>Programme leader: Environmental Information Delivery
>NIWA
>DDI:  +64 (4) 3860529
>
>
>
>[cid:imagef6a2d5.PNG@d3805356.4e8e0b4a]
>
>
>Brent Wood
>Principal Technician - GIS and Spatial Data Management
>Programme Leader - Environmental Information Delivery
>T +64-4-386-0529
>
>National Institute of Water & Atmospheric Research Ltd (NIWA)
>301 Evans Bay Parade, Greta Point, Wellington
>Connect with NIWA: niwa.co.nz
>Facebook
>Twitter
>LinkedIn
>Instagram
>
>To ensure compliance with legal requirements and to maintain cyber
>security standards, NIWA's IT systems are subject to ongoing
>monitoring, activity logging and auditing. This monitoring and auditing
>service may be provided by third parties. Such third parties can access
>information transmitted to, processed by and stored on NIWA's IT
>systems.
>
>
>
>From: Qgis-user  on behalf of
>Laurence Béchet 
>Sent: Friday, January 11, 2019 13:04
>To: qgis-user@lists.osgeo.org
>Subject: [Qgis-user] Project files with local and remote connections to
>postgreSQL databases
>
>Hi,
>
>I am having a basic problem with my project files. I usually run qgis
>locally, where the PostgreSQL database is. However, sometimes I need to
>have these same projects run on a remote computer (where a version a
>qGIS is locally installed, but the connection to the database is
>remote). And then the project file 'doesn't work' because the expected
>connection to the database is locally not remotely, and I have not
>figured out how to modify this parameter when the project is loaded in
>qGIS. My current work around is to create a specific project for the
>remote computer.
>
>However this solution is annoying when you have plenty of composers
>that
>you lose in the process ... and playing directly in the xml project
>file
>is a bit scary ...
>Anybody would have an idea how to fix the problem?
>
>Kind regards
>Laurence Béchet
>ARK IN THE PARK Volunteer Co-Ordinator
>Cascades Ranger Station
>Falls Road, Waitakere
>Phone:  (09) 810 7014
>
>www.arkinthepark.org.nz www.forestandbird.org.nz
>
>
>
>
>___
>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

-- 
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] Project files with local and remote connections to postgreSQL databases

2019-01-10 Thread Brent Wood
This is not tested, but I think it should work

Enable host based access for local connections via the server IP address in 
your pg_hba file and use this for all QGIS access, so you apply the same access 
approach for both local & remote connections.


Cheers

Brent Wood

Programme leader: Environmental Information Delivery
NIWA
DDI:  +64 (4) 3860529



[cid:imagef6a2d5.PNG@d3805356.4e8e0b4a]


Brent Wood
Principal Technician - GIS and Spatial Data Management
Programme Leader - Environmental Information Delivery
T +64-4-386-0529

National Institute of Water & Atmospheric Research Ltd (NIWA)
301 Evans Bay Parade, Greta Point, Wellington
Connect with NIWA: niwa.co.nz 
Facebook Twitter 
LinkedIn 
Instagram

To ensure compliance with legal requirements and to maintain cyber security 
standards, NIWA's IT systems are subject to ongoing monitoring, activity 
logging and auditing. This monitoring and auditing service may be provided by 
third parties. Such third parties can access information transmitted to, 
processed by and stored on NIWA's IT systems.



From: Qgis-user  on behalf of Laurence 
Béchet 
Sent: Friday, January 11, 2019 13:04
To: qgis-user@lists.osgeo.org
Subject: [Qgis-user] Project files with local and remote connections to 
postgreSQL databases

Hi,

I am having a basic problem with my project files. I usually run qgis
locally, where the PostgreSQL database is. However, sometimes I need to
have these same projects run on a remote computer (where a version a
qGIS is locally installed, but the connection to the database is
remote). And then the project file 'doesn't work' because the expected
connection to the database is locally not remotely, and I have not
figured out how to modify this parameter when the project is loaded in
qGIS. My current work around is to create a specific project for the
remote computer.

However this solution is annoying when you have plenty of composers that
you lose in the process ... and playing directly in the xml project file
is a bit scary ...
Anybody would have an idea how to fix the problem?

Kind regards
Laurence Béchet
ARK IN THE PARK Volunteer Co-Ordinator
Cascades Ranger Station
Falls Road, Waitakere
Phone:  (09) 810 7014

www.arkinthepark.org.nz www.forestandbird.org.nz




___
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] Project files with local and remote connections to postgreSQL databases

2019-01-10 Thread Laurence Béchet

Hi,

I am having a basic problem with my project files. I usually run qgis 
locally, where the PostgreSQL database is. However, sometimes I need to 
have these same projects run on a remote computer (where a version a 
qGIS is locally installed, but the connection to the database is 
remote). And then the project file 'doesn't work' because the expected 
connection to the database is locally not remotely, and I have not 
figured out how to modify this parameter when the project is loaded in 
qGIS. My current work around is to create a specific project for the 
remote computer.


However this solution is annoying when you have plenty of composers that 
you lose in the process ... and playing directly in the xml project file 
is a bit scary ...

Anybody would have an idea how to fix the problem?

Kind regards
Laurence Béchet
ARK IN THE PARK Volunteer Co-Ordinator
Cascades Ranger Station
Falls Road, Waitakere
Phone:  (09) 810 7014

www.arkinthepark.org.nz www.forestandbird.org.nz




___
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