POST
|
Thanks! Unfortunately I'm still getting the same error message. Seems it still doesn't like the attempt to subscript an integer field, even with the string function. I don't know why Field Type is showing as 'TEXT' there - the 'test' field I created is definitely an integer field.
... View more
4 weeks ago
|
0
|
2
|
113
|
POST
|
I am using ArcGIS Pro 2.7. I have a column of Easting values which each correspond to the bottom left corner of an OS UK grid square. I want to centre each value to be in the middle of whatever 1km grid square it intersects. The easting values are an integer field, each with a 6 digit number expressing how far the cell is from the origin of the OS UK grid. To create my centred 1km square field, I want to take the first 3 digits of each easting value and replace the last 3 digits with '500'. So for example, 217890 would become 217500. I had thought to use !easting![0:3] in this part of the expression in Field Calculator, but it turns out that integer fields are not subscriptable. The somewhat laborious workaround I am using is to: 1. Copy the easting values into a new text field as a string 2. Create a second new text field and populate that with the values from the new easting text field, replacing the last three characters with '500'. 3. Populate the centred easting, integer field with the values from the second text field. There must be a way to do this in one go though - either to select digits from an integer field in Field Calculator, or replace specific digits from an integer field with another set of digits in Field Calculator? I haven't been able to find any examples of this, though. Any insight much appreciated. Thanks!
... View more
4 weeks ago
|
0
|
8
|
232
|
POST
|
OK, I think I've solved it, and it was obviously something obvious - I just needed to switch off all elements that were outside the page before exporting. I'm pretty sure I have just placed inactive elements (such as the table frame for which the data layer is switched off in the screenshot above) outside the page in the past and it has exported and clipped to graphics extent just fine. Anyhow, problem solved, for now, apparently!
... View more
01-15-2021
02:12 AM
|
2
|
0
|
109
|
POST
|
I am using ArcGIS Pro 2.7.0. I often have to export JPEG map images that are the width of an A4 portrait page but not a full page in height. The layout elements are normally all contained within the map frame, so I just draw a frame of the size I want and tick the 'clip to graphics extent' box when exporting. I will change the map layers and export several maps from the same template without touching the layout elements. Every now and then the layout exports with a strip of empty layout page at the bottom, despite the fact that the 'clip to graphics extent' button is still ticked, and no elements have been moved since the last export. I can't work out any pattern to this. The strip is of varying height each time it happens. Sometimes this happens for one image exported off a template, but not for the one afterwards, and I only notice when going back through the files later. Sometimes it happens continually, and Pro seems 'locked' into exporting images with a random strip at the bottom. Toggling the 'clip to graphics extent' switch on and off and closing Pro and opening it don't seem to do anything. The only way to 'reset' it seems to be to rebuild a new layout from scratch, which is very frustrating and time consuming. Screenshot below of thumbnail images from the same template that were all exported with 'clip to graphics extent' ticked. The third image has the strip I am referring to. Screenshot of my layout workspace, showing all the elements either within the map frame or off the layout page, with the 'Clip to graphics extent' button ticked: Does anyone have any idea what is going on here?
... View more
01-15-2021
01:43 AM
|
0
|
1
|
114
|
POST
|
Nice solution! I've been trying to repurpose this to remove all characters AFTER a certain character, but I'm stuck. Could you help, please?
... View more
11-12-2020
02:15 AM
|
0
|
0
|
600
|
POST
|
I'm not sure. I thought that should have been fine because png files can have spaces in the filename. I tried creating a dummy dataset to base the map series on with no spaces in the species names. Still didn't work, although the error message was different:
... View more
07-14-2020
05:04 AM
|
0
|
1
|
196
|
POST
|
Update: I am now trying to batch export each page of the finished map series as individual PNG files. I found an example Python snippet to do this here: MapSeries—ArcPy | Documentation I'm quite new to Python but I dived in trying to modify this to fit my own workflow. This is the best I could get after a few attempts: The error message suggests something is wrong in the l.exportToPNG function, or maybe the os.path.join function within it. I had thought about just pasting the whole path straight into the l.exportToPNG function but thought then I wasn't sure how I'd automate changing the name for each PNG file. If anyone could point out where I'm going wrong here that would be much appreciated.
... View more
07-13-2020
08:04 AM
|
0
|
3
|
196
|
Online Status |
Offline
|
Date Last Visited |
4 weeks ago
|