POST
|
When I click 'Insert Legend' on a layout on ArcGIS Pro, I draw a box around where I want the legend to be, but the actual legend never fills the box, as in the image below that shows the box I drew and the resulting legend. In this case, the text of the layer name is being cut off. Changing the height and width in the element pane of the legend just resizes the box, not the legend itself. The only thing that seems to change the legend size is adding new layers, but I don't know why it is automatically setting a size that doesn't accommodate the text here. Does anyone know how I manually change the size of the legend itself, or set it to automatically accommodate the text?
... View more
02-16-2024
02:00 AM
|
0
|
1
|
259
|
POST
|
Thanks for the clear description and tip about the if clause parentheses 🙂
... View more
01-05-2024
08:00 AM
|
0
|
0
|
575
|
POST
|
I am trying to populate fields with centred Easting/ Northing coordinates from a field of British National Grid grid references. I want to take different digits from the grid reference depending on its number of characters (precision). Without going into the details of BNG grid references too much, an example expression to take an Easting coordinate for me looks like this: int(str(!Easting_1!)+str(!Grid_ref![2:7])) If I enter this, or a slightly modified version for a different length grid reference, directly as the field calculator expression, it works fine. However, when I try to include a bunch of slightly modified versions of the above as if/else statements in the Code Block, I get an invalid syntax error: I'm not sure what is going on as I am copying and pasting code from if/else statements that work fine for me elsewhere, just replacing the return value with 'int(str(!Easting_1!)+str(!Grid_ref![X:X]+"X"))', which is an expression that works fine when I use it to calculate a field directly, without the Code Block. Any help much appreciated!
... View more
01-05-2024
07:10 AM
|
0
|
4
|
675
|
POST
|
Thanks so much for taking the time to help here. The pure model builder solution has worked. I still have an itch as to why the other method didn't work, but I'll have to leave that unscratched for now!
... View more
12-22-2023
04:53 AM
|
1
|
0
|
656
|
POST
|
Thanks, I tried using Add Field to create two new Float fields, populated one with the values from the original Long field, then tried to calculate percentages for the other and still got the same error message. The indentation is correct in the codeblock, it just looks slightly off because I had to paste those screenshots in two separate parts. Running the codeblock to just return 'S' or 'a' also led to the same error. The ultimate goal is to make a chart map showing bar charts of how many species have been recorded in each 10km square over a region, for a variety of taxon groups, e.g. birds, plants, butterflies, etc. But I want the axes to be broadly comparable, and there a wildly different numbers of species in each taxon group in the region, e.g. 100s of plants but only 30 butterflies. So I want to show in each square, the percentage of all species in the region that have been recorded in that square, for each taxon group, like the table below but with many more taxon group columns: 10km square Plant_Species Plant_Species_% A 1245 32.38 B 515 13.39 C 1112 28.92 D 973 25.31 I just made this dummy table to try to figure out the calculate percentage part, but am falling down even at this first step! How would I incorporate the results of a Summary Statistics into the field calculator? Is there a way to make the output from Summary Statistics into an inline variable in model builder?
... View more
12-21-2023
09:40 AM
|
0
|
2
|
663
|
POST
|
Sorry, what exactly do you mean by 'scale and precision for the field properties'? I can't see any options for those when creating a new field in Fields View or in Field Calculator. The table is a dummy table as I try to figure this out to later put it in a model. It only has 4 rows, and the values of the column I am trying to calculate percentages for are: 1245 515 1112 973 I have just tried running the calculation from two float fields, and also inserting float(a) and float(S) into the final line of my codeblock. Still getting the same error message! Thanks for your help so far.
... View more
12-21-2023
02:37 AM
|
0
|
0
|
668
|
POST
|
Hi, thanks for the reply. Sorry, I realised I posted the wrong screenshot for the expression section, I have edited now. It should be: 'Plant_Taxa_Percentage' is a Double field, 'Plant_Taxa_Recorded' is a Long field. So I am using the codeblock above to try to populate the Double field with percentage values derived from the Long field. I've tried using int( (a/s) * 100) and get the same error message. I have also tried creating two new Double fields, populating one with the values from the Long field, and then calculating percentage from that in the other Double field, so that it was a Double to Double calculation, but still got the same error message. I then wondered if the 'if len(list) == 0' bit of the code was causing issues, but I tried a previous accepted answer in the above thread that didn't have this component and still got the same error message...
... View more
12-20-2023
02:53 AM
|
0
|
2
|
696
|
POST
|
I have a table of grid cells with a field for the number of plant taxa recorded in each grid cell. I want to calculate a new field showing the percentage of all plant taxa across all grid cells that have been recorded in each grid cell. The plant taxa recorded field is of type Long and looks like this: I am adapting the answers to a thread asking this same question here: https://community.esri.com/t5/python-questions/field-calculator-sum-of-field/m-p/141870/highlight/true#M11036 For some reason this text box won't let me copy and paste indentation. I am pasting snapshots of my codeblock in two parts: The expression is: The expression says its valid. I have taken this from copying and pasting an accepted solution in the above thread and just put my own path in there. The field I am creating is of type Double. When I try to calculate, I get the following error message: ERROR 000539: Traceback (most recent call last): File "<expression>", line 1, in <module> File "<string>", line 11, in update TypeError: unsupported operand type(s) for +: 'int' and 'NoneType' Can anyone please help me understand what is going wrong?
... View more
12-19-2023
08:58 AM
|
0
|
8
|
806
|
POST
|
Great, thanks for the info Tom, happily in this case there is no need for the tags.
... View more
12-07-2023
08:55 AM
|
0
|
0
|
1051
|
POST
|
Thanks Tom. What exactly do accessibility tags do? Am I losing anything by not having them? Didn't find a quick answer searching online. Interestingly, an interactive pdf with legend exported anyway, even with the 'PDF Layers Only' option selected, following Eugene's answer above.
... View more
12-07-2023
08:34 AM
|
0
|
2
|
1057
|
POST
|
Thanks so much! I toggled 'Export georeference information' on the Export Map tab, but the 'PDF Layers and Features' option still wasn't appearing in the drop-down menu on the Export Layout tab, probably because of the 'Include Accessibility Tags' option was checked as Tom mentions below. However, this worked anyway, and even with selecting 'PDF Layers Only' it still exported a pdf with switchable layers and a legend.
... View more
12-07-2023
08:28 AM
|
0
|
0
|
1058
|
POST
|
Thank you for highlighting that! I misread the article. I have managed to export the map as an interactive pdf now, but it does not include any kind of legend. Is there any way to get a legend showing symbology on there?
... View more
12-07-2023
06:46 AM
|
0
|
2
|
1082
|
POST
|
I am using ArcGIS Pro 3.1.3. I would like to export a layout as an interactive pdf. The ESRI support article - https://support.esri.com/en-us/knowledge-base/how-to-export-a-map-as-an-interactive-pdf-in-arcgis-pro-000027943 - says to check the 'Export georeference information' box, and select 'PDF Layers and Feature Attributes' from the 'Layers and attributes' drop-down menu - see screenshot below. However, when I try and do that on my version of Pro, I see no such option on the drop down menu - see screenshot below: Does anyone have any ideas of what is going on here?
... View more
12-07-2023
03:33 AM
|
0
|
10
|
1283
|
POST
|
Many thanks Dan. I went for the Field Statistics to Table option, good to know about that!
... View more
11-10-2023
08:58 AM
|
0
|
0
|
471
|
Title | Kudos | Posted |
---|---|---|
1 | 10-25-2023 08:54 AM | |
1 | 12-22-2023 04:53 AM | |
1 | 02-10-2021 06:10 AM | |
2 | 01-15-2021 02:12 AM | |
1 | 06-29-2020 08:43 AM |
Online Status |
Offline
|
Date Last Visited |
02-16-2024
11:53 AM
|