Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 zipfile | |
import arcpy | |
import os | |
import glob | |
import subprocess | |
import shutil | |
arcpy.env.overwriteOutput = "TRUE" | |
def unzipfiles(myzipfile): | |
print "unzipping file" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 gdal | |
import subprocess | |
def clip_using_input_coords(original): | |
file_to_clip = 'sea_land_cover_classified.tif' | |
# get coords of file to mock | |
src = gdal.Open(original) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from utilities import util, tile_geom_util | |
import json | |
import sys | |
from shapely.geometry import shape | |
# big aoi | |
aoi = {"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[25.576171875,7.841615185204699],[15.864257812499998,-1.098565496040652],[18.45703125,-9.44906182688142],[31.6845703125,-9.535748998133615],[35.859375,-0.4394488164139641],[25.576171875,7.841615185204699]]]}}]} | |
aoi = {"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[14.501953124999998,5.703447982149503],[2.4609375,1.142502403706165],[17.841796875,-2.3723687086440504],[21.708984375,-12.297068292853805],[27.773437499999996,-0.4394488164139641],[38.056640625,-1.4939713066293112],[32.16796875,6.489983332670651],[35.947265625,13.068776734357694],[24.78515625,12.64033830684679],[20.126953125,18.562947442888312],[14.501953124999998,5.703447982149503]]]}}]} | |
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
from boto.s3.connection import S3Connection | |
import boto3 | |
import os | |
# connect to the s3 bucket | |
conn = S3Connection(host="s3.amazonaws.com") | |
bucket = conn.get_bucket('gfw2-data') | |
s3 = boto3.resource('s3') | |
# loop through file names in the bucket |
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 | |
echo "here" | |
DATA=`find . -name '*.shp'` | |
ogr2ogr -a_srs EPSG:4326 merge.shp | |
for i in $DATA | |
do | |
SHP=${i:2:100} | |
FINAL="${SHP/.shp/}" | |
echo $FINAL | |
echo $i |