Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

New answers tagged

0

I would recommend referencing ArcGIS Pro documentation on Infographics. I haven't seen this feature avaialable for ArcGIS Pro at this point. It seems that the current availability for this option is via the templates. Infographics present key indicators and summarized information for locations through templates of interactive charts, tables, maps, and ...


0

In situations such as these, you have three options: Tile your input imagery into smaller pieces Choose a computer system with increased specs Attempt to use different software which hopefully implements a version of #1 under the hood I always opt to solve these problems by tiling the imagery into smaller pieces (option 1). Many folks in the geospatial ...


0

set PYTHONPATH to the location of the Python3 libraries. I found these in ServerRuntime.pth I tried this on AGS 10.5.1, i suspect the python3 arcpy will match Arcgis Pro at that point in time. set PYTHONPATH=C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\Resou rces\ArcPy;C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\Resources\Arc ...


0

According to the documentation you link to, you can enable time for feature classes, mosaic datasets or NetCDFs. Your tifs are rasters and not one of those types. You can however, put your tiffs into a mosaic dataset then enable time on that.


0

I would try setting up a separate rule for each polygon feature class you need the original feature class to be covered by. You should be able to implement the same rule multiple times.


0

Think I solved it. If you add the WV2 data to a mosaicked dataset and use "Pansharpen and Multispectral" Processing Template it looks like it sharpens all of the bands


3

A featureclass and a layer file are two different things: A featureclass is just tabular data which can be stored in a geodatabase. It has no knowledge of how it should be symbolized. Therefore, every time you add a featureclass to the map, it will have some default symbology. A layer file on the other hand stores symbology, and has a reference to a ...


2

You could create one or you can use some credits and have access to Esri's network. It looks like you already have the road layer so you should probably create the network yourself. I think it is 0.5 credits per route if you decide to use their network. The number of credits used depends on what you are doing. https://pro.arcgis.com/en/pro-app/tool-...


0

If you have access to an Advanced license or ArcGIS Pro the 'Identity tool' is what you are looking for if I understand the question correctly. You would just need to merge on a distinguishable attribute to get a total sum of overlaying polygons.


0

I was attacking this issue for 2 days trying different ways to code with sym.renderer. I discovered some other things and a work around for me. Addition to this issue. I was getting the same issue when I tried to manually adjust the symbology using the Symbology menu. When I first open the menu it opens with Natural breaks selected, and with 5 classes. ...


2

If you have access to a basic 3D Analyst license you can use Add Surface Information to populate the attribute table of a feature class with the Z value of the surface of your choice. Keep in mind that this tool (like all ESRI tools that have a vector to raster interface) will require that your two datasets share a coordinate reference system. If you do ...


0

I have not been able to reproduce your result using ArcGIS Pro 2.4.2, and I do not have an earlier version to test. The test I ran from IDLE was: import arcpy aprx = arcpy.mp.ArcGISProject( r"C:\Temp\Projects\TestProject\TestProject.aprx") mapx = aprx.listMaps("Map")[0] lyr = mapx.listLayers("ne_10m_populated_places")[0] sym = lyr.symbology sym....


1

There are two basic methods for displaying points that are too close together. The first method is clustering. This method combines nearby points into a single symbol. The symbol often includes a number, which shows how many points have been combined. Here's a blog post about using point clustering symbology: https://www.esri.com/arcgis-blog/products/...


2

