POST
|
Just figured out the problem: You can't include a zero cost to travel through a cell. I was allowing factors to range from 0 to 9, and should have made it 1 to 10 -- that fixed the problem. Zeros were creating nodata in back directions.
... View more
03-05-2024
09:10 PM
|
0
|
0
|
124
|
POST
|
I'm also running to some pretty serious nodata values resulting from using the DistanceAccumulation tool with a cost surface included. I thought I'd move to this tool because the cost distance tool is being deprecated, but I never saw this happen with that tool. I suspect that it results from categorical data being assigned costs, so there are sharp boundaries; I only say this because by adding slope data to the costs, the effect is minimized. The problem appears to arise from the back direction raster, which BTW won't save into a file geodatabase, but I've instead saved it to a TIFF. Also, what's a natural neighbor resampling? The only natural neighbors tool I know is interpolation from points; maybe you meant nearest neighbor?
... View more
03-05-2024
09:08 PM
|
0
|
0
|
124
|
POST
|
I've created a map in ArcGIS Online using my own tiled layers (including a PlanetScope image with a rectangular clip) in UTM Zone 10N as a basemap. This worked, however the map is rotated about 15 degrees to the east. I cannot see where to set any rotation, so I don't see how to fix it. Some of the rotation might be explained by having specified the rectangular clip in latitude and longitude and so the UTM will be slightly off from that at different parts of the zone, but by nothing approximating 15 degrees. Update: I may have the solution, but it's still puzzling. An icon that looked like a clock (see below) showed on the map, and that turned out to be the place to undo the rotation. Clicking it lets you "reset the map orientation" and then clicking the "home" button returns to the default map view, which for some reason is rotated.
... View more
05-16-2023
09:14 PM
|
0
|
1
|
318
|
POST
|
Indeed, it's there, at least for data. For the map, that box isn't there, but it's easy enough to go to the basemap layers, which will have it.
... View more
05-16-2023
03:03 PM
|
0
|
1
|
1422
|
POST
|
Where is the spatial reference information for maps and layers in ArcGIS Online? I've learned through experimentation a few relevant things: There is a spatial reference for every map. That's of course obvious. The spatial reference for a map is defined by that of the basemap. Any image layers (and presumably rasters in general) added to the map must be in that spatial reference defined by the basemap. Feature layers seem to be projected on the fly, as in ArcGIS desktop/pro. I guess the system mostly works, since most of the time you don't need to be aware of what the spatial reference is, and layers either display or produce errors. And since feature layers are projected on the fly, issues with those don't arise. However, i often work with imagery that I want to add to a map, and unless I've included clues like "UTM" in the title of the raster layer, I don't know what is in which coordinate system. Am I missing something? This would seem to be easy enough to provide, but my digging hasn't revealed anything.
... View more
05-16-2023
12:37 PM
|
1
|
4
|
1452
|
POST
|
Thanks for checking on that, Nick, and thanks to Esri's support responder. That solution makes sense, too, since by navigating to the folder in the os, you've set the current folder from its perspective. I've tended to be inconsistent in how I open ArcGIS Pro. Jerry
... View more
03-03-2023
08:24 AM
|
1
|
0
|
1320
|
DOC
|
In our labs at San Francisco State, we had the symbology crash problem go away when we updated to 2.9.5, and don't see it in 3.0.3 either.
... View more
12-28-2022
04:39 PM
|
0
|
0
|
22620
|
POST
|
"Well, I have no idea how this happened, but somehow os.getcwd() is now returning the project folder in ArcGIS Pro 3, as before. It's a Christmas miracle...." I posted the above and accepted that as a solution. However, the problem cropped up again. What appears to be happening is that os.getcwd() not surprisingly simply gets the current working directory (thus the name cwd) in memory at the time. If you start a new project, it'll have that project folder in memory, and that also seems to stick pretty well, except when it doesn't. Here's what it looks like when it works, for a project MyProject21 I created in the ArcGIS\\Projects folder: However, I still sometimes get C:\\WINDOWS\\system32 as shown below (or another wrong folder, maybe from another project) and I haven't yet figured out quite when that happens, or how to fix it when it doesn't, in a repeatable way, so I can provide clear instructions to students.
... View more
12-27-2022
06:58 PM
|
1
|
2
|
1593
|
POST
|
From what I've seen, the main difference is in rendering the output. When I describe the rendering behavior to students, I describe the difference is in the cartographic world where all the symbology happens, one level of abstraction removed from the GIS data world, which is in turn one level of abstraction removed from the real world. But at least for rasters it may also be that things like building a statistics file or not for continuous rasters may be a difference, but I haven't specifically tested it.
... View more
12-23-2022
05:38 PM
|
0
|
0
|
394
|
POST
|
Interestingly, that returns C:\Users\myusername\AppData\Local\Temp\ipykernel_8588\4269868497.py which I suspect may be something created by the notebook environment for the code cell -- not sure how notebook cells get handled by the python interpreter. Not the solution yet -- don't see how I'd get tot the .ipynb path from there -- but thanks for the suggestion.
... View more
12-21-2022
03:46 PM
|
0
|
0
|
1635
|
POST
|
Thanks for the suggestion, but I don't think that fixes it. I'm already standardizing on .ipynb files being stored in the project folder; I'm just needing my code to be able to use the path to that project folder, which should be the same as the folder my current .ipynb is stored in, as you note. That I can usually get within ArcGIS Pro by using os.path.dirname(env.workspace), but that doesn't work from an external IDE like Jupyter or VS-code, so I had found that os.getcwd() would work in either case. That works in Jupyter/VS-code and displays the folder the current file is in (which in my practice is the ArcGIS Pro project folder), but in ArcGIS Pro when editing the same file returns C:\\Windows\\system32, not where the .ipynb I'm currently editing resides. I'm trying to find code that will work in either environment when editing the same file.
... View more
12-21-2022
02:04 PM
|
0
|
0
|
1646
|
POST
|
I'm trying to find a way to access the path of the notebook file (.ipynb) that I'm currently editing, in a way that would work either in ArcGIS Pro or in an external IDE like Jupyter or VS-code. What I've done in the past, with ArcGIS Pro 2.8 (and possibly 2.9), is to use os.getcwd()to provide the folder that the current file being edited is in. This works in an external IDE but doesn't work in ArcGIS Pro anymore. In Pro, something like the following will work, at least with the default workspace location, to provide the project folder: os.path.dirname(arcpy.env.workspace) ... and that os.path.dirname() method will of course also work if we know the path for the notebook file itself. However the same method will not work when editing the file with an external IDE like VS-code or Jupyter, since there's no knowledge of the default workspace for the project, and indeed there's no knowledge of the ArcGIS Pro project at all: our file is just sitting in a folder. I purposefully standardize on editing these notebook files in the project folder (a slightly modified logic would work if I used a 'source' or 'notebooks' folder within the project folder just to keep things organized), to keep things simple for students; they can do things differently if they need to down the road as they get more comfortable. But currently, in ArcGIS Pro 3, os.getcwd() just returns 'C:\\WINDOWS\\system32' which is clearly not the project folder, and not where the .ipynb file I'm editing is located. There are what would seem to be obvious advantages in being able to edit a notebook either in ArcGIS Pro or an external IDE, and go back and forth, but I haven't figured out how to do this in ArcGIS Pro 3. And here's a typical situation I want to work in both places, to set the workspace to a geodatabase "pen.gdb" in my project folder, thus providing code that is portable within the project folder, and an easy way to create other resources (e.g. geodatabases, folders) within that project folder. import arcpy, os projdir = os.getcwd() arcpy.env.workspace = projdir + "\\pen.gdb" It all boils down to a simple question: Where is what I'm editing? Environment: [ArcGIS Pro 3.0.3, installed on my computer for all users, not just my user profile; Windows 10]
... View more
12-21-2022
12:35 PM
|
0
|
8
|
1671
|
IDEA
|
Same here. Data on AGOL can quickly become unmanageable, so using folder organization is arguably essential.
... View more
03-24-2022
01:05 PM
|
0
|
0
|
1039
|
POST
|
The instructions for HEC-GeoRAS has you digitize river center lines from upstream to downstream, and when that gets imported into HEC-RAS gets the direction right. However XS Cut Line station distances end up accumulating in the wrong direction: the XS Cut Line attributes for the most upstream XS has the highest station value, as shown below. I do know that engineers tend to count distances moving upstream, in contrast to hydrologists and boaters, so maybe there's some confusion. Anyone know? And how to get all of this working right?
... View more
08-19-2018
05:30 PM
|
0
|
1
|
1102
|
POST
|
How do you create an actual histogram chart from a raster in ArcGIS Pro? In Raster Functions under the Imagery tab, there is a Statistics and Histogram function under 'Appearance' but it's not clear how you can make a chart from it. This appears to create a statistics file, as ArcGIS desktop did, which is necessary to create a histogram. But there doesn't appear to be functionality anywhere to create a histogram from that statistics file. The documentation says you can make a chart from any map layer that has an attribute table, but the contextual data tab you would use to get there is only available for feature layers. I guess the value attribute tables of rasters are not considered attribute tables. One workaround I guess would be to sample the raster by random points and then create a chart from that, but they maybe shouldn't call the raster function 'Statistics and Histograms' unless it actually does something other than create a statistics file.
... View more
09-30-2017
11:27 AM
|
3
|
2
|
5034
|
Title | Kudos | Posted |
---|---|---|
1 | 05-16-2023 12:37 PM | |
1 | 03-03-2023 08:24 AM | |
1 | 12-27-2022 06:58 PM | |
3 | 09-30-2017 11:27 AM |
Online Status |
Offline
|
Date Last Visited |
03-06-2024
06:55 AM
|