Hot answers tagged

2 votes

Move an existing layer into a group layer using ArcPy in ArcGIS Pro

You want to use addLayerToGroup... see attached example code... aprx = arcpy.mp.ArcGISProject("CURRENT") mp = aprx.listMaps()[0] #mp = aprx.listMaps("Specific Map Name")[0] Use ...
Jason Miller's user avatar
  • 1,450
2 votes
Accepted

Using ArcPy to Intersect Line and Polygon Features of the Same Name

It because you have a redundant loop that is causing it to loop over all datasets. The offending line, which you don't actually use in any way, is: for file in arcpy.ListFeatureClasses(feature_type='...
Hornbydd's user avatar
  • 43.2k
1 vote

Batch editing ArcGIS Layout file text elements and exporting in ModelBuilder

In ArcGIS Pro .lyrx, .mapx, and .pagx. are a json format which you can manipulate with python. That is the reason you can open it in a text editor. Esri call it CIM - Cartographic Information Model. ...
Xeppit's user avatar
  • 1,255
1 vote
Accepted

AddFieldDelimiters not correctly adding field delimiters in arcpy

I think that you should test this code, which does not use arcpy.AddFieldDelimiters(), because it is a simpler coding pattern and my understanding is that field delimiters have not been required for ...
PolyGeo's user avatar
  • 65.1k
1 vote
Accepted

Are some XTools Pro Tools hidden from use with ArcPy scripting in ArcGIS Pro

It's not hidden. It's just not available as a Geoprocessing tool. Not all tools and features are. If you look at the the left nav menu of the help doc you'll see a Tools and features section that ...
user2856's user avatar
  • 65.3k
1 vote
Accepted

After converting CSV file to polygon, polygons are not falling on correct location

A better solution is to use directly geopandas.GeoSeries.from_wkt df = pd.read_csv("Test_Polygon.csv") print(df.boundary[0]) POLYGON ((87.7185491791352 22.5667828312016, 87.7184590804737 ...
gene's user avatar
  • 54.7k
1 vote

After converting CSV file to polygon, polygons are not falling on correct location

Swapping the values placed the geometry on correct location. Here's the modified the code: import geopandas as gpd import pandas as pd from shapely.geometry import Polygon df = pd.read_csv(r"/...
gis's user avatar
  • 123
1 vote

Transfer NoData value with MosaicToNewRaster in arcpy

Thanks to user2856's comment, using gdal from my cloned arcgispro-py3 environment worked (code from: https://www.youtube.com/watch?v=sBBMKbAj8XE). from osgeo import gdal import glob, os ...
ENIAC-6's user avatar
  • 876

Only top scored, non community-wiki answers of a minimum length are eligible