Skip to content

Instantly share code, notes, and snippets.

@pyRobShrk
pyRobShrk / Text
Created November 29, 2022 22:45 — forked from jack-williams/Text
Excel text functions
_search = LAMBDA(txt, searchtext, [case_sensitive],
// Test the inputs for errors so that we can distinguish
// the error that comes from FIND/SEARCH as meaning "not-found".
IFS(
ISERROR(txt),
txt,
ISERROR(searchtext),
searchtext,
ISERROR(case_sensitive),
case_sensitive,
@pyRobShrk
pyRobShrk / Write Geojson To Feature Class.py
Created March 14, 2018 15:59 — forked from d-wasserman/Write Geojson To Feature Class.py
This gist is intended to share a sample worker function to write Geojson to an ArcGIS Feature Class using Arcpy.
def write_geojson_to_records(geojson):
"""Will write geojson to a list of dictionaries with geomtry keys holding coordinates and storing the properties
to dictionaries."""
gjson_data = json.loads(geojson, encoding='utf-8')
records = []
arc_print("Geojson being read by row...")
for feature in gjson_data["features"]:
try:
row = {}
row["geometry"] = feature["geometry"]
@pyRobShrk
pyRobShrk / googlePolyline.py
Last active February 28, 2018 00:42 — forked from signed0/gist:2031157
Google Polyline encoder & decoder
'''Provides utility functions for encoding and decoding linestrings using the
Google encoded polyline algorithm.
'''
def encode_coords(coords):
'''Encodes a polyline using Google's polyline algorithm
See http://code.google.com/apis/maps/documentation/polylinealgorithm.html
for more information.