Last active
August 29, 2015 14:12
-
-
Save handygeospatial/36191d4a4091e07c62c0 to your computer and use it in GitHub Desktop.
elevation_of を使って 3D GeoJSON を作成するスクリプト ref: http://qiita.com/handygeospatial/items/aa9175bd3014acc84209
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require './elevation_of.rb' | |
data = JSON.parse(File.open('kyogatake.geojson').read) | |
a = data['features'][0]['geometry']['coordinates'] | |
a.each_index {|i| | |
a[i] << elevation_of(a[i][0], a[i][1]) | |
} | |
File.open('kyogatake3d.geojson', 'w') {|w| | |
w.print JSON.dump(data) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment