Last active
December 15, 2019 23:08
-
-
Save kevinmcmahon/1584721 to your computer and use it in GitHub Desktop.
Create a PostgreSQL table to hold the Individual_Landmarks.csv data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE landmarks | |
( | |
gid serial NOT NULL, | |
name character varying(50), | |
address character varying(50), | |
date_built character varying(10), | |
architect character varying(50), | |
landmark character varying(10), | |
latitude double precision, | |
longitude double precision, | |
the_geom geometry, | |
CONSTRAINT landmarks_pkey PRIMARY KEY (gid), | |
CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2), | |
CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'POINT'::text OR the_geom IS NULL), | |
CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4326) | |
); | |
CREATE INDEX landmarks_the_geom_gist | |
ON landmarks | |
USING gist | |
(the_geom ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I agree with atiwari87: in fact, when importing data from csv file, postgres says these columns are missing