You probably just have to brute force it and create a list of all possible describe object properties. inOb = r"C:\Your\Input" desc = arcpy.Describe (inOb) properties = ['DSID', 'FIDSet', 'GCSTransforms', 'JPEGQuality', 'LERCTolerance', 'MExtent', 'OIDFieldName', 'ZClusterTolerance', 'ZExtent', 'ZFactor', 'accumulators', 'aliasName', ...


1

The activation of this option lets you work with a local copy of the data, even while they are offline, and synchronize changes when you are connected again.


0

If you have basic license with 3D Analyst extension, standard or advanced licenses, you can use Add Z Information. The tool Adds information about elevation properties of features in a Z-enabled feature class I do not have any of the above requirements to test that, but you can give it a try if you have the proper license. If you don't have the 3D ...


0

I would do it in this way: Assign all polygons a unique building_id Do a Spatial Join so each polyline is assigned the building_id it's associated with In the new sj_polyline table, Summarize on the building_id and chose the Z attribute to perform Statistics on with the "Maximum" Statistic Type Join the new summarize_sj_polyline table to your building ...


1

It's the same in Pro 2.4.2. A work around is right-click the folder you want to have around and select "Add to New Projects". It will then show up under all new Projects' "Folder" section. A plus is that you can get to it from both the Catalog Pane AND Catalog View. The "Favorites" tab is only available in Catalog Pane. For that reason alone I usually ...


1

My question was answered by Jeff Barrette of Esri at GeoNet: The arcpy.cim module is necessary for CIM support but we intentionally did not document it. We hope that with future builds we will provide helper functions that will make it easier and more reliable to create new objects. Jeff has also corrected the help page, ready for the next help ...


0

There is some sort of bug in ArcPro. The work around is this: Make the script output "Desired Name" a precondition to the FeatureClass to FeatureClass tool. Do not connect it to the parameter. Open the FeatureClass to FeatureClass tool and type into the Output Feature Class Parameter %Desired Name%. That worked for me.


1

In ArcGIS Pro, try checking the "Only show features visible in the map extent" box, which can be found under Feature Display Options menu. This will make it so that only things that appear in the current map extent are displayed in your legend. https://pro.arcgis.com/en/pro-app/help/layouts/work-with-legend-items.htm


1

The Esri tool formerly known as the Grouping Analysis tool has evolved into two enhanced cluster analysis analysis tools that might apply to your problem: Multivariate clustering will examine clusters solely based on attributes. (I think this is what you're looking for.) Spatially constrained Multivariate Clustering examines for spatially contiguous ...


2

You can save a .lyrx file and open in your fave text editor to see the JSON. { "type" : "CIMLayerDocument", "version" : "2.3.0", "build" : 15850, "layers" : [ "CIMPATH=map/new_group_layer2.xml" ], "layerDefinitions" : [ { "type" : "CIMRasterLayer", "name" : "Shaded Relief_dem.tif", "uRI" : "CIMPATH=map/shaded_relief....


0

Make a featurelayer out of infra_layers[0] and pass that to SaveLayerFile_management(): fl = arcpy.MakeFeatureLayer_management(infra_layers[0], "fl") arcpy.SaveToLayerFile_management(fl, new_file_name, "ABSOLUTE")


0

Currently, there does not appear to be a way to do this. The APRX file extension was created by ESRI for its ArcGis Pro for its projects. It is an archive file that stores files of data in XML format to define and organize everything associated with the project. There is functionality built into ArcGis Pro to read, write, and parse this data in the manner it ...


0

Try using raster calculator to calculate a single summarizing statistic based on all 15 bands. You will have to have each band separated as a one-band raster dataset or as a raster layer in the map. I have never used this this, but the Band Collection Statistics tools sounds useful.


0

I found the answer - I found the .pth file located within the ArcGIS Pro installation itself (default location C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\ArcGISPro.pth) and used it as the basis for the .pth file in my virtual environment, which now looks like this: import os; d = r"C:\Program Files\ArcGIS\Pro\bin"; os....


-1

Check the Map/Scene Properties > Extent and Clip layers options. Could be that the points are being hidden by one or both of these settings in Pro. For AGOL, i'm pretty sure you are limited to 2000 points only. See: https://pro.arcgis.com/en/pro-app/help/sharing/analyzer-error-messages/00221-feature-layer-is-displaying-more-than-2000-features.htm


0

1) Run the intersect tool with the shapefile as the only input. This new layer will have multiple features with identical geometries at each area of overlap (depending on how many features overlapped in the original shapefile) 2) Create a new field in the intersected layer that identifies identical geometries. This could be done a couple ways ... If you ...


0

You seem to be on the right track. On my computer I found the arcgisscripting library here: C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages perhaps you could try your .pth file with just two entries: C:\Program Files\ArcGIS\Pro\Resources\ArcPy C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages see ...


0

If you follow your own link and examine the second code sample, you will note they obtain the label Class from the layer and they are setting the properties of the label class. In your code you are setting properties of a layer object, not it's label class. I'm surprised it even runs as expression and SQLQuery are not properties/methods on a layer object?


1

This worked for me: aprx = arcpy.mpArcGISProject("CURRENT") m = aprx.listMaps("Map")[0] itemid = '2ec9f27bea254a428e4eb70e7650672d' m.addDataFromPath("https://mycounty.maps.arcgis.com/home/item.html?id=" + itemid) The layer gets added to the Pro map.


2

You need to pass the Hierarchy field to the function, not the Crime field. crime = Reclass(!Hierarchy!) def Reclass(Hierarchy): if (Hierarchy == 1): return "Murder-Manslaughter" elif (Hierarchy == 2): return "Forcible Rape" elif (Hierarchy == 3): return "Robbery" elif (Hierarchy == 4): return "Aggravated ...


0

The local Esri support were able to reproduce the result of my test and submitted a bug report: BUG-000125730 - Error Setting Symbol Template for ArcGIS Pro GraduatedSymbolsRenderer from ArcPy I cannot think of any workaround that I can use for this, and its priority is at a low enough level, that I have just subscribed to the bug, and when I am ...


4

I would approach this by reconstructing the line manually. Use a cursor to extract the start and end points from the line, sort the list of point coordinates by proximity to the start of the line, and reconstruct the new line geometry. # assumes one line in in_line in_line = r'\scratch.gdb\sample_line' in_points = r'\scratch.gdb\sample_points' # get line ...


2

Append end points of your lines to snap points and run near tool on appended set of points. Add field type "Double" to their table: Rename original lines in table of content to "original" and use field calculator: g = arcpy.Geometry() geometryList=arcpy.CopyFeatures_management("original",g) def getChainage(lineFID,point): line=geometryList[lineFID] ...


0

As of 2019, you can do the following in ArcGIS Pro: Right click on map, select Properties to open the Map Properties module. Select Coordinate Systems Look to the right for a globe icon with a green plus sign, select to access "Add Coordinate System" Select New Projected Coordinate System to bring up the following dialog box. In the Name row, change the ...


1

You'll want to use the translation, rotation, and scale tools to transform the data manually. For translation use the "shift" tool, for rotation use "Rotate" and for scaling use "rescale".


0

Provided the composition of myDatatable is correct(ie. fully qualified or obtained through some means that guarantees the validity), I would recommend managing the life of the insert cursor by explicitly releasing the cursor before the return as in: import arcpy def FindLabel ([OBJECTID], [gns_NAME]): key1 = [OBJECTID] # Key field in feature class ...


1

I have done something similar to open PDF files in Adobe Acrobat Reader in the past so I just looked up this answer to Opening PDF generated by Python AddIn using Report (*.rlf) file automatcally? and tested: import os myfile = r"C:\Temp\Projects\TestProject\TestProject.aprx" os.system("start " + myfile) and it worked.


1

You can use: aprx = arcpy.mp.ArcGISProject(r"C:\path\to\project.aprx") For further things you can do with aprx refer to the documentation.


0

You can use the copy paste functions into excel as mentioned with CTRL+SHIFT+C to format as table in excel just go to Data-->Text to columns-->Delimited-->By Tab-->Ok


0

In case anyone who sees this thread is using QGIS, there is no need to change any settings on the Table of Contents to adjust this. You just need to click and drag the elements so that they are arranged from top to bottom drawing order.


3

aprxMap.listLayers() will return a list even if there is only one layer that matches the wildcard you passed. You need to index the 0 position in the list before assigning it to install_layer. install_layer = aprxMap.listLayers(installname)[0]


5

I don't think you can. If you dig into the arcpy source you'll find that arcpy.Describe essentially returns a wrapper around a non-python binary object (see line 369 in <install dir>\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py) which doesn't have a class you can inherit from. However, you could fake a subclass, by creating a stand-alone ...


0

It's possible to fix multiple errors at once using the Fix tab: This has existed in ArcGIS Pro since version 1.4. The workflow is documented here: https://pro.arcgis.com/en/pro-app/help/editing/validate-and-fix-geodatabase-topology.htm#ESRI_SECTION1_5ED07CFE7FCE4182A1334B7C249922D1 The fix tab was not available in ArcMap. In ArcMap, you had to make sure ...


0

Ok, for some reason this was not working: portal_desc = arcpy.GetPortalDescription() portalUser = portal_desc["user"]["username"] Now, it is. Don't mind this question


Top 50 recent answers are included