lib/jetel/modules/gadm/gadm.rb in jetel-0.0.16 vs lib/jetel/modules/gadm/gadm.rb in jetel-0.0.17
- old
+ new
@@ -58,10 +58,11 @@
extracted_dir = extract_dir(source, global_options.merge(options))
Dir.glob("#{extracted_dir}/*.shp") do |shapefile|
puts "Transforming #{shapefile}"
# "topojson data/Gadm/AFG/extracted/AFG_adm0.shp -o data/Gadm/AFG/transformed/AFG_adm0.topo.json"
- cmd = "topojson #{shapefile} -o #{shapefile.gsub(extracted_dir, dest_dir).gsub('.shp', '.topo.json')}"
+ destfile = shapefile.gsub(extracted_dir, dest_dir).gsub('.shp', '.topo.json')
+ cmd = "topojson --no-stitch-poles --no-force-clockwise #{shapefile} -o #{destfile} -p"
puts cmd
PTY.spawn(cmd) do |stdout, stdin, pid|
begin
# Do stuff with the output here. Just printing to show it works
stdout.each { |line| print line }