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
// This is because the webmap can't parse our code for the fields that we are | |
// using since they are buried in field info dictionaries. | |
// This could be optimized to include only the fields that you use below | |
Expects($feature, '*'); | |
// I can't believe that arcade doesn't define an expression like this! | |
function concat(target, source) { | |
for (var i in source) { | |
Push(target, source[i]); | |
} |
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
// REACT - didn't work in javascriptreact.json | |
"react component": { | |
"prefix": "comp", | |
"body": [ | |
"const ${1:ComponentName} = () => {", | |
" return (", | |
" <div>$0</div>", | |
" );", | |
"};", | |
"", |
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
async function go() { | |
const { Datastore } = require("@google-cloud/datastore"); | |
const ds = new Datastore(); | |
const query = ds.createQuery('view'); | |
const [entities] = await ds.runQuery(query); | |
const uniqueURLs = {}; |
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
"queryFilter": { | |
"layerName": "TIP Projects", | |
"fields": [ | |
{ | |
"label": "Funding Program", | |
"fieldName": "MSTR_PIN", | |
"fieldType": "text", | |
"checkboxes": [ | |
{ | |
"label": "CMAQ", |
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
#!/usr/bin/env python | |
# * coding: utf8 * | |
''' | |
bootstrap_local_sde.py | |
Bootstraps a local SDE database with users. | |
Creates a new enterprise database with the sde schema. | |
Creates a connection file using operating system auth. | |
Adds passed in users (password matches the username) and creates connection files for each of them. |
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
import re | |
import arcpy | |
SDE = r'C:\temp\parcels_metadata_fix_1.gdb' | |
BASIC_SUMMARY = 'GIS mapping data representing parcel boundaries.' | |
LIR_SUMMARY = 'GIS mapping data representing parcel boundaries and county tax roll attributes.' | |
BASIC_UPDATE_INFO = 'Update information can be found within the layer’s attributes and in a table on the <a href="https://gis.utah.gov/data/cadastre/parcels/#UtahParcels">Utah Parcel Data webpage</a> under Basic Parcels.' | |
LIR_UPDATE_INFO = 'Update information can be found within the layer’s attributes and in a table on the <a href="https://gis.utah.gov/data/cadastre/parcels/#UtahParcels">Utah Parcel Data webpage</a> under LIR Parcels.' | |
LAST_UPDATE_REGEX = re.compile(r'(<P><SPAN>)?Last Update: .*\d(<\/SPAN><\/P>)?', re.MULTILINE | re.IGNORECASE) |
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
def cleanAddresses(): | |
print(' * Cleaning Addresses') | |
def IsProblem(value): | |
ex = ['NO.', 'ST. JOSEPH', 'NORTH WAY'] | |
return any(value.find(e) > -1 for e in ex) | |
def SkipName(value): | |
skipNameList = ['RIVER BEND WAY', 'CANYON CREST', 'WATER MILL WAY', |
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
''' | |
fix_corrupt_geometries.py | |
A module that contains code for fixing geometries that stubbornly refused to give you their WKT | |
This code assumes that the OBJECTIDs are sequential. | |
Example usage: | |
from fix_corrupt_geometries import fix |
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
require({ | |
packages: [{ | |
name: 'agrc', | |
location: 'http://mapserv.utah.gov/cdn/dojo/agrc/2.0/' | |
}] | |
}, [ | |
'esri/map', | |
'esri/layers/ArcGISTiledMapServiceLayer', | |
'agrc/widgets/locate/FindAddress', | |
'esri/layers/ArcGISDynamicMapServiceLayer' |
NewerOlder