Skip to content

Instantly share code, notes, and snippets.

View maning's full-sized avatar

Maning Sambale maning

View GitHub Profile

Tasking Manager status

No new projects created. Please continue working on the 2 active projects:

Please focus on Manzanillo where it was reported to have greater damage among the coastal settlements.

Damage reports

  • 39 highways and 10 bridges affected, all in the corridor between Manzanillo and Guadalajara. Source: Public Infrastructure and Works Secretary, informador.com.mx
@maning
maning / forest_fraction_riitters.sh
Last active August 29, 2015 14:24
Old forest fragmentation scripts
#!/bin/sh -x
############################################################################
#
# MODULE: r.forestfrag
#
# AUTHOR(S): Emmanuel Sambale [hidden email] [hidden email]
#
# PURPOSE: Creates forest fragmentation index map from a raster vegetation file
# The index map was based on Riitters, K., J. Wickham, R. O'Neill, B. Jones,
# and E. Smith. 2000. Global-scale patterns of forest fragmentation. Conservation
@maning
maning / import_palsar.sh
Created July 9, 2015 09:06
Import PALSAR 25m data to GRASS GIS
#!/bin/sh -x
#
############################################################################
#
# MODULE: import_palsar.sh
# AUTHOR(S): Maning Sambale - http://www.essc.org.ph
# PURPOSE: Import PALSAR 25m data to GRASS GIS
#
#
# COPYRIGHT: (C) 2013 Maning Sambale, ESSC
@maning
maning / r.hillshade.multi
Created July 9, 2015 09:02
Creates a multidirectional, oblique-weighted, shaded-relief image from an input DEM image.
#!/bin/sh -x
############################################################################
#
# MODULE: r.hillshade.multi
#
# AUTHOR(S): Emmanuel Sambale esambale@yahoo.com emmanuel.sambale@gmail.com
# with comments and improvement from the GRASS user mailing list.
#
# PURPOSE: Creates a multidirectional, oblique-weighted, shaded-relief image
# from an input DEM image. Original ARC 6.0.1 GRID procedure was
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maning
maning / gist:11998bb29eb96c4bf38d
Last active March 9, 2021 19:55
geo-oneliners
# Some GEO oneliners that make my life easier.
# Dissolve Shapefiles using OGR from an attribute table
# http://darrencope.com/2015/01/23/dissolve-shapefiles-using-ogr/
ogr2ogr outputfile.shp inputfile.shp \
-dialect sqlite -sql “SELECT dissolvefield,ST_Union(geometry) \
as geometry FROM inputfile GROUP BY dissolvefield”
# Dissolve everything http://gis.stackexchange.com/questions/79850/merge-large-number-of-polygons-using-qgis
ogr2ogr -dialect SQLITE -sql "SELECT ST_Union(geometry) FROM input" output.shp input.shp
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.