Tile: shapeindex (mapnik) all shp files
authorGrant Slater <git@firefishy.com>
Thu, 25 Jul 2013 14:28:50 +0000 (15:28 +0100)
committerGrant Slater <git@firefishy.com>
Thu, 25 Jul 2013 14:28:50 +0000 (15:28 +0100)
cookbooks/tile/recipes/default.rb

index 8af830cddd73909ffd3d16e90c33ee6f90530533..18a7087219a72c0210b532c342e995e144ecdc26 100644 (file)
@@ -177,6 +177,14 @@ node[:tile][:data].each do |name,data|
     end
   end
 
+  execute "#{file}_shapeindex" do
+    action :nothing
+    command "find #{directory} -type f -iname '*.shp' -print0 | xargs -0 --no-run-if-empty shapeindex --shape_files"
+    user "tile"
+    user "tile"
+    subscribes :run, resources(:execute => file), :immediately
+  end
+
   remote_file file do
     action :create_if_missing 
     source url