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
#!/bin/bash | |
for dir in *; do | |
if test -d "$dir"; then | |
( | |
cd "$dir"; | |
find . -maxdepth 1 -type f -print0 | xargs -0 -I {} mv {} ../{} | |
); | |
rmdir "$dir"; | |
fi; |
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
mount -o remount,acl / #mount / with acl turned on | |
chgrp dev /path/to/dir -R | |
chmod 7775 /path/to/dir -R | |
setfacl -d -m g:dev:rwX,o::- /path/to/dir #group write to dev for new files |
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
ogr2ogr -f "GeoJSON" E:\gitstore\public\res\shapes\ag_master_regions.json E:\master_regions\master_regions_SimplifyPolyg.shp |
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
geojson –o /home/mgleason/geo –precision 6 --id-property fips -- outcounties_topo.json | |
-o = output directory (filename is automatically chosen) | |
-precision = number of digits after decimal place to keep | |
--id-property = demote geometry id to specified feature property |
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
for f in *.geojson; do echo $f | sed 's/.geojson//' ; done | xargs -I {} topojson {}.geojson -o topojson/{}.topojson --id-property STATE_ZONE |
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
cd /usr/local/src | |
wget http://download.osgeo.org/gdal/gdal-1.9.0.tar.gz | |
tar xvfz gdal-1.9.0.tar.gz | |
cd gdal-1.9.0 | |
./configure --with-python | |
# include --tag=LD in the LIBTOOL_LINK directive in the GDALmake.opt file. | |
make |
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
state_abbr = { | |
'Alabama' : 'AL' , | |
'Alaska' : 'AK' , | |
'America Samoa' : 'AS' , | |
'Arizona' : 'AZ' , | |
'Arkansas' : 'AR' , | |
'California' : 'CA' , | |
'Colorado' : 'CO' , | |
'Connecticut' : 'CT' , | |
'Delaware' : 'DE' , |
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
import arcpy | |
from arcpy import env | |
env.workspace = "E:/master_regions" | |
files = arcpy.ListFiles("*.dbf") | |
for file in files: | |
rows = arcpy.UpdateCursor(file) | |
for row in rows: | |
row.NAME = file.split('.')[0] | |
rows.updateRow(row) |
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
import arcpy | |
from arcpy import env | |
env.workspace="E:\master_regions_unpacked" | |
files = arcpy.ListFiles("*.dbf") | |
for file in files: | |
arcpy.AddField_management(file, "CODE", "TEXT") |
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
import arcpy | |
import json | |
from arcpy import env | |
env.workspace = "E:/master_regions_unpacked" | |
txtFile = open("E:/master_regions/regionArray","w") | |
txt = [] | |
files = arcpy.ListFiles("*.dbf") | |
for file in files: | |
txt.append("'"+str(file).split(".")[0]+"'=>array(") |
OlderNewer