Spatial Filters
Introduction
Create a set of spatial filters based on OGC spatial functions.
from pprint import pprint | |
import arcpy | |
arcpy.env.workspace = r'stage.sde' | |
output = {} | |
tables = [] | |
for dirpath, dirnames, walked_tables in arcpy.da.Walk(datatype=['FeatureClass', 'Table']): |
Create a set of spatial filters based on OGC spatial functions.
[ | |
{ | |
"request_count": "9590125", | |
"search_table": "sgid10.boundaries.municipalities" | |
}, | |
{ | |
"request_count": "9509793", | |
"search_table": "sgid10.location.zipplus4points" | |
}, | |
{ |
.shorten-sm { | |
height: 50px; | |
overflow: hidden; | |
position: relative; | |
} | |
.shorten-sm:before { | |
content: ''; | |
width: 100%; | |
height: 100%; |
export default () => { | |
const [active, setActive] = useState('agent'); | |
return ( | |
<div fluid className="filter-selector"> | |
<ButtonGroup> | |
<Button color={active === 'agent' ? 'warning' : 'secondary'} onClick={() => setActive('agent')}>Agent</Button> | |
<Button color={active === 'offender' ? 'warning' : 'secondary'} onClick={() => setActive('offender')}>Offender</Button> | |
<Button color={active === 'location' ? 'warning' : 'secondary'} onClick={() => setActive('location')}>Location</Button> | |
<Button color={active === 'date' ? 'warning' : 'secondary'} onClick={() => setActive('date')}>Date</Button> |
import json | |
import arcpy | |
def resize_symbol(layer): | |
if not layer.isFeatureLayer: | |
return | |
symbology = json.loads(layer._arc_object.getsymbology()) |
SELECT | |
cv_domain.value('DomainName[1]', 'nvarchar(50)') AS 'DomainName', | |
coded_value.value('Code[1]','nvarchar(50)') AS 'Code', | |
coded_value.value('Name[1]','nvarchar(50)') AS 'Value' | |
FROM | |
sde.GDB_ITEMS AS items INNER JOIN sde.GDB_ITEMTYPES AS itemtypes ON | |
items.Type = itemtypes.UUID | |
CROSS APPLY | |
items.Definition.nodes('/GPCodedValueDomain2/CodedValues/CodedValue') AS CodedValues(coded_value) | |
CROSS APPLY |
#: the fields in the feature class | |
actual = set([str(x.name) for x in arcpy.ListFields(r'')]) | |
#: the fields you are trying to use | |
expected = set([]) | |
fouled_up = expected - actual |
var myDocs = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); | |
var arcGisProLocation = Path.Combine(myDocs, "ArcGIS", "AddIns", "ArcGISPro"); | |
var attribute = (GuidAttribute) _assembly.GetCustomAttributes(typeof(GuidAttribute), true)[0]; | |
var proAddinFolder = $"{{{attribute.Value}}}"; | |
var addinFolder = Path.Combine(arcGisProLocation, proAddinFolder); | |
if (!Directory.Exists(addinFolder)) | |
return null; |