Está en la página 1de 2

Comandos SQL

cd..

cd C:\Program Files\PostgreSQL\12\Bin

C:\Program Files\PostgreSQL\12\bin>shp2pgsql

C:\Program Files\PostgreSQL\12\bin>shp2pgsql -s 4326 -I -W LATIN1


C:\Datos\Capas\Ciudades_Mundo.shp

C:\Program Files\PostgreSQL\12\bin>shp2pgsql -s 4326 -I -W LATIN1 C:\Datos\Ciudades_Mundo.shp


public.ciudades>ciudades.sql

shp2pgsql -s 4326 -I -W LATIN1 C:\Datos\Ciudades_Mundo.shp public.ciudades>ciudades.sql

shp2pgsql -s 4326 -I -W LATIN1 D:\universidad\Sig 2\webmapping\Datos\Capas\Ciudades_Mundo.shp


public.ciudades>ciudades.sql

ciudades.sqlpsql -d world -h localhost -U postgres -p5432 -f ciudades.sql

ciudades.sqlpsql -d cuidades -h localhost -U postgres -p5432 -f ciudades.sql

123456

psql -d cuidades -h localhost -U postgres -p5432 -f ciudades.sql

CREATE TABLE puntos ( id int4 primary key, name varchar(50), geom geometry(POINT,4326) );

CREATE TABLE Rutas ( id int4 primary key, name varchar(50), geom geometry(LINESTRING,4326) );

INSERT INTO puntos(id, geom, name) VALUES(1,ST_GeomFromText('POINT(-0.1257


51.508)',4326),'London, England');

INSERT INTO puntos(id, geom, name) VALUES(2,ST_GeomFromText('POINT(-81.233


42.983)',4326),'London, Ontario');

INSERT INTO lineas(id, geom, name) VALUES(1,ST_GeomFromText('linestring(-0.1257 51.508,-81.233


42.983)',4326),'London, Ontario');

También podría gustarte