New answers tagged

0

I have not seen anywhere that ArcPy can access the popup functionality of ArcGIS Pro. ArcPy only makes a subset of ArcGIS Pro SDK functionality available and most of that is related to Geoprocessing and Mapping. If it is important for you to have this functionality added to ArcPy for ArcGIS Pro then I would recommend submitting an ArcGIS Idea. There is an ...


4

LR will calculate distances along separate river segments. To apply it you need "long" rivers starting at multiple upstream points, ending at outlet(s). If you are capable of producing geometric network you might use script from here, to calculate distances of network nodes to outlets and apply LR later. Alternative to it is using raster approach, namely ...


1

Try something like: import arcpy fc = 'points1' fields = ['Field1','Field2','Field3','Result'] with arcpy.da.UpdateCursor(fc,fields) as cursor: for row in cursor: row[-1] = max(row[:-1]) cursor.updateRow(row) You might need to change max(row[:-1]). For example if you can have None values in some field, it will fail. Then try max([v for ...


3

I was calling my parameter with the line: target_elements = params[0].valueAsText I needed to be calling the parameter as a value: target_elements = params[0].value This gave a list of values and is exactly what I wanted.


0

An ugly solution, but this is the only way I could find so far, is to add trailing spaces in the Label symbology Before: After:


3

You need to define an intial value for prevX (and for prevY) before you use them in a calculation. Otherwise, the first time the code tries to read their value, it fails. This cannot occur on line 6, because you're not using them as part of a calculation there (just assigning a value to them). Additionally, there is no prevX (or prevY) defined in the ...


0

I found the solution with some help! If you create Shapefiles pls make sure they are above the map in the Table of Contents, if not, it will be underneath and then, like in my quest it will disappear. Thanks for your comments and your help!!! Greetings


1

So first, I'd perform some kind of density analysis like Kernel Density. This will create a raster that you can use later to calculate this fire density in your polygons. To calculate these stats inside each polygon you can use the Zonal Satistics as Table tool. This will give you the average, sum and other stats you can use as your new dependent variable. ...


0

1) I believe GenerateDriveTimeTradeArea uses credits, if so you should check how the pricing works b/c looping through 600000 records and calling that tool each time might have some minimal credit charge for each call. That might be different from sending a bunch of records at once. 2) Not sure how long 600000 separate calls to this tool would take ... I ...


3

Try printing out the "dsc.spatialReference.Name". When I did, none of my Spatial Reference Names had spaces and instead had underscores "_". I suspect that may be why none of your spatial references match "NAD 1983 StatePlane California III FIPS 0403 (US Feet)". So it instead should be "NAD_1983_StatePlane_California_III_FIPS_0403_(US_Feet)".


1

I'm sorry, but I don't think this functionality exists in any ESRI product. If it does, I've certainly not ever seen it. To achieve that sort of thing I've always had to use separate feature classes (or at least separate copies in the map). This question has also been asked and answered here before it seems: Quickly toggling visibility of certain symbology ...


0

New in ArcGIS Pro 2.4 : Profile viewing it's fantastic for slicing a UAV derived SLPK mesh and compare to LiDAR from an earlier date as I have in example 2. ESRI Ireland and UK Whats New in ArcGIS 2.4


1

By definition query, I think you actually mean a Selection on the layer. At this time (ArcGIS Pro 2.5), it does not appear you can modify the table selection color. For the selected features in the MAP, you can change the default selection color of Cyan to any color by clicking: Project Options Select Selection under Application The first option of Set ...


0

There are many ways to "Add" dates. Here's one in CalculateField (place these values into the last 2 boxes of the tool, updating the CreationDateField with your field name). Field to update: add30(!CreationDateField!) Code Block: from dateutil.relativedelta import relativedelta def add30(start): update = start + relativedelta(years=30) return ...


4

Yes. Raster objects have a maximum property. Just make sure statistics have been calculated for the raster or maximum will return None. E.g. Con("my_raster.tif" > "other_raster.tif".maximum, value_if_true, value_if_false)


0

You could use the MAXIMUM argument in arcpy.GetRasterProperties_management() to get the highest cell value in the raster. See the documentation for Get Raster Properties (Data Management). eg, x = arcpy.GetRasterProperties_management("udlen", "MAXIMUM") Is that what you're after?


0

When you execute this line: var maskImage = visualizeMinMaxNDVI(maskImage); ...you are transforming the NDVI image, which I assume is floating point, to an 8-bit RGB image because it is applying .visualize() (docs). To maintain the original NDVI values, export the original maskImage instead of the visualized version. Here, I have set the result of ...


0

