This file contains hidden or 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
scene=LC80231222014362LGN00; curl -s "https://api.developmentseed.org/landsat?search=${scene}" |jq '.results[]|[.upperLeftCornerLongitude,.upperLeftCornerLatitude]|@csv' | sed 's:"::g;s:,: :g;s:^:POINT( :g;s:$: ):g' |
This file contains hidden or 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 | |
# see Development Seed landsat-api scene extent on geojson.io | |
# example use: $0 LC81660362014196LGN00 | |
scene=$1 | |
# get scene metadata from devseed landsat-api | |
curl -s "https://api.developmentseed.org/landsat?search=${scene}" |\ | |
# get corner coords | |
jq '.results[]|[.lowerLeftCornerLongitude,.lowerLeftCornerLatitude,"",.lowerRightCornerLongitude,.lowerRightCornerLatitude,"",.upperRightCornerLongitude,.upperRightCornerLatitude,"",.upperLeftCornerLongitude,.upperLeftCornerLatitude,"",.lowerLeftCornerLongitude,.lowerLeftCornerLatitude]|@csv' |\ |
This file contains hidden or 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 | |
#geocode a CSV file using both Google and Yahoo! APIs, send output to either KMl or ESRI Shapefile | |
# example Yahoo geocode request: http://where.yahooapis.com/geocode?q=950+main+street,+Worcester,+ma&appid=[yourappidhere] | |
# example Google geocode request: http://maps.googleapis.com/maps/api/geocode/xml?address=950+main+st,+worcester,+MA&sensor=true | |
# get working directory | |
WORKING_DIR=`pwd` |
NewerOlder