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
import json | |
from shapely.geometry import shape | |
aoi_fpath = r"field.geojson" #path to geojson aoi | |
with open(aoi_fpath) as f: | |
geom = json.load(f) | |
geom_shape = shape(geom) | |
def get_overlap(image, aoi): |
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
import fiona | |
import geojson | |
import pyproj | |
import requests | |
import json | |
import os | |
import glob | |
import time | |
from functools import partial | |
from requests import Session |
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
from arcgis.gis import GIS | |
def authenticate(user, password): | |
if not user and password: | |
raise ValueError("username and password required") | |
gis = GIS("https://arcgis.com", user, password) | |
con = gis._con |
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
import requests | |
import json | |
import datetime | |
def request_token(user, password): | |
''' | |
:param agol_creds: the name of the local file with the user/pass | |
:return: a dictionary with folder_name, folder_id, item_name, item_id | |
''' | |
if not user and password: |
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
from arcgis.gis import GIS | |
from getpass import getpass | |
#authenticate (replace second argument with your agol username) | |
gis = GIS("https://arcgis.com", "astrong_pnw", getpass()) | |
#find item (replace item string with the unique item id of your AGOL feature | |
item = gis.content.get('de97aa2fc02f45a8ba61ee9cab4aad2e') | |
#define metadata in dict |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import arcpy | |
arcpy.env.workspace = r"C:\Users\asa7362\Desktop\ArcGIS\ProProjects\PNW_Portal.gdb" #path to your sde | |
arcpy.Rename_management("test", "test2") #param1 = current name, #param2 = desired name |
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
//source: https://github.com/AdriSolid/WAB-Custom-Widgets/tree/master/HeatMap | |
define(['dojo/_base/declare', | |
'jimu/BaseWidget', | |
'dojo/on', | |
'dijit/form/Select', | |
'dijit/form/Button', | |
'dijit/form/CheckBox', | |
'./idWebMapLayers', | |
'esri/layers/FeatureLayer', | |
'esri/renderers/HeatmapRenderer', |
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
from arcgis.gis import GIS | |
username = None #specify your AGOL username here (string) | |
password = None #specify your AGOL password here (string) | |
item_id = None #specify the Item ID of the Application you want to copy here (string) | |
portal_url = None #(optional) specify Portal URL | |
folder = None #(optional) specify folder you want item copied to | |
#authenticate | |
if portal_url: |
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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"#Get Set Up\n", | |
"from arcgis.gis import GIS\n", |
NewerOlder