Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

562
Views
PostgreSQL/PostGIS: shp2pgsql INSERT en lugar de crear una nueva tabla

Hola, soy muy nuevo en PostgreSQL/PostGIS y acabo de aprender cómo convertir Shapefiles en un archivo SQL e importarlo a PostGIS usando shp2pgsql siguiendo este tutorial. Lo que noté es que cada vez que convierto un Shapefile, genera un archivo SQL que tiene una instrucción CREATE TABLE. Ahora mi pregunta es, ¿hay alguna manera o es posible INSERTAR un nuevo Shapefile (con un nuevo conjunto de capas) en una tabla existente en lugar de crear una nueva?

Espero haberlo explicado bien. Gracias.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Puede usar la opción de agregar en su línea de comando. Me gusta esto:

 .\shp2pgsql.exe -c -I -g "geom" fistShpFile.shp .\shp2pgsql.exe -a -g "geom" nextShpFile.shp .\shp2pgsql.exe -a -g "geom" nextShpFile.shp ...
 (-d|a|c|p) These are mutually exclusive options: -d Drops the table, then recreates it and populates it with current shape file data. -a Appends shape file into current table, must be exactly the same table schema. -c Creates a new table and populates it, default if you do not specify any options. -p Prepare mode, only creates the table.

http://www.bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg

¿O usar shp2pgsql -? para otras opciones.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!