-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlog.out
275 lines (256 loc) · 9.03 KB
/
log.out
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
Archive: gtfs.zip
inflating: agency.txt
inflating: calendar.txt
inflating: routes.txt
inflating: stops.txt
inflating: stop_times.txt
inflating: transfers.txt
inflating: trips.txt
inflating: links.txt
inflating: feed_info.txt
DROP TABLE IF EXISTS ukrail_agency;
DROP TABLE
DROP TABLE IF EXISTS ukrail_stops;
DROP TABLE
DROP TABLE IF EXISTS ukrail_routes;
DROP TABLE
DROP TABLE IF EXISTS ukrail_trips;
DROP TABLE
DROP TABLE IF EXISTS ukrail_stop_times;
DROP TABLE
DROP TABLE IF EXISTS ukrail_stopsgeom;
DROP TABLE
DROP TABLE IF EXISTS ukrail_lines;
DROP TABLE
DROP TABLE IF EXISTS ukrail_lines_trips;
DROP TABLE
DROP TABLE IF EXISTS ukrail_lines_exploded;
DROP TABLE
DROP TABLE IF EXISTS ukrail_lines_segments;
DROP TABLE
DROP TABLE IF EXISTS ukrail_lines_final_old;
DROP TABLE
DROP TABLE IF EXISTS ukrail_distinct_agencies;
DROP TABLE
DROP TABLE IF EXISTS ukrail_distinct_agencies_parent;
DROP TABLE
DROP TABLE IF EXISTS ukrail_distinct_parent;
DROP TABLE
CREATE TABLE ukrail_agency
(
agency_id character varying,
agency_name character varying,
agency_url character varying,
agency_timezone character varying,
agency_lang character varying,
agency_phone character varying
);
CREATE TABLE
CREATE TABLE ukrail_routes
(
route_id character varying,
agency_id character varying,
route_short_name character varying,
route_long_name character varying,
route_type character varying
);
CREATE TABLE
CREATE TABLE ukrail_trips
(
route_id character varying,
service_id character varying,
trip_id integer,
wheelchair_accessible character varying,
bikes_allowed character varying,
train_uid character varying,
train_status character varying,
train_category character varying,
train_identity character varying,
headcode character varying,
train_service_code character varying,
portion_id character varying,
power_type character varying,
timing_load character varying,
speed character varying,
oper_chars character varying,
train_class character varying,
sleepers character varying,
reservations character varying,
catering character varying,
service_branding character varying,
stp_indicator character varying,
uic_code character varying,
atoc_code character varying,
applicable_timetable character varying
);
CREATE TABLE
CREATE TABLE ukrail_stop_times
(
trip_id integer,
arrival_time character varying,
departure_time character varying,
stop_id character varying,
stop_sequence integer,
pickup_type character varying,
drop_off_type character varying,
wtt_arrival_time character varying,
wtt_departure_time character varying,
platform character varying,
line character varying,
path character varying,
activity character varying,
engineering_allowance character varying,
pathing_allowance character varying,
performance_allowance character varying
);
CREATE TABLE
\copy ukrail_agency FROM 'agency.txt' DELIMITER ',' CSV HEADER;
\copy ukrail_routes FROM 'routes.txt' DELIMITER ',' CSV HEADER;
\copy ukrail_trips FROM 'trips.txt' DELIMITER ',' CSV HEADER;
\copy ukrail_stop_times FROM 'stop_times.txt' DELIMITER ',' CSV HEADER;
vacuum analyze ukrail_agency;
VACUUM
vacuum analyze ukrail_stops;
VACUUM
vacuum analyze ukrail_routes;
VACUUM
vacuum analyze ukrail_trips;
VACUUM
vacuum analyze ukrail_stop_times;
VACUUM
CREATE TABLE ukrail_distinct_agencies AS
SELECT DISTINCT ukrail_agency.agency_name
FROM ukrail_agency;
SELECT 30
vacuum analyze ukrail_distinct_agencies;
VACUUM
CREATE TABLE ukrail_distinct_agencies_parent AS
SELECT ukrail_distinct_agencies.agency_name, ukrail_manual_agency_parent.parent_company
FROM ukrail_distinct_agencies, ukrail_manual_agency_parent
WHERE ukrail_distinct_agencies.agency_name = ukrail_manual_agency_parent.agency_name;
SELECT 30
vacuum analyze ukrail_distinct_agencies_parent;
VACUUM
CREATE TABLE ukrail_distinct_parent AS
SELECT DISTINCT ukrail_manual_agency_parent.parent_company
FROM ukrail_manual_agency_parent;
SELECT 13
vacuum analyze ukrail_distinct_parent;
VACUUM
CREATE TABLE ukrail_stopsgeom AS
SELECT ukrail_stop_times.trip_id, ukrail_stop_times.stop_id, ukrail_stop_times.stop_sequence, ukrail_stops.geom, ukrail_stops.stop_name
FROM ukrail_stops, ukrail_stop_times
WHERE ukrail_stops.stop_id = ukrail_stop_times.stop_id;
SELECT 2746414
vacuum analyze ukrail_stopsgeom;
VACUUM
CREATE TABLE ukrail_lines AS
SELECT stops.trip_id, ST_MakeLine(stops.geom ORDER BY stop_sequence) As geom
FROM ukrail_stopsgeom As stops
GROUP BY stops.trip_id;
SELECT 244137
CREATE INDEX ukrail_lines_geom_gist ON ukrail_lines USING GIST ( geom );
CREATE INDEX
vacuum analyze ukrail_lines;
VACUUM
CREATE TABLE ukrail_lines_trips AS
SELECT DISTINCT
ukrail_lines.geom, ukrail_routes.route_long_name, ukrail_agency.agency_name
FROM
ukrail_lines,
ukrail_trips,
ukrail_routes,
ukrail_agency
WHERE
ukrail_lines.trip_id = ukrail_trips.trip_id
AND
ukrail_trips.route_id = ukrail_routes.route_id
AND
ukrail_routes.agency_id = ukrail_agency.agency_id
AND
route_type IN ('0','1','2','4','5','6');
SELECT 4808
vacuum analyze ukrail_lines_trips;
VACUUM
CREATE TABLE ukrail_lines_exploded AS
SELECT ukrail_lines_trips.agency_name,
(ST_GetVectorSQL(ukrail_lines_trips.geom)).*
FROM ukrail_lines_trips;
SELECT 50298
vacuum analyze ukrail_lines_exploded;
VACUUM
CREATE TABLE ukrail_lines_segments AS
SELECT DISTINCT agency_name, ST_SetSRID(ST_MakeLine(ST_MakePoint((startcoord).x,(startcoord).y)::geometry,ST_MakePoint((endcoord).x, (endcoord).y)::geometry),4326) as geom
From ukrail_lines_exploded;
SELECT 4846
vacuum analyze ukrail_lines_segments;
VACUUM
ALTER TABLE IF EXISTS ukrail_lines_final RENAME TO ukrail_lines_final_old;
ALTER TABLE
CREATE TABLE ukrail_lines_final AS
SELECT ukrail_lines_segments.agency_name, ukrail_manual_agency_parent.parent_company, ukrail_lines_segments.geom
FROM
ukrail_lines_segments, ukrail_manual_agency_parent
WHERE
ukrail_lines_segments.agency_name = ukrail_manual_agency_parent.agency_name;
SELECT 4846
vacuum analyze ukrail_lines_final;
VACUUM
\copy (SELECT * FROM ukrail_distinct_agencies) TO 'ukrail_distinct_agencies.csv' DELIMITER ',' CSV;
\copy (SELECT * FROM ukrail_distinct_agencies_parent ORDER BY agency_name) TO 'ukrail_distinct_agencies_parent.csv' DELIMITER ',' CSV HEADER;
\copy (SELECT * FROM ukrail_distinct_parent) TO 'ukrail_distinct_parent.csv' DELIMITER ',' CSV;
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
layer names ignored in combination with -sql.
Input file is agencies
Input file is parent
Input file is agencies
Input file is parent
/bin/cp: omitting directory ‘/var/www/ukrailmap.co.uk/html/agencies_js’
/bin/cp: omitting directory ‘/var/www/ukrailmap.co.uk/html/css’
/bin/cp: omitting directory ‘/var/www/ukrailmap.co.uk/html/dynamic_js’
/bin/cp: omitting directory ‘/var/www/ukrailmap.co.uk/html/js’
/bin/cp: omitting directory ‘/var/www/ukrailmap.co.uk/html/parent_js’
/bin/cp: omitting directory ‘/var/www/ukrailmap.co.uk/html/static_js’
/bin/rm: cannot remove ‘/var/www/ukrailmap.co.uk/html/css/images’: Is a directory