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
| ggID='put_googleID_here' | |
| ggURL='https://drive.google.com/uc?export=download' | |
| filename="$(curl -sc /tmp/gcokie "${ggURL}&id=${ggID}" | grep -o '="uc-name.*</span>' | sed 's/.*">//;s/<.a> .*//')" | |
| getcode="$(awk '/_warning_/ {print $NF}' /tmp/gcokie)" | |
| curl -Lb /tmp/gcokie "${ggURL}&confirm=${getcode}&id=${ggID}" -o "${filename}" |
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
| http://gis.stackexchange.com/questions/118682/removing-empty-geometry-with-ogr2ogr | |
| ogr2ogr -f "ESRI Shapefile" -dialect sqlite -sql "select * from input where geometry is not null" output.shp input.shp | |
| ogr2ogr -sql "select inshape.*, joincsv.* from inshape left join 'joincsv.csv'.joincsv on inshape.GISJOIN = joincsv.GISJOIN" shape_join.shp inshape.shp | |
| Joining csv to shapefile | |
| http://gis.stackexchange.com/questions/95746/join-a-csv-file-to-shapefile-using-gdal-ogr | |
| http://www.gdal.org/ogr_sql.html |
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
| fio cat ../missed.shp | rio zonalstats -r amfam.vrt --categorical | jq '.features[].properties | {APN: .APN,pool: ._1}' | jq --slurp . | in2csv -f json > test.csv | |
| jq '.features[].properties | {APN: .APN,pool: ._1}' pools.geojson | jq --slurp . | in2csv -f json > test.csv | |
| fio cat countries.shp | rio zonalstats -r dem.tif --prefix "elevation_" > countries_with_elevation.geojson | |
| fio cat large.shp | rio zonalstats -r elevation.tif --sequence | some-other-process | |
| time fio cat ../parcels/parcels_pools.shp | parallel --pipe "rio zonalstats -r amfam.vrt --categorical" > out | |
| fio cat test.shp | jq '{geometry: .geometry, PARCEL_ID: .properties.PARCEL_ID}' -c | fio collect > test.geojson |
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
| fio cat missed.shp | jq --slurp "[.[] | {APN: .properties.APN, pool_size: .properties.POOL_SZ}]" | in2csv -f json > test.csv |