Skip to content

Commit

Permalink
SRID conversion script
Browse files Browse the repository at this point in the history
  • Loading branch information
rghunter committed Sep 28, 2015
1 parent ae23e6a commit b6ce4e8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions srid_conversion.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
drop index if EXISTS gtfs_shapes_geom_gem;
drop index if EXISTS gtfs_shapes_gem;
drop index if EXISTS gtfs_stops_gem;

ANALYZE;

alter table gtfs_shapes ALTER COLUMN the_geom type geometry(Point, 900913) using ST_Transform(ST_SetSRID(the_geom,4326),900913);
alter table gtfs_stops ALTER COLUMN the_geom type geometry(Point, 900913) using ST_Transform(ST_SetSRID(the_geom,4326),900913);
alter table gtfs_shape_geoms ALTER COLUMN the_geom type geometry(LineString, 900913) using ST_Transform(ST_SetSRID(the_geom,4326),900913);

create index gtfs_shapes_geom_gem on gtfs_shape_geoms using GIST (the_geom);
create index gtfs_shapes_gem on gtfs_shapes using GIST (the_geom);
create index gtfs_stops_gem on gtfs_stops using GIST (the_geom);

ANALYZE;

0 comments on commit b6ce4e8

Please sign in to comment.