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 os | |
WORKING_FOLDER = r'C:\Temp' | |
DATA_FILE = 'grafiti.csv' | |
with open(os.path.join(WORKING_FOLDER, DATA_FILE), 'rb') as f: | |
data = f.readlines() | |
print(data) |
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
from comtypes.client import GetModule, CreateObject | |
from snippets102 import GetStandaloneModules, InitStandalone | |
GetStandaloneModules() | |
InitStandalone() | |
esriCarto = GetModule(r"C:\Program Files (x86)\ArcGIS\Desktop10.4\com\esriCarto.olb") | |
layerFile = CreateObject(esriCarto.LayerFile,interface=esriCarto.ILayerFile) | |
lyrs = ["C:\GIS\Temp\lyrs_remote_sde_many_features\c123.lyr", |
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
from comtypes.client import GetModule, CreateObject | |
from snippets102 import GetStandaloneModules, InitStandalone | |
esriCarto = GetModule(r"C:\Program Files (x86)\ArcGIS\Desktop10.4\com\esriCarto.olb") | |
# First time through, need to import the “StandaloneModules”. Can comment out later. | |
#GetStandaloneModules() | |
#InitStandalone() | |
#---------------------------------------------------------------------- |
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 os | |
import shutil | |
import time | |
from datetime import datetime | |
import arcpy | |
from concurrent import futures | |
HOME = r"C:\GIS\Temp\cc" |
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
#based on | |
#https://gis.stackexchange.com/questions/252950/how-can-i-call-a-net-c-tool-i-e-a-dll-file-from-a-model-workflow-or-a-py | |
import arcpy | |
import sys | |
from comtypes.client import GetModule, CreateObject | |
#path where snippets102.py module is stored | |
sys.path.append(r'C:\GIS\arcobjects') | |
import snippets102 |
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 os | |
import sys | |
import arcpy | |
import pythonaddins | |
mxd = arcpy.mapping.MapDocument('CURRENT') | |
poly_lyr = arcpy.mapping.ListLayers(mxd.activeDataFrame, 'polys')[0] | |
num_out_polys = 10 |
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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.IO; | |
using ESRI.ArcGIS.esriSystem; | |
using ESRI.ArcGIS.Framework; | |
using ESRI.ArcGIS.Editor; | |
using ESRI.ArcGIS.Geodatabase; | |
using ESRI.ArcGIS.Geometry; |
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
from __future__ import print_function | |
import json | |
import xml.etree.ElementTree as ET | |
import ogr | |
gdb_path = r'C:\GIS\data\Adv.gdb' | |
ds = ogr.Open(gdb_path) | |
res = ds.ExecuteSQL('select * from GDB_Items') | |
res.CommitTransaction() |
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 list of (x,y) for points along the route polyline feature class | |
with the set interval (using arcpy); | |
* save image from the API for each point trying to find the closest one as well | |
as the one looking at the next point in the route (using requests); | |
* merge the images into an output avi video file (using opencv); | |
''' | |
import os | |
import json |
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
''' | |
Convert file geodatabase feature class features into GeoJSON and | |
then construct text file for loading into elastic search bulk api | |
''' | |
import json | |
import arcpy | |
arcpy.env.overwriteOutput = True | |
#create a geojson file |