-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Processing] A new tool to import data in PostGIS based on ogr2ogr and a... #1674
Conversation
…d a few other ogr related fixes
Merged |
@gioman This is really nice. The only thing I see missing from the existing "Import Into PostGIS" algorithm is the option to drop the length constraints on columns. This could be done using ogr2ogr with the -unsetFieldWidth flag and the PRECISION=NO layer creation option. The only other thing missing is that the existing option gives a list of fields to choose from for an existing primary key field. |
Hi Nyall, I filed a ticket for the first request http://hub.qgis.org/issues/11749 I'm not sure I have understand the second one. Cheers! |
@gioman - if you run the older "Import into PostGIS" algorithm, the "Primary key field" setting is a combo box containing all the fields in the original layer. The newer import algorithm just has a text field for Primary Key, which isn't as handy as the combo box. |
ok, I should be able to add this option too. |
@gioman |
@gioman |
tool for geometryless tables #1862 |
@gioman very cool, thanks a lot :) |
... few other ogr related fixes.
None of the tools available in QGIS (SPIT, DB Manager, drag and drop in Browser, the tool already available in Processing) to allow users import data into PostGIS is very efficient, to tell the truth are pretty slow and they lack many important options (for example the one to append to existing tables). Command line tools are available and rich of options and switches to allow boost importing speed especially of very large vectors.
See
https://doublebyteblog.wordpress.com/2014/08/06/importing-large-spatial-dataset-into-postgis/comment-page-1/#comment-123
for an example.
While the solution based on shp2pgsql/psql requires to install them, as they are not part of the standard QGIS installation, ogr2ogr is part of any QGIS installation and therefore a Processing tool based on it will be added with this pull request. And the tool is several times faster than any other alternative available in QGIS.