Changeset 2061
- Timestamp:
- 11/27/07 20:00:18 (12 months ago)
- Location:
- lang/ruby/RubyESRIShape/test/shape-test
- Files:
-
- 3 added
- 1 modified
-
make_jsonp.bat (added)
-
test.rb (modified) (2 diffs)
-
trans_rails.shp (added)
-
trans_rails.shx (added)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/RubyESRIShape/test/shape-test/test.rb
r2026 r2061 2 2 include RubyESRIShape 3 3 4 s = Shape.new("bnda_1_1") 4 if (ARGV[2] == nil) 5 STDERR.puts "specify <shape_name> and <start> and <count>" 6 exit 7 end 8 9 $shape_name = ARGV[0] 10 $out_start = ARGV[1].to_i 11 $out_count = ARGV[2].to_i 12 13 s = Shape.new($shape_name) 5 14 6 15 json_records = [] 7 16 STDERR.puts "#{s.length} records" 8 17 s.each{|record_index, record| 9 # next if record_index < 2501 10 # break if record_index > 3500 18 next if record_index < $out_start 19 break if record_index >= ($out_start + $out_count) 11 20 12 21 STDERR.puts "record ##{record_index}: #{record.length} parts" … … 23 32 } 24 33 25 puts "add_shape_data( ["34 puts "add_shape_data(\"#{$shape_name}\", [" 26 35 puts json_records.join(',') 27 36 puts "]); Ten.JSONP.callback(null);"
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)