Skip to content

Commit

Permalink
Rename .geojson and .topojson to .json
Browse files Browse the repository at this point in the history
  • Loading branch information
jstcki committed Dec 16, 2012
1 parent 2d03b3f commit 7138dbf
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 13 deletions.
20 changes: 11 additions & 9 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,27 @@ LILJSON_PRECISION = 3

desc "Generate GeoJSON files"
task :geojson do
rm Dir.glob("geojson/*.geojson")
rm Dir.glob("geojson/*.*json")

%w{ swiss-cantons swiss-cantons-simplified }.each do |file_name|
system "ogr2ogr -f geoJSON 'geojson/#{file_name}.geojson' 'shp/#{file_name}/#{file_name}.shp' -sql \"SELECT NR AS no, ABKUERZUNG AS abbr, NAME AS name FROM '#{file_name}'\""
system "python lib/liljson.py -p #{LILJSON_PRECISION} 'geojson/#{file_name}.geojson' 'geojson/#{file_name}.geojson'"
system "ogr2ogr -f geoJSON 'geojson/#{file_name}.json' 'shp/#{file_name}/#{file_name}.shp' -sql \"SELECT NR AS no, ABKUERZUNG AS abbr, NAME AS name FROM '#{file_name}'\""
system "python lib/liljson.py -p #{LILJSON_PRECISION} 'geojson/#{file_name}.json' 'geojson/#{file_name}.json'"
end

%w{ swiss-municipalities swiss-municipalities-simplified }.each do |file_name|
system "ogr2ogr -f geoJSON 'geojson/#{file_name}.geojson' 'shp/#{file_name}/#{file_name}.shp' -sql \"SELECT BFSNR AS bfsNo, GEMTEIL AS municipalityPart, KANTONSNR AS cantonNo, GEMNAME AS name FROM '#{file_name}'\""
system "python lib/liljson.py -p #{LILJSON_PRECISION} 'geojson/#{file_name}.geojson' 'geojson/#{file_name}.geojson'"
system "ogr2ogr -f geoJSON 'geojson/#{file_name}.json' 'shp/#{file_name}/#{file_name}.shp' -sql \"SELECT BFSNR AS bfsNo, GEMTEIL AS municipalityPart, KANTONSNR AS cantonNo, GEMNAME AS name FROM '#{file_name}'\""
system "python lib/liljson.py -p #{LILJSON_PRECISION} 'geojson/#{file_name}.json' 'geojson/#{file_name}.json'"
end
end

desc "Generate TopoJSON files"
task :topojson do
rm Dir.glob("topojson/*.topojson")
rm Dir.glob("topojson/*.*json")

%w{ swiss-cantons swiss-municipalities }.each do |file_name|
system "topojson 'geojson/#{file_name}.geojson' -o 'topojson/#{file_name}.topojson' --properties"
system "topojson 'geojson/#{file_name}.geojson' -o 'topojson/#{file_name}-simplified.topojson' -s 1000 --properties"
src = %w{ swiss-cantons swiss-municipalities }

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 1000 --properties"
end
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions topojson/swiss-cantons-simplified.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion topojson/swiss-cantons-simplified.topojson

This file was deleted.

1 change: 1 addition & 0 deletions topojson/swiss-cantons.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion topojson/swiss-cantons.topojson

This file was deleted.

1 change: 1 addition & 0 deletions topojson/swiss-municipalities-simplified.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion topojson/swiss-municipalities-simplified.topojson

This file was deleted.

1 change: 1 addition & 0 deletions topojson/swiss-municipalities.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion topojson/swiss-municipalities.topojson

This file was deleted.

0 comments on commit 7138dbf

Please sign in to comment.