readers/tfl_common.rb
# Find the length of a GeoJSON geometry
Find the length of a GeoJSON geometry
Find the length of a GeoJSON geometry
def geojson_length(geo)
		if geo['type']=='LineString'
			_ls_length(geo['coordinates'])
		else
			geo['coordinates'].inject(0) { |sum,ls| sum+_ls_length(ls) }
		end
	end
def geojson_length ( geo ) if geo [ 'type' ] == 'LineString' _ls_length ( geo [ 'coordinates' ] ) else geo [ 'coordinates' ] . inject ( 0 ) { | sum , ls | sum + _ls_length ( ls ) } end end
Find the length of a GeoJSON geometry
Find the length of a GeoJSON geometry
geo
<not_specific>