I want to copy a Postgis or Spatialite DB sctructure (features, tables) to a blank DB. In ArcGIS i can easily handle it by using XML Workspace Document. Fisrtly extact it from a Geodatabase and than import it to blank/empty/new whatever you say. By the way the stucture of first DB copied to second DB (without data). Features (point, line, polygon etc), tables comes with this XML document. So how can i do this for Postgis or Spatialite DBs (opensource dbs). (I dont want data just structure.)
Tell me more
×
Geographic Information Systems Stack Exchange is a question and answer site for
cartographers, geographers and GIS professionals. It's 100% free, no registration required.
|
|
In spatialite, you could just make a copy of the sqlite file, then open it up, and drop all data from all tables. (and run vacuum full afterwards) |
|||
|
|
|
For Postgres use pg_dump writes a dump file which can be transferred to whatever computer you want and then be read back in with |
|||
|
|
|
For sqlite/spatialite you may want to try SELECT sql FROM sqlite_master; and redirect the output to a sql-script (text) file. Afterwards you can run the script to create a new database. I have not tried it, though |
|||
|
|