|
POST
|
I am working with a new taxlot dataset that requires building the fabric from just polygons (which is new to me). I am following the documented recommendation to use "SimplifyByStraightLinesAndCircularArcs" (without it I end up creating WAY to many lines). In some cases the conversion converts lines to curves that I do not think should be converted and it is a problem. I have changed the parameters for max_offset, max_arc_angle_step, min_arc_angle, and min_vertex_count to MANY alternatives. Some of the silly (see below) and some push the options to extremes. But the changes do not seem to impact the outcome. For example, you would think a max offset of .01 would mean lines would not deviate from the original by more the .01 (or so). But that is not the case and it appears I get offsets close to .1. arcpy.edit.SimplifyByStraightLinesAndCircularArcs( in_features=OutClassTxLtPly, max_offset="0.01 Feet", fitting_type="FIT_TO_VERTICES", circular_arcs="CREATE", max_arc_angle_step=2, min_vertex_count=4, min_radius=None, max_radius=None, min_arc_angle=2, closed_ends="PRESERVE", anchor_points=None ) The taxlot dataset I am converting is pretty typical and contains rural and urban maps. My question is... Is there a best practice or are there recommended options (besides using the defaults) for running this tool on parcels to create an optimal result ???
... View more
07-03-2023
03:07 PM
|
0
|
3
|
2104
|
|
POST
|
Not sure, but I have found in 3.11 that when things run VERY slow when using a file geodatabase (not enterprise service), running compact on the database makes a HUGE difference.
... View more
04-27-2023
01:52 PM
|
0
|
0
|
1072
|
|
POST
|
We had similar issues and selected our published "TAXMAP" as our record. Taxmaps are either section, quarter section or quarter/quarter section areas (approximately) and represent a published map. We used these as our default record. It works pretty well. The are an attribute of the taxlot polygons so it was easy to create records for them. Unfortunately, our pre-existing linework did not have a record. I used to following to associate the converted lines with the record: Create a new temp feature class by intersecting the converted lines with the record polygons (only keep the featuerids) Do a double join to join line work with the records Calc the creatdby record in linework to be equal to the record guiid. This seems to work pretty well. Obviously the result makes sure every line has a record but lines on the border are going to go one record or the other - but who cares. (See attached code snippet)
... View more
04-27-2023
01:48 PM
|
1
|
0
|
2308
|
|
POST
|
I have an issue with cleaning up after my conversion process. I am using 2.9X ArcPro. I have many multi-part taxlots in ArcMap and need these to persist in ArcPro/Fabric. I have good line attributes and want to build my taxlot parcel polygons from my good line attributes. (I understand the limitations of this and address it in my conversion process) Here is the part of my process that is generating the problem. Convert ArcMap taxlotlines to ArcPro Fabric Taxlot_lines (works as expected - uses esri tool etc...) Split the arcmap taxlot polygons into multipart ArcPro polygons (works as expected) Generate points (polygon centroids) from the new multi-part ArcPro polygons (works as expected) Create New ArcPro Polygons for converted ArcPro Taxlot_lines & New Points (works as expected) Use Dissolve (or pairwise dissolve) to re-created multi-part polygons (Problem - Dissolve generates a small number number of tiny slivers - see below). Dissolve has no tolerance and it does not matter what option I use. Dissolve just seems to do this. The rest of my process works as expected Question: What is the best way to get rid of these slivers in 2.9? When I build parcels from my polygons the slivers at duplicate lines or "near duplicate lines" in my taxlot_lines feature class. My fabric has less then 20,000 polygons. Due to upgrade issues with servers my folks will NOT be able to upgrade to 3.x / 11.x for quite some time.
... View more
04-27-2023
09:46 AM
|
0
|
0
|
755
|
|
POST
|
For it appear in the Web Service fabric it has to published as an expression as part of the service. It cannot be created post publishing. Not sure I follow. I am just moving this rule over to a branched service environment as setup by my Enterprise Admin Folks (11.X/3.11. The relationship classes are not visible in the portal but they are working because I can select all features associated with a record and it works. Are you saying that the relationship classes must be explicitly published (so I can see them in portal)?
... View more
04-25-2023
03:15 PM
|
1
|
0
|
1747
|
|
POST
|
I am testing branched version environment in an ArcPro 30 environment. This is what I have been using to get a layers workspace from the layer's datasource. Essentially you grab everything from the layers datasource before the last "/" as the datasource also contains the feature class name. Not sure if it will work for you but seems to work for me. AnnoLayer = "Anno0200Scale" thisProject = arcpy.mp.ArcGISProject("CURRENT") Map = thisProject.activeMap AnnoLyr = Map.listLayers(AnnoLayer)[0] FolderPath = thisProject.homeFolder datasource = AnnoLyr.dataSource lastslash = datasource.rfind("/") workspace = datasource[:lastslash] arcpy.AddMessage(workspace)
... View more
11-18-2022
05:44 AM
|
1
|
0
|
3016
|
|
POST
|
This problem may be larger then first reported. I ran the following interactively. I have a feature class (displayed as a layer) in a local geodatabase (Taxlot_linesAnno0200) and a branched version service layer called Anno0200Scale. I attempted to append the features (4) in Taxlot_linesAnno2400 to a branched version Layer (Anno0200Scale). When finished the 4 features do NOT appear in my Anno020)Scale feature class. However the DO appear in the attribute table. If I double click on the row in the table THEN it will appear on the map. In addition if I leave the project and re-open the project then all features will appear normally. I am hoping we have something setup incorrectly in how I am referencing this version or if it is a bug it gets fixed soon. I will be reporting this as a bug today.
... View more
11-14-2022
09:11 AM
|
0
|
0
|
734
|
|
POST
|
We use a lot of tools/scripts to calculate values within the ArcPro/Parcel Fabric Branched Version Environment (when it makes sense not to use tasks or calc attribute rules). I am testing Version 3.0+ and have run into the following problem and am hoping that I may doing something wrong. After a lot of testing I have created the following simple script that that illustrates the problem. (This all works fine in 2.94 and in a standard GeoDatabase). We do not use SDE for editing. Start State: Within Branched Version (GISADMIN.T67_9c_Test200Anno4) map session, Anno0200Scale feature class with Field (MapNumber) with value set to '6.3.8C'). Process: APRX is open, Tool in Tool Box runs script, Select OBJECTID = 7695 and Calc the value for MapNumber to be "XXXX" . I have tested this using arcpy.da.Editor using UpdateCursor with the Source being: https://giscarts.co.polk.or.us/server/rest/services/PF/Parcel_Fabric_3/FeatureServer;VERSION=GISADMI... which I calculate from the datasource of the Anno0200Scale feature class (after I removed the feature class name from the datasource text string). I have tested this without using the arcpy.da.Editor with da.UpdateCursor. I have also tested this with a simple CalculateField both using the arcpy.da.editor and not using it. Problem: I always get the same result. NOTHING HAPPENS unless I close the ArcPro session and reopen it. Then I can see the change. Using refresh screen / Change Version tool etc... None of it works. Its like the edit did not happen until I close the session and then go back in. My hope is that I am doing something wrong and somebody can help me out. Below is the script (again this is not production just a test). - it is also attached as a txt file. Finally, within a simple edit session I can interactively select features and calculate attributes, see the results with no problem. import arcpy, os # 1. Get parameter values AnnoLayer = 'Anno0200Scale' #2. Set Map Layers and default paths thisProject = arcpy.mp.ArcGISProject("CURRENT") Map = thisProject.activeMap AnnoLyr = Map.listLayers(AnnoLayer)[0] FolderPath = thisProject.homeFolder arcpy.AddMessage ("Map: " + Map.name) arcpy.AddMessage (AnnoLyr.dataSource) datasource = AnnoLyr.dataSource lastslash = datasource.rfind("/") workspace = datasource[:lastslash] arcpy.AddMessage(workspace) MapNumber = 'XXXX' # do edit session (Comment it out if you do not want to use it edit = arcpy.da.Editor(workspace) edit.startEditing(with_undo=False, multiuser_mode=True) edit.startOperation() with arcpy.da.UpdateCursor(AnnoLyr, ["MapNumber"],"OBJECTID = 7695") as cursor: for row in cursor: row[0] = MapNumber cursor.updateRow(row) edit.stopOperation() edit.stopEditing(save_changes=True)
... View more
11-14-2022
05:13 AM
|
1
|
1
|
818
|
|
POST
|
We use a lot of tools/scripts to calculate values within the ArcPro/Parcel Fabric Branched Version Environment (when it makes sense not to use tasks or calc attribute rules). I am testing Version 3.0+ and have run into the following problem and am hoping that I may doing something wrong. After a lot of testing I have created the following simple script that that illustrates the problem. (This all works fine in 2.94 and in a standard GeoDatabase). We do not use SDE for editing. Start State: Within Branched Version (GISADMIN.T67_9c_Test200Anno4) , Anno0200Scale feature class with Field (MapNumber) with value set to '6.3.8C'). Proposed Process: Select OBJECTID = 7695 and Calc the value for MapNumber to be "XXXX" . I have tested this using arcpy.da.Editor using UpdateCursor with the Source being: https://giscarts.co.polk.or.us/server/rest/services/PF/Parcel_Fabric_3/FeatureServer;VERSION=GISADMIN.T67_9c_Test200Anno4;VERSIONGUID={6284F53F-3A4B-4FFF-994E-7606A6AA3783} which I calculate from the datasource of the Anno0200Scale feature class (after I removed the feature class name from the datasource text string). I have tested this without using the arcpy.da.Editor with da.UpdateCursor. I have also tested this with a simple CalculateField both using the arcpy.da.editor and not using it. Problem: I always get the same result. NOTHING HAPPENS unless I close the ArcPro session and reopen it. Then I can see the change. Using refresh screen / Change Version tool etc... None of it works. Its like the edit did not happen until I close the session and then go back in. My hope is that I am doing something wrong and somebody can help me out. Below is the script (again this is not production just a test). - it is also attached as a txt file. Finally, within a simple edit session I can interactively select features and calculate attributes, see the results with no problem. import arcpy, os # 1. Get parameter values AnnoLayer = 'Anno0200Scale' #2. Set Map Layers and default paths thisProject = arcpy.mp.ArcGISProject("CURRENT") Map = thisProject.activeMap AnnoLyr = Map.listLayers(AnnoLayer)[0] FolderPath = thisProject.homeFolder arcpy.AddMessage ("Map: " + Map.name) arcpy.AddMessage (AnnoLyr.dataSource) datasource = AnnoLyr.dataSource lastslash = datasource.rfind("/") workspace = datasource[:lastslash] arcpy.AddMessage(workspace) MapNumber = 'XXXX' # do edit session (Comment it out if you do not want to use it edit = arcpy.da.Editor(workspace) edit.startEditing(with_undo=False, multiuser_mode=True) edit.startOperation() with arcpy.da.UpdateCursor(AnnoLyr, ["MapNumber"],"OBJECTID = 7695") as cursor: for row in cursor: row[0] = MapNumber cursor.updateRow(row) edit.stopOperation() edit.stopEditing(save_changes=True)
... View more
11-13-2022
12:47 PM
|
0
|
2
|
1989
|
|
POST
|
We have recently begun using different "maps" to help organize edit workflows for parcel fabric. We have also been using Tasks. Unfortunately, it appears that Task "map views" can ONLY be set at design time using the task design environment and there is no setting for "use current or activemap". In the example below (very simplified) "Map1" is the active map for the task. If I want to use "Map" I have to open the designer and select it as the active map or press the "CurrentView" button at the bottom of the screen and if "Map" is the active view it will set it. But, again this only works at design time. If so, tasks are tied to a specific view or map and whenever someone changes the map name all tasks associated with the map must also be changed. I feel like I am missing something so any clarification would be greatly appreciated. If this is how it works I will need to re-think some things.
... View more
10-05-2022
12:48 PM
|
0
|
2
|
811
|
|
IDEA
|
Just to be sure - if this SDE it it is a SCHEMA change so you have other problems. Changing a SCHEMA impacts everyone. So... this works well in a geodatabase but not sure in a workflow how it would work for you.
... View more
09-28-2022
09:15 AM
|
0
|
0
|
2742
|
|
IDEA
|
I agree - I had to create the following script to do that (currently does off but code for turning back on is also present. #0-EnableDisableAttributeRules.py
#
# Rules set to "Off" will enable attribute rules.
#
# Inputs: All feature classes in Geodatabase (rules off)
# Geodatabase path built from a couple different variables
# leftovers from ArcMap/ArcInfo days
#
# Outputs: All feature class in Geodatabase with attribute rules either turned on or off
#
# Dean - 11/2020
import os,arcpy,time,datetime,traceback,shutil
def DisableRules(FC,ruletypes):
desc = arcpy.Describe(fc).attributeRules
for rule in desc:
for rtype in ruletypes:
rtypeesri = "esriART" + rtype
print (rtypeesri)
if rule.isEnabled == True and rule.type == rtypeesri:
print("Disabling " + rtype + " rule: {}".format(rule.name))
arcpy.DisableAttributeRules_management(fc, rule.name)
def EnableRules(FC,ruletypes):
desc = arcpy.Describe(fc).attributeRules
for rule in desc:
for rtype in ruletypes:
rtypeesri = "esriART" + rtype
#print (rtypeesri)
if rule.isEnabled == False and rule.type == rtypeesri:
print("Enabling " + rtype + " rule: {}".format(rule.name))
arcpy.EnableAttributeRules_management(fc, rule.name)
#######################################
try:
logfile = "D:\\GISLogs\\DisableAttributeRulesAllOff.txt"
arcpy.Delete_management (logfile)
logfile = open(logfile, "w")
starttime = datetime.datetime.now()
logfile.write ('\n' + '\n' + "StartTime:" + str(starttime) + '\n' + '\n')
print ("StartTime:" + str(starttime))
Rules = "Off"
Tile = 'T7-4'
print (Tile)
Library = 'P:\\ORMAProFabric\\TaxmapPolkV302\\'
OutDb = Library + Tile + "\\Fabric\\TownEd.gdb"
FabricPath = OutDb
arcpy.env.workspace = FabricPath
datasets = arcpy.ListDatasets(feature_type='feature')
datasets = [''] + datasets if datasets is not None else []
ruletypes = ["Constraint","Calculation","Validation"]
#ruletypes = ["Calculation"]
for ds in datasets:
for fc in arcpy.ListFeatureClasses(feature_dataset=ds):
print (fc)
path = os.path.join(arcpy.env.workspace, ds, fc)
if Rules == "On":
EnableRules(fc,ruletypes)
else:
DisableRules(fc,ruletypes)
except:
badness = traceback.format_exc()
print ('\n' + '\n' + "*** BADNESS ****" + '\n' + '\n')
print (badness)
logfile.write ('\n' + '\n' + "**** BADNESS *****" + '\n' + '\n')
logfile.write (badness)
logfile.close()
... View more
09-28-2022
07:32 AM
|
0
|
0
|
2759
|
|
POST
|
Ken Using the changeversion tool as a script does not seem to work in 2.94. I finally broke it down into a small python script for a single feature class. It works within a python window so I assume it work also work in notbook. It does not work as a script a call from the tool. The tool (within toolbox) just runs the external script with no arguments as follows: Summary of error: In the following I have a map named "t104_4_test1" it currently references "Default" . I want to change ALL layers from default to a new version "andersd.t104_4_test1" I just created (The create version works great and my process to create a new map with the version name also works). Also - my layer 'Anno0400Scale' visibility is turned off. Here is the code... ------------------------------ import arcpy, datetime, sys Map = "t104_4_test1" Version = "andersd.t104_4_test1" thisProject = arcpy.mp.ArcGISProject("CURRENT") map = thisProject.listMaps("LocatorMap")[0] LayerToChange = map.listLayers('Anno0400Scale')[0] arcpy.management.ChangeVersion(LayerToChange, 'BRANCH', Version,"","") LayerToChange.visible = True ------------------------------------------ When I run this code in ArcPro in a PYTHON window it works fine. When I run this code in a script the visibility of my layer changes so I know the layer and map are being referenced correctly but the layer version is NOT changed. I am hopeful that this will work in a 3.0 environment but we are still setting that up as a test environment.
... View more
09-23-2022
11:46 AM
|
0
|
0
|
1295
|
|
POST
|
Here are a bunch of examples of how to play with python strings (slice, modify, etc). https://www.w3schools.com/python/python_strings.asp
... View more
09-21-2022
02:24 PM
|
1
|
0
|
948
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-09-2025 10:30 AM | |
| 1 | 02-05-2025 06:39 AM | |
| 1 | 06-10-2024 10:15 AM | |
| 1 | 06-10-2024 05:19 AM | |
| 1 | 06-05-2024 11:55 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-20-2025
11:48 AM
|