[postgis-users] how to handle table

TECHER David davidtecher at yahoo.fr
Fri Aug 4 03:50:20 PDT 2006


Hi gates,

Suppose that your table for pointcity+pointcountry = pointall

psql -d <your_database> -U <your_user> -c "DROP TABLE pointcity,
pointcountry"

shp2pgsql pointcity.shp public.pointall | psql <your_database>

then

shp2pgsql -a pointcountry.shp public.pointall | psql <your_database>

N.B: do "shp2pgsql --help" to see the option "-a" ;-) ==> shp2pgsql will
add the contents of your second shapefile in the table!


psql -d <your_database> -U <your_user> -c "CREATE INDEX pointall_gist on
pointall using gist(the_geom gist_geometry_ops);VACUUM ANALYZE"

gates jr a écrit :

> I have 2 tables from shp file named poincity, pointcountry
> 1. Each table consist of hundred thousand points
> 2. Both have the same column (gid, name, …., the_geom)
> I want to create a new table that include all row in pointcity and
> pointcountry with the same column (gid, name, …., the_geom).
> I try to use query
> /
> select * from pointcity, pointcountry --- I thought it wasn’t valid
> /
> What’s the right query to create that table?
> Thanks
>
> ------------------------------------------------------------------------
> Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great
> rates starting at 1¢/min.
> <http://us.rd.yahoo.com/mail_us/taglines/postman7/*http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com>
>
>
>
> <http://us.rd.yahoo.com/mail_us/taglines/postman7/*http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com>
>------------------------------------------------------------------------
>
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users
> <http://us.rd.yahoo.com/mail_us/taglines/postman7/*http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com>
>


	

	
		
___________________________________________________________________________ 
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! 
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences. 
http://fr.answers.yahoo.com 




More information about the postgis-users mailing list