Search code examples
postgisqgis

Can map points be entered in Postgis by clicking on the map in QGIS?


I have a Postgis table of about 200 entries for which I have to enter lat/lon coordinates. I use QGIS to process and display them. Is there a way of clicking at the QGIS map and thereby entering the coordinates into the Postgis table?

I can find the coordinates on the map, copy the coordinates and enter them in the table. But that is a lot of work and it is error prone. I browsed thru all plugins, found the digitizing tools promising but this does not do what I want. I googled this specific question but didn't find a clue.

Is what I want possible at all?


Solution

  • I am rather a noob at gis and qgis so it took me some time before I had the right keywords to search with. And the right keyword for what I want to do apparently is "digitize". What I want is partially possible. Links that helped me are:

    The gist of it is:

    • enable the advance digitizing toolbar: view > toolbars > advanced digitizing toolbar
    • create a new shapefile layer: layer > create new shapefile layer. Don't forget the correct fields, in my case the name of the location. Also try to remember where you store the file (it will be a shapefile), you later need that to import the shapefile into postgis
    • enable the edit state of the current layer, enable the type of shape you want to import. In my case they were points
    • click on each location, a dialog pops up with the attributes you should add
    • later on you should import the shapefile, you need the third link for that together with your memory of where you stored that #$@%$& file