POST
|
Hi Eric, You should be able to use the following snippet provided the user is running the tool from within Pro and has the map view open. Warren aprx = arcpy.mp.ArcGISProject("CURRENT") mv = aprx.activeView ext = mv.camera.getExtent() arcpy.env.extent = "{}, {}, {}, {}".format(ext.XMin, ext.YMin, ext.XMax, ext.YMax)
... View more
12-07-2020
05:28 AM
|
1
|
1
|
806
|
POST
|
Hello Biraja, We have run the diagnose and repair tools to fix the issues, however the error tends to return and as you've mentioned it's difficult to understand where the issue is originating. You've mentioned running the diagnose tools frequently, would you suggest possibly having these tools run on a scripted schedule so we could pinpoint when this issue occurs based on those logs from the tool? Warren
... View more
05-14-2019
05:24 AM
|
0
|
2
|
1498
|
POST
|
We’re experiencing an error with a Geometric Network Database table. We previously opened a support ticket pertaining to this issue when this issue interrupted our Reconcile and Post process. After a support call the resolution at the time was to run the Repair Version Tables and Repair Version Metadata Tools corrected the issue. This solved the problem and proved to be a stable fix as the issue occurred a number of times over the following year. After that period the problem seemed to subside, perhaps due to decreased user activity editing the specific feature classes. However, the problem has recently arisen again and I have more time to dedicate to troubleshooting the issue (ignorance was bliss). Previously when attempting to perform a reconcile, post, and compres of the database we would receive the following error: "Error reconciling version SDE_USER.PWS.[
The feature class participates in a geometric network that could not be opened.
Network property already exists. [Property name: 'Junction Count' in the SDE_USER.N_6_Props table]]
3 of 4 versions finished.
WARNING 000084: Conflicts detected, aborting the reconcile.
Reconciling version SDE_USER.FieldEdits with SDE.DEFAULT.
Error reconciling version SDE_USER.FieldEdits.[
The feature class participates in a geometric network that could not be opened.
Network property already exists. [Property name: 'Junction Count' in the SDE_USER.N_6_Props table]]
4 of 4 versions finished.
WARNING 000084: Conflicts detected, aborting the reconcile.
Finished reconcile.
Succeeded at Tue Jul 18 18:27:34 2017 (Elapsed Time: 7.37 seconds)" Today the error also appeared for users editing the data and attempting to save their edits. I’m hoping to get to the bottom of this and resolve the issue and restore my confidence in the integrity of our database. A couple notes on our environment: Oracle: v11.2.0.4.0 (11G) AIX 7.1 Geodatabase Version: 10.5.1 We also use infraMAP from iWater (uses runtime engine for 10.5.1) – this application uses geodatabase replicas that are children of a geodatabase version specific for Field Edits.
... View more
05-13-2019
12:21 PM
|
0
|
4
|
1854
|
POST
|
I'm having very similar results. Would love to know a solution to this or a workaround. Nothing I've tried so far has worked.
... View more
04-08-2019
06:19 AM
|
0
|
0
|
1050
|
POST
|
Luke, I apologize for leaving you hanging here for almost a year. Real work got in the way of my little side project, but I've recently returned to work on it. I wanted to let you know that you suggestions and pseudo code were incredibly helpful. Specifically, the calculation to find the angle: angle = atan2(dX, dY) * 180 / pi and the use of the pointFromAngleAndDistance method. I had no idea this existed and it was soooooo much easier than how I was attempting to calculate this before. newpoint1 = currentPoint.shape.pointFromAngleAndDistance(angle + 90, distance)
newpoint2 = currentPont.shape.pointFromAngleAndDistance(angle + 90, distance) My script now performs how I wanted it to in the first place so thanks for replying and being so helpful! Warren
... View more
03-28-2019
10:53 AM
|
1
|
0
|
1017
|
IDEA
|
I'm going to echo what many have already stated above here. Being a GIS Analyst and wearing many hats within my organization, creating add-ins with Python allowed me to develop tools for our users that achieved significant efficiencies without having to learn an additional language or require additional software. It doesn't seem at all logical to have this capability in ArcMap but it be a glaring omission in ArcGIS Pro. To provide some context, the types of tools we've deployed are lightweight tools that compliment and expedite the portions of data editing/creation that are repeatitive and manual in nature. These tools are integrated into our editing toolbars and are designed to be much less disruptive to the editing workflow than a geoprocessing tool. These add-ins also make use of dynamic/temporary geometry drawn in the map by the user in order to create/edit features, which isn't possible with geoprocessing tools. For instance, we have a tool used to bulk re-align (or zip) misplaced/haphazardly digitzed addresses along a street segment. This add-in takes a selected set of address points and re-aligns them to the vertices in a line geometry captured by the user using the Tools.shape. This tool functions seamlessly within the users' editing task and doesn't interrupt them with a cumbersome dialog box etc. as would a geoprocessing tool. This specific add-in can be found here. Similarly, we have other tools that assist with data editing and speed up the creation of common "feature assemblies". Our users have an add-in that creates common collections of features (aka feature assemblies) such as hydrant leads, valves, fittings, and hydrants all from the add-in tools.shape. Therefore, a user is able to generate all of these features in their correct orientation and with commonly populated attribute defaults from a single line geometry. This add-in significantly increases efficiency and reduces the manually intensive digitization of these very regular feature assemblies. I'll also emphasize that these tools we've created were all constructed with very minimal lines of code, since the add-in creation was so easy, and that we didn't have to involve our developers and explain the specific geospatial requirements of the add-in etc. So in short since the Analysts are typically one tier closer to our end users we were able to develop an add-in that was very succesful very quickly for our end users without having to get bogged down explaining the need and the unique geospatial nature of the add-in requirements to our developers. I think Python has to be added back into ArcGIS Pro as a language to create add-ins in order to support the diverse ecosystem of users and not create such a divide between users and developers. GIS Analysts fall within that gap and serve bridge that divide, but we can't work effectively if tools like Python add-ins are taken away and removed from our toolsets. Warren Davison
... View more
02-14-2019
07:07 AM
|
5
|
2
|
1688
|
IDEA
|
I would like ArcGIS Pro to maintain knowledge/awareness of symbology components (those symbols that are actually applied to features) and their relationship to the parent symbol within the Style. So that should you make a change to the parent symbol within the style you could easily update the uses of that symbol within your map without having to visit each layer and make the change. Here's an example of the workflow that would be greatly improved with this functionality. I'm making a map where I've made use of a picture fill in a background polygon layer. After adjusting the symbology of this layer I've saved it to a style associated with my map project. I've then subsequently used this polygon fill symbol extensively throughout my project: Label halos, text fills, etc. (used it as a knockout so the halo matches the background texture and forms a seamless mask of underlying features - works great! btw) - Sorry, there IS a paper texture in this image but may be tough to see... But for whatever reason I decide the colour, size of the image used within the fill or something else isn't quite right... and I update the symbol in the style. What I've been having to do is then go through all my layers, label classes, labels, and halos where I remember using the symbol and updating it by referencing the style again. Ideally, I feel like I should be able to right-click the symbol in the style catalog and say "update uses of this symbol..." and have ArcGIS Pro refresh the use of this symbol everywhere within my map. Obviously there should be limits where if I've tweaked a symbol for another use or I don't want it to be changed/refreshed in the future. For this purpose there should be a check box on symbols that would "orphan" the use of that symbol from the parent within the style and prevent it being changed.
... View more
10-25-2018
10:14 AM
|
6
|
3
|
835
|
IDEA
|
Hi Kate Stratford one thing you could try it to create images of the features you'll like on the map. You could then use these as picture markers (quick example below) within your 3D scene in the same way you would in a map. Here's a sample style I put together while experimenting creating and using my own image markers http://arcg.is/DWO0D
... View more
10-25-2018
09:31 AM
|
1
|
0
|
900
|
POST
|
Still no resolution yet unfortunately . Waiting for someone with more wisdom to stumble across this post.
... View more
09-25-2018
07:13 AM
|
0
|
0
|
630
|
POST
|
I thought it would be really cool to symbolize data from GPS tracks as a tapered line/polygon based on their attributes (I've set my sights on polygon geometry so I could eventually fill said polygons with a gradient fill thereby tying them together). I imagine this to look slighty accordian in nature with fluctuating polygon width as an attribute such as speed changes along some track (see concept image below). It's conceptually similar to the 'Tapered Line' symbol effect in ArcGIS Pro but allows for the ability to fill the polygon and vary the taper by attribute. This would allow me to do some of the data visualisation that would typically occur in graphic design software. As it stands, the code I've written to achieve this 'nearly' work which is why I'm posting here. I've been able to create the polygons, and modify the taper but there are two main issues I've identified. The taper doesn't seem to always respect the attribute value that determines the width (note data points that have speed label of 17 - Center left of image, are more narrow than those that are 10, 11, 12 - Upper left of image). I suspect somethign is wonky with my equations where I calculate the offsets used to "stretch" the polygon width. In addition, for a reason that I cannot pin down, there are some polygons that get turned into "bowties" and become multi-part polygons when they should be quadrilaterals (from troubleshooting it seems like my Insert cursor inserted the 4th coordinate pair before the 3rd?) If anyone has some tips, suggestions, thoughts, or if this code already exists somewhere. I'd be more than grateful to listen and learn. Warren Here's my code as it stands now, I've written it to run from a script tool in ArcGIS Pro (I've also attached the script and toolbox). # Move bank data source (albatross GPS tracks)
# Dodge S, Bohrer G, Weinzierl R, Davidson SC, Kays R, Douglas D, Cruz S, Han J, Brandes D, Wikelski M (2013)
# The Environmental-Data Automated Track Annotation (Env-DATA) System—linking animal tracks with environmental data.
# Movement Ecology 1:3. doi:10.1186/2051-3933-1-3
# Cruz S, Proaño CB, Anderson D, Huyvaert K, Wikelski M (2013) Data from:
# The Environmental-Data Automated Track Annotation (Env-DATA)
# System: Linking animal tracks with environmental data. Movebank Data Repository. doi:10.5441/001/1.3hp3s250
# imports
import arcpy
from math import sqrt
import sys
from math import cos
# overwrite the outputs
arcpy.env.overwriteOutput = True
# Get parameters from dialog
# input points
source_points = arcpy.GetParameterAsText(0)
# variable parameters
primary_param = arcpy.GetParameterAsText(1) # Parameter to classify and use to "stretch" geometry width
secondary_param = arcpy.GetParameterAsText(2) # Parameter that we'll carry over for symbology purposes
num_breaks = arcpy.GetParameterAsText(3) # Number of classes to break the primary attribute values into
min_width = arcpy.GetParameterAsText(4) # minimum width (metres) that a polygon should be at an end
max_width = arcpy.GetParameterAsText(5) # maximum width (metres) that a polygon should be at an end
break_dictionary = {}
# output polygons
output_polygons = arcpy.GetParameterAsText(6) # output location file gdb
def msg(text):
arcpy.AddMessage(text)
print(text)
def width_factor(attribute_value, dictionary):
for k, v in dictionary.items():
if attribute_value <= dictionary[k][0]:
attribute = k
break
else:
attribute = num_breaks
msg('assigned: {0}'.format(attribute))
return attribute
def offset_calc(distance, plane, latitude):
# https://gis.stackexchange.com/questions/2951/algorithm-for-offsetting-a-latitude-longitude-by-some-amount-of-meters
if plane == 'y':
offset = float(distance)/111111
offset /= 2
else:
offset = float(distance)/(111111 * cos(latitude))
offset /= 2
return offset
# Understand Attribute Parameter
msg('Understanding attribute parameter...')
value_list = []
with arcpy.da.SearchCursor(in_table=source_points, field_names=primary_param) as parameter_cursor:
msg('Scanning attribute values...')
for row in parameter_cursor:
value_list.append(row[0])
msg('Scan complete.\n\n')
# Assign min/max values
min_attribute = min(value_list)
max_attribute = max(value_list)
msg('Minimum and maximum values assigned: Min({0}), Max({1})'.format(min_attribute, max_attribute))
range_attribute = max_attribute - min_attribute
msg('Range identified: {0}'.format(range_attribute))
step = range_attribute/float(num_breaks)
msg('Range step identified: {0}\n'.format(step))
# Assign polygon width values
width_range = float(max_width) - float(min_width)
width_step = width_range/float(num_breaks)
msg('Assigned width step: {0}'.format(width_step))
# Create dictionary of break values [attribute, width]
for i in range(1, int(num_breaks)+1, 1):
break_value = i * step + min_attribute
width_value = i * width_step + float(min_width)
break_dictionary[i] = [break_value, width_value]
msg('Assigned dictionary break value {0}: {1}'.format(i, break_dictionary[i]))
msg(break_dictionary)
# Create output feature class
workspace_index = output_polygons.rfind('\\')
workspace = output_polygons[:workspace_index]
output_name = output_polygons[workspace_index + 1:]
# Set spatial reference to match input
sr = arcpy.Describe(source_points).spatialReference
msg(str(sr))
msg('Creating "{0}" feature class to store outputs.'.format(output_name))
arcpy.CreateFeatureclass_management(out_path=workspace, out_name=output_name, geometry_type="POLYGON", spatial_reference=sr)
# Add schema
msg('Adding standard fields.')
# Need to have field type detection eventually
arcpy.AddFields_management(in_table=output_polygons, field_description=[
['LINE_FID', 'SHORT'],
['PRIMARY_VALUE', 'DOUBLE'],
['PRIMARY_CLASSED', 'SHORT'],
['SECONDARY_VALUE', 'DOUBLE'],
])
msg('Output feature class created.')
# Open search cursor on points in order to gather geometry
index = 0
feature_dictionary = {}
with arcpy.da.SearchCursor(in_table=source_points, field_names=['OBJECTID', primary_param, secondary_param, 'SHAPE@X', 'SHAPE@Y']) as s_cursor:
for row in s_cursor:
feature_dictionary[index] = [row[0], row[1], row[2], row[3], row[4]]
index += 1
msg('Point features consumed.')
# msg(str(feature_dictionary))
# Puke up features from dictionary
# msg('LAST ITEM: {0}'.format(list(feature_dictionary.keys())[-1]))
with arcpy.da.InsertCursor(in_table=output_polygons, field_names=['LINE_FID', 'PRIMARY_VALUE', 'PRIMARY_CLASSED', 'SECONDARY_VALUE', 'SHAPE@']) as i_cursor:
for key, value in feature_dictionary.items():
msg('KEY: {0}, INDEX: {1}'.format(key, index))
if key == 0:
msg('Process as first point (triangle)')
pass
elif index == int(key + 2):
msg('Process as second last point (triangle)')
pass
elif index == int(key + 1):
msg('Process as last point, therefore skip')
pass
else:
msg('Processing as normal point')
# https://stackoverflow.com/questions/133897/how-do-you-find-a-point-at-a-given-perpendicular-distance-from-a-line
# msg(str(feature_dictionary[key]))
# Process as usual
# POINT 1
# Get difference of x between prior point and subsequent
# dx = x1 - x2
dx = float(feature_dictionary[key-1][3]) - float(feature_dictionary[key+1][3])
# Get difference of y between prior point and subsequent
# dy = y1 - y2
dy = float(feature_dictionary[key-1][4]) - float(feature_dictionary[key+1][4])
# dist = sqrt(dx*dx + dy*dy)
dist = sqrt(dx * dx + dy * dy)
# Reassign dx and dy
if dx > 0:
dx /= dist
else:
dx = dx
if dy > 0:
dy /= dist
else:
dy = dy
# Get coordinates for starting vertices (counter-clockwise starting top left)
# x3 = x1 + (N/2)*dy
# FACTORED
# Bookmark primary attribute value
wf = width_factor(feature_dictionary[key][1], break_dictionary)
msg('WF: {0}'.format(wf))
# Bookmark break value
bv = break_dictionary[wf][1]
msg('BV: {0}'.format(bv))
x1 = float(feature_dictionary[key][3]) + offset_calc(float(bv), 'x', feature_dictionary[key][4]) * dy
y1 = float(feature_dictionary[key][4]) - offset_calc(float(bv), 'x', feature_dictionary[key][4]) * dx
x2 = float(feature_dictionary[key][3]) - offset_calc(float(bv), 'x', feature_dictionary[key][4]) * dy
y2 = float(feature_dictionary[key][4]) + offset_calc(float(bv), 'x', feature_dictionary[key][4]) * dx
# Get difference of x between prior point and subsequent
dx2 = float(feature_dictionary[key][3]) - float(feature_dictionary[key+2][3])
# Get difference of y between prior point and subsequent
dy2 = float(feature_dictionary[key][4]) - float(feature_dictionary[key+2][4])
dist2 = sqrt(dx2 * dx2 + dy2 * dy2)
# Reassign dx and dy
if dx2 > 0:
dx2 /= dist2
else:
dx2 = dx2
if dy2 > 0:
dy2 /= dist2
else:
dy2 = dy2
# Get coordinates for second pair
# FACTORED
wf = width_factor(feature_dictionary[key+1][1], break_dictionary)
msg('WF2: {0}'.format(wf))
bv = break_dictionary[wf][1]
msg('BV2: {0}'.format(bv))
x3 = float(feature_dictionary[key+1][3]) + offset_calc(float(bv), 'x', feature_dictionary[key+1][4]) * dy2
y3 = float(feature_dictionary[key+1][4]) - offset_calc(float(bv), 'x', feature_dictionary[key+1][4]) * dx2
x4 = float(feature_dictionary[key+1][3]) - offset_calc(float(bv), 'x', feature_dictionary[key+1][4]) * dy2
y4 = float(feature_dictionary[key+1][4]) + offset_calc(float(bv), 'x', feature_dictionary[key+1][4]) * dx2
# Create feature
coordinates = [(float(x1), float(y1)), (float(x2), float(y2)), (float(x4), float(y4)), (float(x3), float(y3))]
try:
msg('Attempting insert')
# 'OBJECTID', primary_param, secondary_param, 'SHAPE@X', 'SHAPE@Y'
# 'LINE_FID', 'PRIMARY_VALUE', 'PRIMARY_CLASSED', 'SECONDARY_VALUE', 'SHAPE@'
data = [feature_dictionary[key][0], feature_dictionary[key][1], width_factor(feature_dictionary[key][1], break_dictionary), feature_dictionary[key][2], coordinates]
msg(data)
i_cursor.insertRow(data)
except:
e = sys.exc_info()[1]
msg('Insert failed: {0}'.format(e.args[0]))
... View more
07-12-2018
10:34 AM
|
0
|
2
|
1197
|
POST
|
Hello CartoMOOC team, Big fan of the course so far (when I get the time work through the exercises). I've already learned some things that I wasn't anticipating (scale base symbology melted my brain). I have a practical question, many of us map makers are required to make some pretty standardized deliverables which don't really immediately fall into the realm of cartographically pleasing (I'm looking atyou ZONING MAPS). I was wondering if there's any tips or suggestions you may have for approaching these bread & butter thematic maps so they done end up looking like a rainbow-fied dogs breakfast?
... View more
05-15-2018
09:10 AM
|
3
|
4
|
751
|
POST
|
I've attributed all of my datasets that are published to my Open Data portal with tags to enable quick and easy searching. I've also used this functionality to group items under a common tag and this allows me to transport users directly to themed content using the Category widgets in the site layout editor. However, I've come to notice that when these Category buttons are pressed the results that are presented oddly omit some of the layers that I've tagged. For instance, when I use the infrastructure tag http://data.waterloo.ca/datasets?t=infrastructure all of the water layers are missing but the sanitary layers appear. I can't figure out why this is happening since the tags are nearly identical. Has anyone else run into this and how do you fix it? *Just a note, we've federated our site content to include data from surrounding municipalities so content from Kitchener and Cambridge and the Upper tier Region of Waterloo will be present. However, I'm concerned about the City of Waterloo Content.
... View more
04-25-2018
07:02 AM
|
0
|
2
|
803
|
IDEA
|
The possibilities using image markers within the ArcGIS Pro symbology dialog is awesome. However, if I add a tint to that image in the symbology dialog and export the map to PDF the resulting pdf document displays the original marker. This behaviour doesn't happen if exporting to other formats such as JPEG. In my mind this should be consistent. I'm trying to publish this as a map series (only available as PDF export.) Original File: ArcGIS Pro Symbology Dialog: Result of PDF export: JPEG export:
... View more
04-10-2018
12:37 PM
|
3
|
1
|
533
|
POST
|
Hi James, Thanks for replying and clarifying that. I presume this may be something that is implemented in the next release? I'm curious does this also apply to Explorer for ArcGIS?
... View more
02-09-2018
04:38 AM
|
0
|
1
|
1678
|
POST
|
Michael Kelly Hi Nicole and Michael, I'm following along with Ismael Chivite in the https://community.esri.com/groups/survey123/blog/2016/07/30/understanding-survey123s-custom-url-scheme and I've found that I when I pass the coordinates from Collector to Survey123 using attribute expressions (X/Y of a point location). The result I get "${expression/expr2}" deposited in a text field I'm using to check my variables. I'm sending the same content as using the 'center' argument but it doesn't update/override the point location of the Survey. Is there something I'm missing?
... View more
02-08-2018
10:31 AM
|
0
|
3
|
1678
|
Title | Kudos | Posted |
---|---|---|
1 | 12-07-2020 05:28 AM | |
1 | 12-11-2015 04:22 AM | |
1 | 10-25-2018 09:31 AM | |
1 | 03-28-2019 10:53 AM | |
5 | 02-14-2019 07:07 AM |
Online Status |
Offline
|
Date Last Visited |
07-06-2021
11:15 AM
|