|
POST
|
It looks like you are violating the "StructureJunction" constraint rule someone wrote/applied to your Manholes feature class. Either you are violating a Constraint Rule directly (when this happens you are not allow to complete your edit and it is discarded and the database rolled back to a pre-edit state) or your edit is triggering an update to another asset class that is violating a constraint rule. You can review your rules by right clicking your layer name in the ArcGIS Pro TOC > Choosing Design > and clicking Attribute Rules. You need the correct permissions to edit them (and if your layers are coming from a service you won't be able to edit them), but at least you can see them...Someone will have to change the rule to allow the edit. Not much help I know but (maybe) helpful information.
... View more
04-05-2022
01:33 PM
|
1
|
1
|
1045
|
|
POST
|
In the case were it only brings in 1.9 million of the 3.3 million records.... Does it throw an error message, or does the command complete; it just doesn't include all the records you expect?
... View more
04-04-2022
07:27 AM
|
0
|
1
|
772
|
|
POST
|
I'll start by saying I've never configured Visual Studio to write Arcpy code before and don't use it for Arcpy, but it sounds to me like maybe Visual Studio isn't configured correctly to use Arcpy. All I could find that might help with this is the below link. What I have used is Spyder which works like a charm for me and does show you the values of variables and a has a console for viewing messages and errors. It's also pretty easy to install and free. I get wanting to use only one environment for all development, but if you can use something else you might try Spyder. https://gis.stackexchange.com/questions/203380/setting-up-python-arcpy-with-arcgis-pro-and-visual-studio#:~:text=In%20Visual%20Studio%20open%20the,that%20path%20for%20each%20field.&text=Click%20Apply%20on%20the%20right.
... View more
04-02-2022
02:53 PM
|
0
|
0
|
1060
|
|
POST
|
If you are expecting more matches maybe it is a formatting problem (commonly blank space before or after; or embedded in, the ID). Try adding a new column to your newly created tables. Make the columns Text and make sure they have a reasonable length (something longer than your longest ID by a few characters). Now you can use the below code using "Calculate Field" in your attribute table to calc the new rows to the IDs without any hidden spaces. These row now become the ID for your join (don't forget to remove all joins from you polygon grid feature class first) return Trim(Replace($feature.IDWithSpaces, " ", ""))
... View more
03-31-2022
05:56 AM
|
0
|
0
|
10091
|
|
POST
|
After you save your mxd try getting a reference to the data frame and then the layers in the frame and looping through those: df = arcpy.mapping.ListDataFrames(mxd,"YourDataFrameNameHere")[0]
for fc in arcpy.mapping.ListLayers(mxd, data_frame=df):
arcpy.AddField_management(fc,"Name","TEXT",field_length=50) This code is going to add the attribute "Name" to every feature class in the data frame.
... View more
03-31-2022
03:00 AM
|
1
|
1
|
844
|
|
POST
|
Keep in mind I haven't tested this and it goes without says your working with copies of the parcel data specifically meant to be edited. I would try 1) Open the Attributes Fields for each parcel layer and turn off the visibility of all fields except the ObjectID, shape, and one other text field (probably something like RE). 2) Now that they have the bare minimum number of fields and the same schema (if they both contain the RE attributes and I'm assuming they do) export each to a new feature class by right clicking them in the Table of contents and selecting "Data" > "Export Features" 3) Merge these two together to get a third feature class containing all the parcels your interested in (using the Merge geoprocessing tool). 4) Open the attribute table of the resulting file and use Calculate Field to populate the "RE" attribute with the same value for every polygon. 5) Now that every polygon has the same value in RE you can use the "Dissolve" geoprocessing tool using RE to just get out outside edge of all the merged parcels. Keep in mind that the format of the "RE" field (or whichever common field you chose) must match between the two merged files. Also keep in mind your using thousand of polygons here so this could take a long time and depending on how well the two sources "edge match" where they should have a boundary in common (I.E. along the merge lines between the two sources) it could produce not "perfect" results.... you might have to clean it up a bit.
... View more
03-30-2022
01:42 PM
|
0
|
0
|
4499
|
|
POST
|
Just to be clear in my head: The end result you want is just the outside edge of a theoretical merging of the two Parcel datasets? You don't care about the actual parcel data itself, it is just an "input" to get the final results?
... View more
03-30-2022
01:22 PM
|
0
|
2
|
4522
|
|
POST
|
Thank you. The FID is the unique ID of your shapefile (the file you received was indeed a shapefile, it has a single name (I.E. shapefile) but is really made up of multiple files that make up the whole). First you'll have to right click the shapefile again and select "Joins and Relates" and then "Remove All Joins". Then I would make a copy of the shapefile (just in case) by right clicking and choosing "Data" > "Export Features" I would export the features to the default database created with your ArcGIS Pro project (It will be in the Catalog Pane; under databases and will have the same name as your project). Make sure you don't have any selected features or you will only get those in the exported feature class. This will export your grid shapefile to a feature class in that database. If it doesn't automatically get added to your map add it and remove the shapefile. Then I would similarly right click your .csv file in your Table of Contents and select "Data" > "Export Table" into the same file geodatabse (the default one). Then I would add that to the map. Right click the newly created Grid layer (now coming from your file geodatabase) and select "Open Attribute Table". Find the OID in the table that opens right click it and delete it. Now try your join again using these two sources both contained in the same geodatabase. If that works you can export the features from the joined grid feature class to a new GridWithDensity feature class and Density will be written to that feature class without requiring a join the next time. The only thing that worries me is that Domain error message... but hopefully that goes away.
... View more
03-30-2022
10:31 AM
|
1
|
2
|
10120
|
|
POST
|
Are both files Shapefiles? Feature classes? One Shapefile and one database table? Can you let me know the combo? Also, if you look at the "fields" for each table (right click in table of contents > click Design > then click "Fields") is there a Domain populated in any of your fields? One last ask. Can you share an image of your blank OID's in your shapefile table? Do you have an other ID field... maybe FID or ObjectID?
... View more
03-30-2022
09:01 AM
|
0
|
4
|
10130
|
|
POST
|
Sorry about that. Try just 'Return guid()' (without the 'digits'). This worked for me (I just tested it). return guid()
... View more
03-30-2022
03:18 AM
|
2
|
1
|
3207
|
|
POST
|
There is a GUID Arcade function that should do the trick. Data Functions | ArcGIS Arcade | ArcGIS Developer So I think the below will work if that is the format you are looking for. return GUID('digits')
... View more
03-29-2022
01:50 PM
|
0
|
4
|
3239
|
|
POST
|
This is shorter.... if it does what you want.... var A = Split($feature.Company,' ', -1, true)
iif(Count(A[0]) < 3, A[0] + " " + A[1] + "\n" + $feature.disp_num, A[0] + "\n" +$feature.disp_num)
... View more
03-29-2022
01:26 PM
|
1
|
1
|
2342
|
|
POST
|
If you have a column that contains the GridID in both tables (I.E A1, A2, etc) you can do one of either two things. 1) right click the name of the polygon grid layer in your table of contents. Click "Joins and Relates" and click "Add Join". This will open a dialog that will allow you to see the attributes of the Ship Density layer or table as if they were attributes of the Grid Square. When you click on Add Join this dialog will open with the input table already populated. For input join field pick the field in your polygon layer that contains the GridID. For "Join Table" pick the density table and for "Join Table Field" pick the attribute that contains your GridID in that table. The next time you open the table for the grid polygons you will see a column containing your ship density counts. You can symbolize on this. 2) you can add a column to your grid polygons called "ShipDensity". The perform the join as described above. Once the join is complete you can open the attribute table of the grid polygon shapefile and right click the column header for the new row. Select "Calculate field" and use the dialog that open to copy the ship density data into the grid polygons attribute table. You can then remove the join (by right clicking the poly layer and selecting remove all joins) and the ship density data will be in your polygon table.
... View more
03-28-2022
07:44 PM
|
0
|
6
|
10152
|
|
POST
|
I think that clears up the Arcade error. I don't think GroupBy works in versions per 2.5. Before you upgrade though, if your using ArcGIS enterprise, make sure your upgraded version will work with you enterprise version and database versions. I.E. updating has to be planned.
... View more
03-28-2022
05:27 PM
|
1
|
1
|
1031
|
|
POST
|
Maybe no one is reading this one anymore, but I revisited it. I couldn't stop thinking about this one so I gave it a go in a Dashboard and it turned out to be much harder than I thought it would be. I couldn't figure out how to do it just using GroupBy and OrderBy when in the Dashboard environment (long story but I couldn't get my Total Incidents, Predominant Incident Type, and Incident Name all in the same FeatureSet using this method... not saying its not possible. I just couldn't figure it out). Then I found this great sample on github: arcade-expressions/CombineMultipleLayers(SerialChart).md at master · Esri/arcade-expressions · GitHub Wow... Very cool! It shows you how to return your own custom FeatureSet from a dictionary. Using these two fields in my sample data: And this code to define the data source to use for my list: // Write an expression that returns a FeatureSet.
// Documentation: https://arcg.is/3c419TD
// Samples: https://arcg.is/38SEWWz
//----------------------------------------------------------
//Portal feature set
//----------------------------------------------------------
var IncidentsByCounty = GroupBy(FeatureSetByPortalItem(Portal('https://garbadehome.maps.arcgis.com'),'baa95b02c52147bf8962379e85831fe8',0,['County','Incident'], True),
[ //fields/expressions to group statistics by
{name: 'County', expression: 'County'},
{name: 'Incident', expression: 'Incident'}
],
[ // statistics to return for each unique categroy
{name: 'CountOfInc', expression: 'Incident', statistic: 'COUNT'}
]
)
var cntyNoIncident = GroupBy(IncidentsByCounty,
[ //fields/expressions to group statistics by
{name: 'County', expression: 'County'}
],
[ // statistics to return for each unique categroy
{name: 'Predom', expression: 'CountOfInc', statistic: 'MAX'},
{name: 'TotalInc', expression: 'CountOfInc', statistic: 'SUM'}
]
)
// Create empty array for features, feat object to populate array
var features = [];
var feat;
for(var cnty in cntyNoIncident){
var countyname = cnty.County
var predomCount = cnty.Predom
var incidentTotal = cnty.TotalInc
var predomIncType = filter(IncidentsByCounty,"County = @countyname AND CountOfInc = @predomCount")
var x = []
for (var topIncident in predomIncType){
Push (x, topIncident.Incident)
}
feat = {
attributes: {
County: countyname,
PredomIncidentType: Concatenate(x,'/'),
PredomIncidentTotal: predomCount,
TotalIncidents: incidentTotal,
},
}
Push(features, feat);
}
var outputDict = {
fields: [
{name: 'County', type: 'esriFieldTypeString'},
{name: 'PredomIncidentType', type: 'esriFieldTypeString'},
{name: 'PredomIncidentTotal', type: 'esriFieldTypeInteger'},
{name: 'TotalIncidents', type: 'esriFieldTypeInteger'},
],
geometryType: '',
features: features,
}
return FeatureSet(Text(outputDict));
//return predomIncType
I generated this List: I learned a bunch so thank you for the question. K
... View more
03-28-2022
03:14 PM
|
0
|
1
|
2066
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-25-2025 07:54 AM | |
| 1 | 07-25-2025 10:45 AM | |
| 1 | 05-10-2022 11:06 AM | |
| 1 | 05-09-2022 04:05 AM | |
| 1 | 03-17-2022 04:04 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-25-2025
07:47 AM
|