Not the most efficient, but the easiest way is to first, run the expand tool on your agricultural cells second, run the raster calculator to find pixels of the original raster that overlap agricultural pixels in the expanded raster. In commands, that would give something like this (assuming that your integer values for agri = a1 or a2 and forest = f1 ...


2

This is an ArcGIS Pro Frequently Asked Question: Can ArcGIS Pro be installed on a machine with ArcMap? Yes, you can install ArcGIS Pro on the same machine as ArcMap and other ArcGIS Desktop applications, or on a machine without ArcMap or any other Esri products.


1

You're missing just a little bit of detail in your screenshots that makes me think you're going to have some other issues crop up. Can you please let us know how the symbology is being assigned in the first (working) example you gave. Is the field being symbolised the "Label" field, or something else? For example, here I am symbolising DonutType In your ...


0

In Pro you may also run most of the geoprocessing tools in batch:


0

Run the regular buffer tool twice and use the data in the attribute table as the buffer distance parameter. After running buffer twice you will have a pre and a post growth buffer layer. If you want the two buffer outputs in the same feature class use append or merge to combine them.


0

I would comment, but my reputation is too low. Out of curiosity, what are the values in your point layer's table? The only thing I can think of is that you're values in your fields aren't "-1"? That being said too, you may have an integer field, in which case the field wouldn't be equal to "-1" and instead just -1.


1

I am not sure what version this was added. But as of 2.4 you can Share as Web Map, and under Configuration, use Split to split various layers into their own feature layers. These will be their own web feature layers (services) and all be added to the web map.


0

The problem is caused by a conflict with Autodesk drainage extension - uninstall it solves the problem! Answer from Geonet - will post link when I find it.


0

Your code is close, but there are a few things you're doing wrong with the properties you're passing into each call. Try the below code (specifically updating what you're passing for the properties and not passing in the itemId to the publish... the item itself knows which item it is, thus you don't need to give it this). import arcgis from arcgis.gis ...


1

The Summarize Raster Within tool: Summarizes a raster based on areas (zones) defined by the first input layer. Its Licensing Information indicates that to use this tool requires an ArcGIS Image Server license. If you do not have that license, then that may be why you are unable to find and use that tool.


0

The way that I would try to do this is by using Attribute-driven symbology to Reflect feature attribution in symbols (with my bolding): You can customize symbols to reflect different aspects of the data they draw. There are a variety of ways to do this: ... Control the size, rotation, color, or transparency, in addition to their primary ...


0

if(isempty($feature.FID)) //If the field is empty or has the default value return concatenate("SP-" + nextsequencevalue("Traffic_SignalPole_ID")); //calculate a new id


0

So the issue ended up being related to the project that is being referenced in the script. Since that map was where the initial publish was done the metadata overwriting the information that I had stipulated. So what I ended up doing is adding another update() function at the end to overwrite the map attributes. The other error that ended up happening was ...


2

ArcGIS Pro's Layout class has very few Properties. If you were able "to add multiple snapping guides to a layout in ArcGIS Pro" using ArcPy then I suspect that there would need to be a property that is a list of Guide objects. ArcPy for ArcGIS Pro does not have a Guide class to create those Guide objects. If this is important to you then you could post an ...


1

I finally found a solution : the second attempt was a good attempt, but as @KHibma mentionned, I crossed arcpy and arcgis-python-api. I tried to connect to AGOL with argis.gis.GIS while I should connect with arcpy. As the error message were not saying anything about this, it was quite difficult to understand ! Here is my code if it can help ! To summarize :...


2

You can use Arcade to create an expression. I dont really know what im doing (first time using Arcade). Just pasted the code from: VxCount = !shape!.pointcount fuction in AGOL and modified last line to output 0 for even number of vertices and 1 for odd. You can of course change this to output whatever value you want with some if/else: Function ...


0

I think that this could be semi-automated by using Attribute-driven color in symbology: You can customize feature symbols by leveraging data attributes as symbol property values. I would start by adding a field that gets populated with the number of vertices, then I would add another field to store color values and set those colors based on the number of ...


0

To do this you could use the Camera Properties control, which is at the right hand end of the View tab on the ribbon. When that is open you can see values for: X, Y and Z; Pitch; Roll; and Heading You can copy these manually to give them to your students, or use the Copy Camera Settings button at the bottom of the Camera Properties control to copy them to ...


0

As commented by @KHibma: You might be able to create a Scene Layer Package (SLP) and publish it. I think you'll need to bake the "offset" (z) into the layers to get this work. (I say 'think' as I dont have much experience with this). Some ideas here including the SLP: https://blogs.esri.com/esri/arcgis/2017/01/03/72321/


1

To do this you could use a Bookmark (with my bolding): A spatial bookmark identifies a specific geographic location (in 2D or 3D) that you want to save and refer to later. Once you have created a bookmark at the view in your picture: Bookmarks can be shared between projects as a bookmark file (.bkmx). You could then share that BKMX file with your ...


0

I have not tried this but ArcGIS Pro has a Import 3D Files tool which: Imports one or more 3D models into a multipatch feature class. With my bolding it appears that an OBJ file is supported but I do not know if this is an identical format to what you have: One or more 3D models or folders containing such files in the supported formats, which are 3D ...


1

I'm not familiar with Python in ArcGIS specifically, but, as @JGH noted in their comment, the variables in your function definition (ISLNumero and SubtipoIS) must correspond to the names you use in the function body (ISL_Numero and Subtipo_IS). If there's some kind of error log in ArcGIS, I would expect to see a NameError: name 'ISL_Numero' is not defined ...


Top 50 recent answers are included