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
_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, |
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
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"] |
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
'''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. | |