QGIS User 0053 - PostGIS for QGIS and QField

Sdílet
Vložit
  • čas přidán 23. 07. 2024
  • Setting up authentication for PostGIS on QGIS and transfer it to QField for seamless data editing between the field and the office.
    The "key" thing is to coordinate the names for your database authentications between all users. In the video I show how you can "share" the exact same configuration between desktop and field application, but as long as the authentication id is called the same you can have individual credentials in the authentication configurations.
  • Věda a technologie

Komentáře • 29

  • @jeremyferris7573
    @jeremyferris7573 Před měsícem

    Since interning at Kartoza, I have seen the beauty of well thought out data structures to keep larger projects organized and collecting various types of geometric and non-geometric data. I have been using QField and doing cloud syncs and direct file transfers to my devices which is a bit of a pain and problematic for data collection with multiples of the same id's from different devices, etc. that have to be figured out when you bring things back together to the main project. This is a simple and elegant solution to that problem. Thanks for the demo.

  • @SeqLaz
    @SeqLaz Před 8 měsíci

    Really thank you!!!..... Best wishes for you!

  • @gokhanozdogan2867
    @gokhanozdogan2867 Před 8 měsíci +1

    Master, appreciate your efforts🙏 could you please stream a video for publishing to web map service with layers pane, as well? Having troubles on styling and crs compatibility, too much.

  • @zakimoussa1071
    @zakimoussa1071 Před 7 měsíci +1

    Is it possible to use this method without an internet connection, since I sometimes work in places without an internet connection. Or do you know of any other method to solve the problem of these kinds of situations.

    • @KlasKarlsson
      @KlasKarlsson  Před 7 měsíci

      If you risk going off-line, you will need a solution that works off-line. That means storing and working with files and databases that are on your local device. Your best option is to build a project using a GeoPackage (you can export a subset of the data from PostGIS in QGIS). You can then merge the collected data with the online database back at the office in QGIS where you have a more stable connection to the PostGIS database.

  • @mathiascunault2972
    @mathiascunault2972 Před měsícem

    5:11 why allowing "saving/loading QGIS projects in the database" ?

  • @zakimoussa1071
    @zakimoussa1071 Před 8 měsíci +1

    I used your method but the postgresql database i use is a local network so when i go to the field to collect data since i'm not using my local network, i can't access the database. So could you please help me solve this problem.

    • @KlasKarlsson
      @KlasKarlsson  Před 8 měsíci

      I have the same situation. I use a VPN in my mobile device to "tunnel" into my local network first. Then I can connect to PostGIS as if I were physically on the local network. Setting up a VPN is done in your firewall or router, as long as it supports it. If you don't want to use a VPN you can create port forwarding in the firewall/router that converts calls on a certain port on the WAN address to a local port on your internal LAN.
      Options:
      - VPN on mobile device to connect to the LAN
      - Port forwarding in the router to translate calls on the WAN port to LAN

    • @zakimoussa1071
      @zakimoussa1071 Před 8 měsíci

      Thank you for your help @@KlasKarlsson

  • @zakimoussa1071
    @zakimoussa1071 Před 8 měsíci

    Is it possible that the mobile device's operating system could protect auth.xml ?

    • @KlasKarlsson
      @KlasKarlsson  Před 8 měsíci

      If you can't unlock the mobile device, it will be really hard to access files on the device.

    • @zakimoussa1071
      @zakimoussa1071 Před 8 měsíci

      Thank you for your helps @@KlasKarlsson

  • @zakimoussa1071
    @zakimoussa1071 Před 8 měsíci

    how I could encrypt the username and password for authentication.

    • @KlasKarlsson
      @KlasKarlsson  Před 8 měsíci +1

      You will need another way of authentication than Basic username and password. If you use SSL to connect and have your Postresql set to md5 you should be fine. If you like me use a VPN to connect, you are also pretty secure. The only point of vulnerability is the auth.xml file that is protected by the mobile device operating system. Also the PostgreSQL user can only access the database since usernames are separated from the server OS.

  • @ianvillar3191
    @ianvillar3191 Před 8 měsíci

    Is authentication required when the host is local only?

    • @KlasKarlsson
      @KlasKarlsson  Před 8 měsíci

      It all depends on your PostGIS server. It really doesn't matter if it is local or hosted in the cloud, or somewhere else. You probably SHOULD use authentication in some form.

    • @ianvillar3191
      @ianvillar3191 Před 8 měsíci

      Hi again. Thank you for your response! I'd like to ask, i transferred the QGIS project to my tablet and followed the instructions you mentioned and inserted the auth file inside the ch.opengis QField folder. However, I am having trouble opening it. It says it cant access my postgis server. Would glad to hear your advice on this, man. Thanks!

    • @KlasKarlsson
      @KlasKarlsson  Před 8 měsíci

      @@ianvillar3191
      Try a Postgresql App (like Postgres Client by Rafael Silva) where you can enter your credentials manually. If that doesn't work either it might be a networking issue where you don't have logical access to the server. I use a VPN on my mobile devise to connect through the firewall connecting to my server like I was on the local network. (Also make sure your credential file is in the "auth" folder on your device, AND that you restart QField.)

    • @johndilinller9672
      @johndilinller9672 Před 8 měsíci

      Any suggestions for VPN app for Android?

    • @KlasKarlsson
      @KlasKarlsson  Před 8 měsíci +1

      @@johndilinller9672 OpenVPN Connect

  • @boskobuha8523
    @boskobuha8523 Před 8 měsíci

    Is this data shared via localhost or webhost?

    • @KlasKarlsson
      @KlasKarlsson  Před 8 měsíci +2

      My server is on a local network inside my firewall. QField clients need to access through VPN, which is a bit more secure than just opening a port in the firewall.

    • @boskobuha8523
      @boskobuha8523 Před 8 měsíci +4

      @@KlasKarlsson Thanks, it would be really good if you could make a video on how to do it via webhost

    • @johndilinller9672
      @johndilinller9672 Před 8 měsíci

      Great job .could you please someday make a video of how to do this, the VPN to accces the local network so It can be. Acceded from anywhrere

  • @gabde5458
    @gabde5458 Před 6 měsíci

    Good evening Klas. I loved your video and would like to replicate it with several users, however I am completely unaware of how it works with PostGis and the VPN connection. Could you take pity and make an example from scratch, for us mere mortals, please? I also see that several have problems connecting the information and you indicate that it is done on a local network by VPN (I don't know what that is), could you also show us, please. Thanks a lot.