Permalink
Browse files

Add Shapefile, GeoJSON, and TopoJSON geodata

  • Loading branch information...
herrstucki committed Feb 7, 2013
1 parent e721a46 commit 2fe77e36374afd33fbb618d630c5c77d9e2aae8c
@@ -1,6 +1,13 @@
Transports publics genevois (tpg, or Geneva Public Transport) is public transport authority for the larger Geneva region. It helps manage mobility throughout the France-Vaud-Geneva metropolitan area, offering a range of top-quality services with due regard for sustainable development principles. All tpg activities aim at excellence in the service of the community, on the basis of a contract for the supply of services renegotiated every four years with the State of Geneva.
The network's routes and stops are both available as KML files, and best viewed in Google Maps. The daily schedule, real time arrival, and passenger counts for Oct 1 to 7 are provided in one big comma separated file.
The network's routes and stops are available as
* KML (best viewed in Google Maps)
* ESRI Shapefile
* GeoJSON
* [TojoJSON](https://github.com/mbostock/topojson/)
The daily schedule, real time arrival, and passenger counts for Oct 1 to 7 are provided in one big comma separated file.
# Data description
@@ -0,0 +1,24 @@
desc "Generate GeoJSON files"
task :geojson do
rm Dir.glob("geojson/*.*json")
puts "Converting Routes ..."
system "ogr2ogr -f geoJSON 'geojson/routes.json' 'shp/routes.shp' -sql \"SELECT networkCod AS networkCode, routeCode, routeDirec AS routeDirection, routeDesti AS routeDestination FROM 'routes'\""
puts "Converting Stops ..."
system "ogr2ogr -f geoJSON 'geojson/stops.json' 'shp/stops.shp' -sql \"SELECT networkCod AS networkCode, stopCode, stopName, routeCode, routeDirec AS routeDirection, routeDesti AS routeDestination FROM 'stops'\""
end
desc "Generate TopoJSON files"
task :topojson do
rm Dir.glob("topojson/*.*json")
src = %w{ routes stops }
src.each do |file_name|
system "topojson 'geojson/#{file_name}.json' -o 'topojson/#{file_name}.json' --properties"
# system "topojson 'geojson/#{file_name}.json' -o 'topojson/#{file_name}-simplified.json' -s #{TOPOJSON_PRECISION} --properties"
end
system "topojson #{src.map { |f| "'geojson/#{f}.json'" }.join(" ")} -o 'topojson/#{src.join("-")}.json' --properties"
end

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.
@@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
@@ -0,0 +1 @@
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
@@ -0,0 +1 @@
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

0 comments on commit 2fe77e3

Please sign in to comment.