POST
|
Thanks for clarification James. Just in case others post links to more recent versions of the topic you mention. I'd say the "Calculate Geometry Attributes" gp tool and methods on SHAPE.getArea quite recent additions, so they many not feature on those docs, but they probably should eventually. Cheers
... View more
07-10-2023
01:46 PM
|
0
|
0
|
707
|
POST
|
Hi James, The recommended ways of yore which you link is good: project the data into a coordinate system that is appropriate for areal or distance calculation based on your data's extent, then use a calculation like SHAPE.AREA. It's old like you say, maybe there's something more current somewhere. I will say though that WebMercator is pretty much never a good choice for area or distance calculations as it is highly distorted and areal values derived from it will be poor. See https://www.youtube.com/watch?v=UksOGfKrxXk A newer way you have access to in Pro is through the shape object. I'd say you'd want to look into this : `SHAPE.getArea(method="PRESERVE_SHAPE", units="AcresInt")` . This you can run on most coordinate systems, as the "PRESERVE_SHAPE" method will unproject the data, drape to geometry over the associated ellipsoid and perform the areal calculation of the shape. It's a bit slower , but removes common mistakes with bad coordinate systems, bad units, etc... Finally i always recommend to use explicit qualified units : eg "AcresInt" (for international) or "AcresUS" (for US unit) , not the unqualified "Acres", for clarity. Lastly , we have a gp tool called "Calculate Geometry Attributes" which does this PRESERVE_SHAPE pattern for calculating area, you can use that a bit more easily than writing python code (if you want). See https://pro.arcgis.com/en/pro-app/3.0/tool-reference/data-management/calculate-geometry-attributes.htm Cheers Ghislain Prince, Geoprocessing team
... View more
07-10-2023
01:16 PM
|
1
|
1
|
709
|
POST
|
Hi Alfred, community ideas are good way to go for that catalog pane "add file type" feature, also getting attached to ENH requests with tech support. We have arcpy.da.Walk to get data we know about, for the data formats Pro doesn't know about the approach of os.walk seems right to me. Your approach of a white and/or black list for your org's other data seems right. Finally we've worked on arcpy.da.Walk in recent releases, there's improvements to the online doc, as well as improved results for KML, .geodatabase, .atbx, parcel fabrics in the Pro 3.x releases. Cheers
... View more
06-05-2023
03:27 PM
|
0
|
0
|
884
|
POST
|
Hi Alfred, arcpy.da.Walk only returns object types recognized by the arcgis Pro application. Probably best analog is that walk will return data you see in Pro's catalog pane. Pro doesn't support Personal GDBs, so we don't see/find them in the catalog pane, nor in arcpy.da.Walk. For objects which happen to be a file on disk (eg: .zip, .pdf, ...) it's totally valid and good to use os.walk to find those.
... View more
06-05-2023
12:48 PM
|
0
|
1
|
893
|
POST
|
Hi ben, i think your add-in may not be following the expected folder structure. Review step3 in the embedding toolboxes add-in doc. Your toolbox should go under Toolboxes/toolboxes along with (optional) other folders. Below is the directory structure for the add-in i created. cheers \---Toolboxes
+---arcpy
| DeepThought.py
|
+---help
| \---gp
| | Answer_deepthought.xml
| | deepthought_toolbox.xml
| |
| +---messages
| | messages.xml
| |
| \---toolboxes
| DeepThought.xml
|
\---toolboxes
answer.py
DeepThought.tbx
sixbynine.py
... View more
08-20-2019
01:10 PM
|
1
|
3
|
2812
|
POST
|
hi Dwight, first make a copy of your data. What you'd want to do is identify all the features with identical geometry. This can be done with the `Find Identical` gp tool. Then get your stats together: the output of previous step you could use as input to `Summary Statistics` gp tool with the FEAT_SEQ as the CASE_FIELD and choose whichever stats you want for each field. Lastly you'll need to get the data back together into a single dataset... i think `Delete Identical` and `Join Fields` should do it ... there'll be a bit of trickiness to getting the JOIN , but pretty sure all the data is there.
... View more
02-25-2019
11:43 AM
|
1
|
1
|
887
|
POST
|
by command line i mean the "Python Command Prompt" application you can launch from the windows start menu. The multiple NumPy installation sounds like a meaningful error. If you've managed to get 2 of them installed into your arcgispro-py3 environment then that environment is in an unusable state. It may be easiest at this point to call tech support and get them to help you to get this machine back to functional/known state. The way will be through uninstall of pro, rename the leftover folder, and do new install (maybe some more things they're aware of).
... View more
08-16-2018
11:19 AM
|
0
|
1
|
1216
|
POST
|
Joe, if you're having trouble at 2.2.1 .. do read over both these issue Problem: After upgrading to ArcGIS Pro 2.2, geoprocessing tools fail to load and Python window returns "Failed to Initia… Problem: Unable to create environments or install packages after upgrading to ArcGIS Pro 2.2 "Is not having an active env selected problematic." yes, you need an active environment for various functionality in pro (python window, many gp tools, pyt, options on certain tools - like calculateField, etc). The fix is as you describe it: go to python backstage and activated arcgispro-py3 in the `Manage Environments` dialog. You can also this at the command line : proswap arcgispro-py3 . At that point you should not get a blank `Python Package Manager` page. Once the active environment is fixed, you may see the `env's does not exist` once. But not afterwards. Hope this helps.
... View more
08-14-2018
04:29 PM
|
0
|
3
|
1216
|
POST
|
you can keep the bz2, or delete them (they'll get pulled down again). James when you click `New` , do make sure you wait for the blue spinning status bar to complete before you click `Activate`. If that still doesn't work can you tell me what you see at the bottom of %LocalAppData%\esri\conda\conda_debug.log ?
... View more
08-14-2018
01:52 PM
|
0
|
6
|
1167
|
POST
|
James, did you look at this already? https://support.esri.com/en/technical-article/000018813
... View more
08-14-2018
12:46 PM
|
0
|
9
|
1167
|
POST
|
Hi Malcolm, that's the error you'd get if you forgot to import arcpy. Try this instead pls... 1. windows start button , select "Python Interactive Terminal" 2. import arcpy 3. print(arcpy.GetInstallInfo())
... View more
07-24-2018
10:53 AM
|
1
|
1
|
792
|
POST
|
Hi Abhijeet, can you look in conda_log.txt for the call that creates pyenv. It'll be this DEBUG:__main__:conda.cli.main called with ('C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\Scripts\\conda.exe', 'create', '--clone', 'arcgispro-py3', '-p', 'C:\\Users\\YourUserName\\AppData\\Local\\ESRI\\conda\\envs\\pyenv', '--no-shortcuts', '--pinned', '--json') can you paste here the next 5-10 lines of messages. thanks
... View more
07-09-2018
09:42 AM
|
0
|
2
|
3569
|
POST
|
Hi Håkon, thanks for reply. I noticed that late yesterday too. We've been trying to figure out a way to make conda work with this situation, we don't have it yet. We'll keep researching that. In the meantime this works if you're willing: browse to C:\Program Files\ArcGIS\Pro\bin\Python\pkgs . Do NOT delete the cache folder, and no need to delete the *.bz2, but delete the rest of the packages folders (asn1crypto-0.24.0-py36_0, attrs-18.1.0-py36_0, backcall-0.1.0-py36_0...) then clone & pro's python backstage worked for me. These folders will get created from the *.bz2 files next time you need them (ie. next time you clone). If you delete the *.bz2 files it's no big deal they'll get downloaded again (they're 80MB total).
... View more
07-06-2018
09:30 AM
|
4
|
0
|
5572
|
POST
|
@Hakon, i got by your problem by using `conda clean`. We're finding that some machines upgraded from 2.1 require this step. Also, your use of `conda create` will create an environment without modules such as numpy, matplotlib, and arcgis (to name a few) which parts of arcpy needs. To create an environment that'll work with arcpy (and that you can use with ArcGIS Pro you should clone arcgispro-py3 like so conda create --clone arcgispro-py3 --name %LocalAppData%\ESRI\conda\envs\my_env --verbose Fixing the "CondaError: Cannot link a source that does not exist." error. (arcgispro-py3) C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3>conda create --name prodebug2 python=3.6
WARNING: A space was detected in your requested environment path
'C:\Program Files\ArcGIS\Pro\bin\Python\envs\prodebug2'
Spaces in paths can sometimes be problematic.
Fetching package metadata ...............
Solving package specifications: .
Package plan for installation in environment C:\Program Files\ArcGIS\Pro\bin\Python\envs\prodebug2:
The following NEW packages will be INSTALLED:
certifi: 2018.4.16-py36_0
pip: 10.0.1-py36_0
python: 3.6.6-hea74fb7_0
setuptools: 39.2.0-py36_0
vc: 14-h0510ff6_3
vs2015_runtime: 14.0.25420-0 esri
wheel: 0.31.1-py36_0
wincertstore: 0.2-py36h7fe50ca_0
Proceed ( /n)? y
ERROR conda.core.link:_execute_actions(337): An error occurred while installing package 'defaults::python-3.6.6-hea74fb7_0'.
CondaError: Cannot link a source that does not exist. C:\Program Files\ArcGIS\Pro\bin\Python\pkgs\python-3.6.6-hea74fb7_0\Lib\__pycache__\__future__.cpython-36.pyc
Attempting to roll back.
CondaError: Cannot link a source that does not exist. C:\Program Files\ArcGIS\Pro\bin\Python\pkgs\python-3.6.6-hea74fb7_0\Lib\__pycache__\__future__.cpython-36.pyc
(arcgispro-py3) C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3>conda clean --all
Cache location: C:\Program Files\ArcGIS\Pro\bin\Python\pkgs
Will remove the following tarballs:
C:\Program Files\ArcGIS\Pro\bin\Python\pkgs
-------------------------------------------
--- SNIPPED OUT LONG LIST OF PACKAGES AND PROMPTS ---
(arcgispro-py3) C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3>conda create --name prodebug3 python=3.6
WARNING: A space was detected in your requested environment path
'C:\Program Files\ArcGIS\Pro\bin\Python\envs\prodebug3'
Spaces in paths can sometimes be problematic.
Fetching package metadata ...............
Solving package specifications: .
Package plan for installation in environment C:\Program Files\ArcGIS\Pro\bin\Python\envs\prodebug3:
The following NEW packages will be INSTALLED:
certifi: 2018.4.16-py36_0
pip: 10.0.1-py36_0
python: 3.6.6-hea74fb7_0
setuptools: 39.2.0-py36_0
vc: 14-h0510ff6_3
vs2015_runtime: 14.0.25420-0 esri
wheel: 0.31.1-py36_0
wincertstore: 0.2-py36h7fe50ca_0
Proceed ( /n)? y
vs2015_runtime 100% |###############################| Time: 0:00:00 2.38 MB/s
vc-14-h0510ff6 100% |###############################| Time: 0:00:00 0.00 B/s
python-3.6.6-h 100% |###############################| Time: 0:00:02 9.62 MB/s
certifi-2018.4 100% |###############################| Time: 0:00:00 0.00 B/s
wincertstore-0 100% |###############################| Time: 0:00:00 881.16 kB/s
setuptools-39. 100% |###############################| Time: 0:00:00 4.67 MB/s
wheel-0.31.1-p 100% |###############################| Time: 0:00:00 5.26 MB/s
pip-10.0.1-py3 100% |###############################| Time: 0:00:00 6.07 MB/s
#
# To activate this environment, use:
# > activate prodebug3
#
# To deactivate an active environment, use:
# > deactivate
#
# * for power-users using bash, you must source
#
(arcgispro-py3) C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3>activate prodebug3
(prodebug3) C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3>
... View more
07-05-2018
11:39 AM
|
1
|
2
|
5572
|
POST
|
Chris try this pls. Open ArcGISPro 2.2, confirm that the python window is functional (doesn't display red text "Failed to initialize interpreter"). If python window is functional go to python in back stage open the "Manage Environments" button, click "New" WAIT until the blue progress spinner at the bottom of the dialog completes. This may take a while (think 10 minutes). Don't click anything else during this time. click Activate and restart ArcGISPro if that fails pls paste last few lines in %LocalAppData%\ESRI\conda\conda_log.txt here . thanks
... View more
07-04-2018
12:37 PM
|
1
|
7
|
3569
|
Title | Kudos | Posted |
---|---|---|
1 | 07-10-2023 01:16 PM | |
1 | 07-24-2018 10:53 AM | |
1 | 07-04-2018 12:37 PM | |
1 | 03-15-2018 03:56 PM | |
1 | 07-05-2018 11:39 AM |
Online Status |
Offline
|
Date Last Visited |
03-10-2024
11:30 PM
|