This process outlines the process for creating Cloud Optimised Geotiffs suitable for hosting in services such as AWS S3. COGs enables more efficient workflows use cases such as fast access from Functions as a Services (E.g AWS Lambda), or comsumption into client desktop GIS systems (e.g QGIS). For more details on COGs please see https://www.cogeo.org/in-depth.html
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
'''Measure and report the time it takes to simply `import arcpy` | |
Part of https://community.esri.com/message/914048-re-what-is-your-import-arcpy-overhead? | |
''' | |
from timeit import default_timer as timer | |
start = timer() | |
from datetime import datetime, timedelta | |
from uuid import uuid4 | |
eventid = datetime.now().strftime('%Y%m-%d%H-%M%S-') + str(uuid4()) |
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
'''List all User Shell Folders via ID number. | |
An alternative to the usual | |
objShell = win32com.client.Dispatch("WScript.Shell") | |
allUserProgramsMenu = objShell.SpecialFolders("AllUsersPrograms") | |
because "These special folders do not work in all language locales, a preferred | |
method is to query the value from User Shell folders" |
Leo 5.8.1 beta 1, http://leoeditor.com, is now available on GitHub.
Leo is an IDE, outliner and PIM, as described here.
- during installation, set config to enabled
- edit policy, add your user on Local Comp Policy > Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment > Create symbolic links
- enable Windows Developer mode to bypass UAC requirement
- Search > For developer settings > Dev mode
Transcribed from an interview with Toby Schachman and Paula Te on The Afrofuturist Podcast:
There's this notion of the open-source movement. There are a lot of things
that we totally resonate with that because it's about understanding how your
technology works. We're totally 100% on board with that.
But then there are other issues with the open-source community, where it's
very internet-based and so open-source ends up benefitting this group of
people who have really strong access to internet and understand how to use
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
# generate a data dictionary from an ArcGIS feature class | |
# tested with ArcGIS Pro/Python3 | |
# Run from command prompt in ArcGIS Pro environment | |
# Takes 2 arguments: 1) path to feature class 2) path for output CSV file | |
# Example: python C:\arcpy_data_dictionary.py C:\yourgeodatabase.gdb\featureclassname C:\output.csv | |
import arcpy | |
import sys | |
import csv |
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
#!python2 | |
# Example 1a adapted from https://www.reddit.com/r/gis/comments/4rhvhh/map_automation_arcpymapping_make_lyr/ | |
# | |
# Reference: 1) http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/layer-class.htm | |
# 2) https://docs.python.org/2/library/json.html | |
import arcpy | |
import json | |
lyr = # Layer object, typically from arcpy.mapping.ListLayers (arcpy._mapping.Layer) |
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 | |
# Usage: | |
# ./git-move.sh path/to/file/or/dir path/to/destination/repo | |
echo "creating patch for path ${1}" | |
git log --name-only --pretty="format:" --follow "${1}" \ | |
| sort -u | \ | |
xargs git log --pretty=email --patch-with-stat --reverse --full-index --binary -m --first-parent -- > "${2}/_patch_" \ | |
&& echo "moving to destination repo at ${2}" \ | |
&& cd "${2}" \ | |
&& echo "applying patch" \ |