[postgis-users] Beginning in PostGIS
Luciano
br.analistagis at gmail.com
Sat Apr 18 08:39:37 PDT 2015
Hi,
I wonder how can I update a postgresql postgis database before the
following scenario:
Always worked with shape files and update them used copy / paste between
files.
Now, think about creating a database in PostgreSQL and would like to
continue using copy / paste to update polygons, but in my database
structure is different from the shape file. For example:
Imagine that the shapefile have all the fields in one table, already in the
database, by reason of standardization, have these columns in tables
distinct. Below is an example of a register of towns.
File shape, columns:
town code;
town description;
Neighborhood code;
name of the neighborhood;
block code;
Street code;
street name;
In Postgres / Gis could look like this:
Cities table (data):
- Town id
- Description of town
Neighborhoods table (data):
- Id of the neighborhood
- Description of the neighborhood
- Id of town (foreign key)
Blocks table:
- Id of the court
- Block of code
- Town id (foreign key)
- Geometry, polygon
Streets table:
- Street id
- Street name
- Town id (foreign key)
- Geometry, line
How could update (insert) a block in postgresql table using copy / paste
the shape file?
Would have to create a trigger/procedure (instead of) to automate the
process?
Fields of shape file should be equal to the fields of database table?
Some practical example as a reference?
tia
--
Luciano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150418/4458d005/attachment.html>
More information about the postgis-users
mailing list