Closed JoanViana closed 5 years ago
Hi @JoanViana , thanks for trying out the package.
This turned out to a be a bug in the test for multi-polygons; it was counting any polygon with a "hole" as a multi-polygon, and thus setting the database table to be multi-polygons as well. The error happens when you try to insert single polygons (without holes) into that table.
A bugfix is applied in dev
, install with:
devtools::install_github("mablab/rpostgis", ref = "dev")
I haven't tested extensively so let me know if you have additional issues.
Hi @dnbucklin, many thanks for that very quick reply.
I have inserted 260k polygons using dev
branch (where bugfix is applied) and everything works perfectly!
Congratulations for the wonderful work you are doing!
Thanks, good to hear that it's working!
Hi,
Using the command
pgInsert
I easily create (the table did not exist previously) a table with geom type MultiPolygons (pgi data can be found here) on the database. However, when I perform the same command to insert new polygons (pgi data can be found here), from same source but different extension, it gives me this error:There must be a solution using sf package or RPostgreSQL package, but I would appreciate if it can be solved with this excellent interface, directly from sp Spatial Data.
Command I used to perform both inserts is:
The sources (shape format) can be found here: Valencia_Trees.zip
Thanks in advance!