wiki:ImportContent

back to - https://it-dev.mpiwg-berlin.mpg.de/tracs/GIS/wiki/SystInst System Installation

Import of Content-Data into PostGIS

FrameMaker-Tables

  • Export the table with FrameMaker to *.csv with "UTF-16"
  • Open the *.csv in TextWrangler, save with "UTF-8"
  • copy the following sql-Script to pgAdmin3 and run it there

or
save the script as <*.sql>, open the directory in a terminal and run it with:

  Developer/usr/local/pgsql/bin/psql -f <*.sql> -d <databasename>

!! All the attributes will be of type "text" (for now), as in some datasets the dates are empty and PostgreSQL does not like this !!

-- Table: craftsmanlabels

DROP TABLE craftsmanlabels;

CREATE TABLE craftsmanlabels
(
  id SERIAL, 
  "callno" text,
  "object" text,
  "kind" text,
  "title" text,
  "dynasty" text,
  "reign period" text,
  "production begin year" text,
  "production end year" text,
  "found place" text,
  "found province" text,
  "found date" text,
  "production place" text,
  "production place GIS id" text,
  "accuracy of gis id" text,
  "production institution" text,
  "inscription chinese" text,
  "inscription pinyin" text,
  "inscription translation" text,
  "position" text,
  "remark" text,
  "inscription type" text,
  CONSTRAINT id PRIMARY KEY (id)
)
WITH (OIDS=FALSE);
ALTER TABLE craftsmanlabels OWNER TO postgres;

COPY craftsmanlabels(
            "callno", "object", "kind", "title", "dynasty", "reign period", "production begin year", 
            "production end year", "found place", "found province", "found date", 
            "production place", "production place GIS id", "accuracy of gis id", 
            "production institution", "inscription chinese", "inscription pinyin", 
            "inscription translation", "position", "remark", "inscription type")
    FROM '/Users/fknauft/Projekt/RawData/craftsmanlabels1.csv' WITH CSV 
    FORCE NOT NULL "production begin year", "production end year", "found date";

Single Datasets via WebBrowser-based Entry-Mask

http://culhis.mpiwg-berlin.mpg.de/doku.php/gis/craftman_labels_project:craftsman_label_project Craftsman labels

Last modified 14 years ago Last modified on Feb 3, 2010, 1:00:53 PM