<div dir="ltr">Ok, <br><br><span id="result_box" class="" lang="en"><span class="">I have</span> <span class="">a shape file</span> <span class="">with the following structure</span><span>.</span></span><br><div><br>Shape file, columns:<br>town ​​code;<br>town description;<br>Neighborhood code;<br>name of the neighborhood;<br>block code;<br>Street code;<br>street name;<br><br><span id="result_box" class="" lang="en"><span class="">Using the How to Copy</span> <span class="">/ paste</span> a geometry from<span class=""> shape file</span> to <span class="">postgis</span><span> with follow structure:</span></span><br><br>Cities table (data):<br>- Town id<br>- Description of town<br><br>Neighborhoods table (data):<br>- Id of the neighborhood<br>- Description of the neighborhood<br>- Id of town (foreign key)<br><br>Blocks table:<br>- Id of the court<br>- Block of code<br>- Town id (foreign key)<br>- Geometry, polygon<br><br>Streets table:<br>- Street id<br>- Street name<br>- Town id (foreign key)<br>- Geometry, line<br><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-18 13:36 GMT-03:00 Rémi Cura <span dir="ltr"><<a href="mailto:remi.cura@gmail.com" target="_blank">remi.cura@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">maintaining your data model is easy to do with triggers.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">About copy / past.<br>Sorry this just doesn't make much sense to me.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">You can import shapefile into postgres if it is the question.</div><div class="gmail_default" style="font-family:monospace,monospace">You can also use trigger on the import table to fill you rmodel with the imported data.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Cheers,<br></div><div class="gmail_default" style="font-family:monospace,monospace">Rémi-C</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2015-04-18 17:39 GMT+02:00 Luciano <span dir="ltr"><<a href="mailto:br.analistagis@gmail.com" target="_blank">br.analistagis@gmail.com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><br clear="all">Hi,<br>I wonder how can I update a postgresql postgis database before the following scenario:<br>Always worked with shape files and update them used copy / paste between files.<br>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:<br>Imagine that the shapefile have all the fields in one table, already in the database, by reason of standardization, have these columns in tables<br>distinct. Below is an example of a register of towns.<br><br>File shape, columns:<br>town ​​code;<br>town description;<br>Neighborhood code;<br>name of the neighborhood;<br>block code;<br>Street code;<br>street name;<br><br>In Postgres / Gis could look like this:<br><br>Cities table (data):<br>- Town id<br>- Description of town<br><br>Neighborhoods table (data):<br>- Id of the neighborhood<br>- Description of the neighborhood<br>- Id of town (foreign key)<br><br>Blocks table:<br>- Id of the court<br>- Block of code<br>- Town id (foreign key)<br>- Geometry, polygon<br><br>Streets table:<br>- Street id<br>- Street name<br>- Town id (foreign key)<br>- Geometry, line<br><br>How could update (insert) a block in postgresql table using copy / paste the shape file?<br>Would have to create a trigger/procedure (instead of) to automate the process?<br>Fields of shape file should be equal to the fields of database table?<br>Some practical example as a reference?<br><br></div>tia<span><font color="#888888"><br><div><div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div>Luciano<br></div><br></div></div></div></div>
</div></div></font></span></div>
<br></div></div><span class="">_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></span></blockquote></div><br></div>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Luciano<br></div><br></div></div></div></div>
</div>