Skip to content
Prev 10153 / 29559 Next

Appending data to PostGIS layer

Mauro,
On 30/11/2010, at 5:56 AM, Mauro Rossi wrote:

            
If you already have the spatial data in the database, and some key attribute which is common between the two (ie province name or code) just use normal SQL to achieve this - use ALTER TABLE to ADD the required columnsand UPDATE based on the common attribute. 

The advantage to doing this in R is maybe looping to cover all tables, using read.table to load the txt file  - you can make it as complex as you want after that!!

look at library(RPostgreSQL) if you don't already have it.

cheers

Ben