IDEA
|
When doing spatial selections, you traditionally have options like Intersect, Contains, Boundary touches, and many, many more. But some times that is just not enough... You need that special relation, that ESRI apparently haven’t thought about. In these cases, we used to have 'The Relation spatial relationship' to handle the situation. 'The Relation spatial relationship' is ESRI's name for what is also known as DE-9IM (ref. 1) and have been included in Arc Desktop as resent as ArcMap 10.8 (ref. 2) But it has disappeared with the introduction of ArcGIS Pro? My national ESRI reseller confirms this, but I have not seen any reply from ESRI Int. I would like to suggest that 'The Relation spatial relationship' gets re-introduced, in all situations in ArcGIS Pro where you can select options like Intersect, Contains, Boundary touches, etc. It was one of your strongest tools, and we think it's cool. Here are a few examples (ref.2.) of increasingly advanced stuff, that can be done with 'The Relation spatial relationship'. Please ESRI - Give us 'The Relation spatial relationship' back! ref.1: DE-9IM - Wikipedia ref.2: Types of spatial relationships that can be validated—Help | Documentation
... View more
03-30-2020
02:09 AM
|
4
|
2
|
1819
|
POST
|
What you want is likely an 'Editor' object ArcGIS Help (10.2, 10.2.1, and 10.2.2) .. resources.arcgis.com/en/help/main/10.2/index.html#//00s300000008000000 /Martin
... View more
08-31-2015
05:34 AM
|
0
|
0
|
1443
|
POST
|
I didn't consider classic topology at first, since data is in a versioned enterprise sde (Esri classic topology won't work with versioned databases). But I guess it's a good solution, if I make a 'check out replica' it should work smoothly. Thanks M
... View more
04-12-2015
12:33 AM
|
1
|
0
|
2900
|
POST
|
It seems to me that this should be a quite simple challenge. I have a feature class 'River'. Unfortunately it was digitized without much attention to snapping, therefore it has many small gaps, typically less that 1 meter. In the very old days of Arc/Info a simple 'snap' command would have fixed this quickly ... So I assumed it to be equally simple in ArcMap 10.3 I found the tool 'Snap (Editing)' but it doesn't seem to do anything. What is the easiest way to close many small gaps like this. /Martin
... View more
04-11-2015
01:22 PM
|
0
|
5
|
6788
|
POST
|
Hi Duncan I still find this to be a pain... But what I really want to add is: If you have your .pyt import a .py and you are then editing the .py then you need to reload recursively. How to do that is described here: Is there a way to refresh imported modules in a ArcGIS Python Toolbox? - Geographic Information Systems Stack Exchange Best regards Martin
... View more
10-23-2014
06:03 AM
|
1
|
0
|
1531
|
POST
|
This talk seems to repeat itself, for every new version. Essentially: If the documentation exists internally in esri, why is it not made available to the user? I would still like to know that.!
... View more
10-16-2014
01:00 PM
|
0
|
5
|
1075
|
POST
|
for the record: I had used 'refresh toolbox' many times during the edits, so that was not the problem. / M
... View more
09-30-2014
05:56 AM
|
0
|
0
|
1916
|
POST
|
Thanks for your reply. I restarted ArcMap, and now everything works exactely as expected 🙂 ??? / Martin
... View more
09-30-2014
05:55 AM
|
1
|
0
|
1916
|
POST
|
Hi Thomas - nice to hear from you... Unfortunately that line is the solution to an earlier problem Re: in a pyt (python toolbox): How do I make a boolean parameter default False??? so I would like to keep it. / Martin
... View more
09-30-2014
05:28 AM
|
0
|
0
|
1916
|
POST
|
Dear Community When defining parameters in a .pyt (Python toolbox) I would like to make one of the parameters optional - I think. It's a boolean parameter, allowing the user to specify weather the tool is allowed to overwrite certain values. I have made it default to False, and that would be the correct setting in 9 of 10 cases, so I would prefer if the tool would be able to just go with this default value. Unfortunately, when run, the tool insist that I toggle the boolean, before it will remove the little green dot. If I run the tool with the default values untouched, it gives me an error-box saying: "ERROR 000735: Overwrite Existing OBJNAM and NOBJNM: Value is required" I have tried to change the parameter from parameterType="Required", to parameterType="Optional", but it seems to have no effect on the tool behaviour. I have decided to paste the entire code here, it's still 90% cut-and-paste from ArcGIS Help (10.2, 10.2.1, and 10.2.2) , ArcGIS Help (10.2, 10.2.1, and 10.2.2) , and others but I guess the error is in a combination of things, and not the isolated line. I have marked the parameter (line 81), that I try to change to make a difference.
#-------------------------------------------------------------
# Name: GNDBtoolbox.pyt
# Purpose: A python-toolbox to work with the "Greenlandic Names Data Base" (GNDB) and NIS.
# Author: Martin Hvidberg
# e-mail: mahvi@gst.dk, Martin@Hvidberg.net
# Created: 2014-09-16
# Copyright: CopyLeft
# ArcGIS ver: 10.2.0
# Python ver: 2.7.3
#-------------------------------------------------------------
import arcpy
class Toolbox(object):
def __init__(self):
"""Define the toolbox (the name of the toolbox is the name of the .pyt file)."""
self.label = "The_GNDB_Toolbox"
self.alias = "Toolbox to work with GNDB and NIS"
self.description = "This is the description of the toolbox..."
# List of tool classes associated with this toolbox
self.tools = [GNDBruninTOC]
class GNDBruninTOC(object):
"""
GNDB update NIS - assuming feature classes all ready opened in TOC
Created on 27 Sep 2011
@author: mahvi@gst.dk / Martin@Hvidberg.net
"""
def __init__(self):
"""Define the tool (tool name is the name of the class)."""
self.label = "GNDB_update_NIS_run_in_TOC"
self.description = "This tool will update the selected NIS FC, which must be in the TOC"
self.canRunInBackground = True # True = Obey "Background Processing setting" in the Geoprocessing Options dialog.
def getParameterInfo(self):
"""Define parameter definitions"""
# 0. The Feature layer to receive GNDB names
param0 = arcpy.Parameter(
displayName="Input Features",
name="in_features",
datatype="GPFeatureLayer",
parameterType="Required",
direction="Input")
# 1. The point feature class holding the GNDB
param1 = arcpy.Parameter(
displayName="GNDB points",
name="GNDB",
datatype="GPFeatureLayer",
parameterType="Required",
direction="Input")
param1.value = "NamesP"
# 2. The Mode
param2 = arcpy.Parameter(
displayName="The Mode",
name="Mode",
datatype="GPString",
parameterType="Required",
direction="Input")
param2.filter.type = "ValueList"
param2.filter.list = ["Berit", "Test"]
param2.value = param2.filter.list[0]
# 3. Overwrite
param3 = arcpy.Parameter(
displayName="Overwrite Existing OBJNAM and NOBJNM",
name="Overwrite",
datatype="GPBoolean",
parameterType="Optional", # <------ This seems to have no effect ?
direction="Input")
param3.value = "False"
params = [param0, param1, param2, param3]
return params
def isLicensed(self):
"""Set whether tool is licensed to execute."""
return True
def updateParameters(self, parameters):
"""Modify the values and properties of parameters before internal
validation is performed. This method is called whenever a parameter
has been changed."""
return
def updateMessages(self, parameters):
"""Modify the messages created by internal validation for each tool
parameter. This method is called after internal validation."""
return
def execute(self, parameters, messages):
"""The source code of the tool."""
# put processing here ...
return
... View more
09-30-2014
01:13 AM
|
0
|
5
|
4698
|
POST
|
In a .pyt I can define parameters as described in : ArcGIS Help (10.2, 10.2.1, and 10.2.2) I have created a boolean parameter, the code snippet is as follow: def getParameterInfo(self): """Define parameter definitions""" ... some other parameters ... # 3. Overwrite param3 = arcpy.Parameter( displayName="Overwrite Existing OBJ", name="Overwrite", datatype="GPBoolean", parameterType="Required", direction="Input") The parameter works, but it anoys me that it defaults to True, I would like it to default to False. v.h. Martin
... View more
09-26-2014
06:42 AM
|
0
|
5
|
7656
|
POST
|
"Python - From Novice to Professional" is my all times favourite ...
... View more
09-08-2014
01:00 PM
|
0
|
0
|
1477
|
POST
|
How about generating a 10.3 version - and releasing it with 10.3 ? /M
... View more
06-14-2014
05:45 AM
|
0
|
0
|
1176
|
POST
|
Dear Forum I need to make a small tool that will automatically Pan and Zoom around in ArcMap. The overall purpose is to time how long time it takes for the screen to redraw after each Pan/Zoom. First I made a script that jumped from Bookmark to Bookmark, but it didn???t wait for the re-draw to complete, before jumping to the next bookmark ??? I guess this would often be preferable, but in my case it was undesirable behavior. I have now tried the following code, which opens a feature class (arcpy.GetParameterAsText(0)) that holds 5 polygons. It???s intended to jump to the extent of each of the polygons, in turn. But it seems to jump to some enormous extent many times larger than my entire data extent. Can any one suggest a good way to make ArcMap jump from place to place, like if you were jumping from bookmark to bookmark, but using Python, and allowing the re-draw to be timed by Python?
import arcpy
strPolygons = arcpy.GetParameterAsText(0)
# Init
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
xtnInit = df.extent # remember the original extent
# Build list of OIDs
lstOIDs = list()
with arcpy.da.SearchCursor(strPolygons, ['OID@', 'SHAPE@AREA']) as cursor:
for row in cursor:
lstOIDs.append(row[0])
# Run through OIDs
arcpy.MakeFeatureLayer_management (strPolygons, "Boxes")
for ID in lstOIDs:
strSelector = '"OBJECTID" = '+str(ID)
arcpy.SelectLayerByAttribute_management("Boxes", "NEW_SELECTION", strSelector)
df.zoomToSelectedFeatures()
arcpy.RefreshActiveView()
# closing up ...
df.extent = xtnInit
arcpy.RefreshActiveView()
Best regards Martin
... View more
05-20-2014
05:41 AM
|
0
|
1
|
1234
|
POST
|
From the description of this item on ArcGIS Online: "This is a diagram generated automatically by a Python script ..." Could you provide that script, so we can generate an overview for ver. 10.2 /M
... View more
11-19-2013
08:12 AM
|
0
|
0
|
1176
|
Title | Kudos | Posted |
---|---|---|
1 | 04-12-2015 12:33 AM | |
4 | 03-30-2020 02:09 AM | |
1 | 10-23-2014 06:03 AM | |
1 | 09-30-2014 05:55 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|