add missing column
This commit is contained in:
parent
22f3773632
commit
239b1db0f0
@ -23,13 +23,15 @@ echo "Loading Open TOID CSV(s) to temporary table..."
|
||||
find $opentoid_dir -type f -name '*.csv' \
|
||||
-printf "$opentoid_dir/%f\n" | \
|
||||
parallel \
|
||||
cat {} '|' psql -c "\"COPY open_toid ( toid, version_number, version_date, easting, northing ) FROM stdin WITH CSV HEADER;\""
|
||||
cat {} '|' psql -c "\"COPY open_toid ( toid, version_number, version_date, source_product, easting, northing ) FROM stdin WITH CSV HEADER;\""
|
||||
|
||||
# Convert the northing/easting coordinates to latitude/longitute with PostGIS
|
||||
psql -c "update open_toid set the_geom=GeomFromText('POINT('||easting||' '||northing||')',27700);"
|
||||
psql -c "update open_toid set longitude=st_x(st_transform(the_geom,4326)), latitude=st_y(st_transform(the_geom,4326));"
|
||||
|
||||
# Update the buildings table with coordinates
|
||||
# psql -c ""
|
||||
|
||||
|
||||
# Delete the temporary table
|
||||
# Delete the temporary table
|
||||
# psql -c "DROP TABLE open_toid;"
|
Loading…
Reference in New Issue
Block a user