-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
postGIS vector input example/setup #12
Comments
The syntax in the example is correct, though there's clearly room for improvement in the documentation. It's also possible to write outputs to Postgres, although there is apparently not the option to choose the table name at this point. (It's If you upgrade GDAL you'll need to rebuild this package, but there's no reason it won't work with 3.x. As to your Docker question, you should just be able to do |
@dbaston thank you for the response. I see, I did initially apply the logic in the documentation. For postgreSQL inputs for exactextract, I didn't know whether to apply the other declarations such as user and password, so I tried both with and without; I'm performing multiple zonal statistics, so the "output" table name is not helpful. Overall, exporting the vector tables as shapefiles (as the input vector source for the exactextract function) and exporting the zonal statistics to csv is not a problem but adding I/O directly with postgreSQL would be a nice addition to exactextract. |
Thanks both @dbaston @tastatham for this thread. I also get the same |
Resolve isciences/exactextractr#12 See merge request isciences/exactextractr!23
Thanks for posting this! How did you end up incorporating the query? I'm finding as @dbason points out that the -sql flag isn't interpreted -- it throws an error since it thinks it's the -s flag. Thanks for any help! |
I simply opted for exporting the PostgreSQL table to CSV as inputs for exactextract, and then imported the csv result back into PostgreSQL. Things may have changed since the last time I tried this? |
@dankovacek you could put the query into a VRT file and point to that with |
Firstly, thank you for this package. This is exactly what I was looking for!
I have successfully ran the tool using shapefiles but I would prefer to load the vector sources from a postgreSQL/postGIS database. However, I am finding it difficult to define the postGIS vector sources. The structure in the package README.md is somewhat different to the OGR documentation;
According to OGR documentation, referencing a postGIS vector source goes something like;
For example, I have tried;
This results in an error message;
A quick google and this seems to be an (classic!) issue with GDAL. My setup is based on;
ubuntu 18.04, postgreSQL 12, postgis 3, GDAL 2.2.3, released 2017/11/20
I updated my GDAL using the ubuntugis-unstable package
This gives me GDAL 3.0.4, released 2020/01/28 but has broken my postgreSQL/postGIS setup, in addition to this package;
Consequently, I downgraded GDAL back to GDAL 2.2.3 for my setup.
I can see you have a Docker image setup for this package, do you have any recommendations with what postgreSQL/postgis setup that is compatible with this particular package?
The text was updated successfully, but these errors were encountered: