Tag Info

New answers tagged

2

If I understand the question, you are trying to have the same layout but have the map pan to each grid cell for printing to pdf. What version of ArcGIS are you using? At 10.x you can use data driven pages for this task. http://resources.arcgis.com/en/help/main/10.1/index.html#//00s90000003n000000 What is the purpose of clipping everything? As a faster ...


0

The problem isn't an actual lack of minimum vertex count per entity type, but that there are likely coincident vertices causing improper construction. I would suggest to examine the shape or geometry columns of your data for coincident vertices within the same geometry. You can put together a script to loop through and identify these if you have many ...


0

Add a Textbox (Landowner) to the ReportFooter and set its Summary parameters like this: In the image, DCount, stands for distinct count.


1

You need to read the help file of the Mosaic to new raster tool. If you look at the Syntax section it lists the parameters of the tool and what they are. You need to be following the same order. Looking at your code you have a mysterious 1 after output name and before coordinate system. This is not the order of parameters as dictated in the syntax section. ...


1

The code presented in your question doesn't match what is asked for in the question. "I'm trying to label certain features using a specific field (osm_name_58_en). However, when this field is null, I want to label the feature with (som_english_32_name). If both are null then I want to label with the (amenity) field." This sentence implies that you only ...


2

The Correct form of your code is : def FindLabel ( [amenity], [osm_english_32_name], [osm_name_58_en] ): if not ([osm_name_58_en] is None): return [osm_name_58_en] elif not([osm_english_32_name] is None): return [osm_english_32_name] + '\n' + [amenity] else: return [amenity] The semicolon in the last line is removed. ...


1

Assuming your project is setup correctly, with all references added and compiles without errors. Using Visual Studio Express 2013, ArcGIS 10.3 and targeting .Net framework 3.5 Also ensure you add ArcObjects Library References to: DataSourcesGDB GeoDatabase Carto Public Sub New() On Error GoTo Trap Dim sPathFGDB As String Dim sFCName As String ...


0

you can use quick import tool in data interoperabilty toolbox to covert your data to arcgis geodatabase then expot those feature class to shape file.


1

using Arcmap 10.1 you can use an alternative option: 1. add your all geo-refed raster in a new arcmap 2. define the projection properly in the data frame properties 3. Go to windows menu and click on image analysis. 4. In image analysis tool select all your rasters and click on mosaic button present in a window below named "processing". 5. A temporary raster ...


0

Here http://www.geol-gis.ch/en/dt-dipping-plane you will find information about a tool that creates a 3D square plane of determined orientation, dip and width, at determined coordinates. The output is a 3D polygon.


0

I know this is totally out of the scope of the question, but could be useful for those who want to reorder fields inside a table only once by hand. You can do the trick by importing the classes (or the whole geodatabase) into a personal geodatabase. Then open it with Access and reorder the fields (yeah, cool) and export it back to the original format. Hope ...


0

The cell size is not used to allow adjustment. You have to manually adjust the resolution of the coarser raster to make it match the finer raster (or set the Cell size raster analysis environment to Minimum of Inputs). https://desktop.arcgis.com/en/desktop/latest/tools/spatial-analyst-toolbox/h-working-with-tabulate-area.htm "Some of the area values in ...


0

The following requires a Spatial Analyst license. The ArcPy Raster Object provides a pretty intuitive interface to working with rasters. Once a Raster Object is created, you're allowed to perform math operations on it in a very similar manner to operations on python built-in objects. Properties and methods onboard the Raster Object should also be useful for ...


1

I would avoid using ArcGIS (arcpy) in this case and do this using a pure Python solution. This will be faster and much cleaner. Since you are renaming tif files you do not need to use ListRasters() or arcpy.Rename()...see this example: import os import glob def rename_files(new_names_file, file_folder): files_list = glob.glob(os.path.join(file_folder, ...


3

You can do this sort of renaming by utilizing enumerate. The general idea is to add an index with each raster name and then call that index to reference the specific item in the text file list. import arcpy arcpy.env.workspace = r'C:\path\to\input\rasters' txtfile = r'C:\path\to\textfile.txt' # Generate a list of items from text file with open(txtfile, ...


2

You can't really change the symbology of a layer in arcpy with the level of customization you have when just right clicking a layer and using the symbology menu. However, you can make a "template" layer that contains the symbology you want and then use ApplySymbologyFromLayer_management (in_layer, in_symbology_layer). This will allow you to apply the ...


3

It is not possible to change the properties of a layer directly. The properties of a layer can be changed, but only by importing properties from another layer in the map or a layer file. Even the layer name cannot be changed without an existing layer or layer file. "UpdateLayer" in the ArcGIS Help can give you more details and some examples.


1

I would recommend to build a simple model to iterate through all rasters in your workspace and then convert each of them to Polygon. To add an iterator, In model builder go to: Insert > Iterators > Rasters You final model should look like this: and your Calculate Value Should look like this: The code block: def t(s): return ...


1

As far i can recall, you can select all table from this batch tool and copy into microsoft excel and modify input parameters of the tool in excel (apply some excel formula to change the output to lessen manual labor). After that you can select all in the tool and paste this excel rows back into the tool.


2

If you are running the tool outside of ArcGIS session, in Python (or when in the Python window and the extension has not already been enabled), you will need to check out an ArcGIS Spatial Analyst extension license before running a tool. You do it with: arcpy.CheckOutExtension("Spatial")


1

Arcpy geoprocessing fails with file names that contain special characters like spaces or periods. I ran into this recently when I was able to use os.walk to read file names that contained periods, but arcpy.da.walk failed. I learned more about this problem in the help topic "Validating table and field names in Python". Please try your script again with no ...


1

The above answer is missing a few crucial details that might frustrate people, as Dre pointed out. I've tried to work out why copy gets greyed out - I read it had something to do with some aspect of the feature class not agreeing with the data frame, but I couldn't resolve it. To duplicate annotation in an annotation feature class when "Copy" is greyed out: ...


0

In the question, you state that the coordinates are in Lat/Long, but you later say that you define the coordinate system of the file as being British National Grid. Might you have defined the file as BNG (a projected system) when the data is actually in a geographic format? This might explain the points not showing up anywhere in the data frame.


2

Geoprocessing tools (with the exception of Spatial Analyst tools) return a Result object, which is what arcpy.ApplySymbologyFromLayer_management returns here. It doesn't have a save method. You may be getting this mixed up with a MapDocument or Layer object.


1

Per Chris W's comment suggestion I recreated my interpolated raster and used the mask to set the processing extents during interpolation rather than just the extents of the sample points. This resulted in an interpolation raster that fully covered the mask I want to use for extraction.


0

Per Documentation: With ArcSDE, putting a feature class in load-only mode disables updating of the spatial index while data is loading. In a File Geodatabase, putting a feature class or table in load-only mode disables updating of spatial and attribute indexes while data is loading. Taking the feature class or table out of load-only mode ...


0

Network Analyst will automatically snap points (incidents or facilities) to the nearest network edge when you add them if configured to do so; there's no need to do so beforehand. If you want to force it, Snap could be used (requires Standard or Advanced license, directly modifies data so run it on a copy). If you actually want to draw a new line to ...


0

Try to use Spatial Analyst Tool > Extraction > Extract by Mask. Extracts the cells of a raster that correspond to the areas defined by a mask. In your case, input raster would be Raster2 and feature mask data would be Raster1.


1

You can not customize this dialog. However you can simply create custom FeatureTempalate dialogs. To do so, download this sample project Feature Template Select Dialog A similar question has been already answered: Getting FeatureTemplate dialog form ArcObjects?


0

Often draftsperson add other items in the model space besides data; title blocks. profile graphs, external blocks, etc, etc. which are not necessarily near the actual source data. When you right-click on the layer in the TOC in ArcMap and chose "Zoom to Layer" and there is still nothing visible you can: Open the attribute layer of the "line" CAD layer ...


0

Kostas, I reccomend using a SQL Query to determine the distance values from your road network. Generally, when I do this I will calculate minimum distance or average distance to the boundary points. In this case I am not sure what value exactly you are looking to calculate to determine your raster value. This calculation will provide the minimum distance ...


2

Your error says it all. It is poor formatting. Python relies on indentations. Format it like: import arcpy mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd") for lyr in arcpy.mapping.ListLayers(mxd): if lyr.symbologyType == "GRADUATED_SYMBOLS": lyr.symbology.valueField = "POP2007" lyr.symbology.numClasses = 5 del mxd Edit: Just ...


0

Actually the answer is very easy 1) Calculate XMax XMin YMax YMin in Field Calculator with Python !shape.extent.XMax! Create 2 Fields where you calculate the difference between XMax and XMin, same for Y. Calculate Ratio All bigger than 1 is landscape, all smaller than 1 is portrait


4

Michael Miles-Stimson had the same idea as me, but since you aren't familiar with coding, here's another (similar) option. Turns out this is pretty easy to do using Field Calculator. Create a field called something like "Orientation" and make it a text type. Open the field calculator and set the parser to Python. Tick the "Show Codeblock" box and enter ...


1

I would recommend using Erdas to build the pyramids. Not only can you build pyramids in batch mode using multiple cores, but you will avoid the ArcGIS/Erdas pyramid incompatibility issue (i.e. pyramids built in ArcGIS are not recognized by Erdas). However, if you need to build pyramids using ArcGIS, you will want to make sure to check the "Recursive" ...


4

Sounds like the original model was developed in ArcMap. If you look at the syntax section of the help for the Select Layer By Attribute tool it explicitly states the data type of the input layer to be a feature layer or table view. If you are running your model from ArcCatalog and navigating to the dataset in the folder then you are accessing the source data ...


4

arcpy.ListFields() will give you a list of objects. You just need to get the names from those objects. field_names = [f.name for f in arcpy.ListFields(lyr)] Another round about way of getting them would be via a search cursor but that also includes the shape field. field_names = [] with arcpy.da.SearchCursor(lyr,"*") as cursor: field_names = ...


1

Try using a Model to solve this Model Builder - Iterators - Iterate Feature Selection - this will allow you to go through each of your Locations one at a time and create individualized Euclidean Distance grids. Make sure you utilize in-line variable substitution so you are not writing over anything


0

I wrote a script that uses the feature compare tool across two databases as a means of comparing them. It will not only display the count for feature classes if they have changed, but it will also return any changes in attribution, geometry, spatial reference, or schema. I'm new at this too, so if anyone has improvements, let me know please. import arcpy ...


0

If you are only concerned with roads, you might sample a series of roads, then 'query' the raster such that only pixels with those colors are left. Doing the actual query would require doing something like reclassing the raster so that all non-road colored pixels become white.


1

In ArcMap the MosaicDataset is a MosaicLayer and is essentially a CompositeLayer, and the actual raster image is one of its components. So find the raster in the MosaicLayer and treat it exactly as you did the raster in your first example... Dim pEnumLayer As IEnumLayer = My.ArcMap.Document.FocusMap.Layers(Nothing, True) pEnumLayer.Reset() Dim pLayer As ...


2

Because this analysis is local--the result in any cell depends only on the stack of values in that cell--we might look first to the Local Toolset for inspiration. It is best when such tools can be applied without any preliminary transformation of the data, because that avoids a potentially time-consuming loop over all the rasters. Perhaps the most general ...


1

With some manual work and a Spatial Analyst extension. I assume you have access to Spatial Analyst since you are able to generate contours from DEM? I use a different approach - I show only major contours in areas with slope more that say 30 degrees but it will work the same for thinning contours with some tweaks. Create a slope raster and generalize if ...


0

Seconding @DWynne, you can't use a tool if your license does not allow access to it. You might consider moving at least partly to an open source based solution for the tools you do not have access to. Have a look at Migrating from ArcGIS to gdal for a list of alternatives to some of ArcGIS tools.


4

You can't 'use' the tool if your license doesn't include it. But yes, in some cases, you can definitely create similar/equivalent tools using Python and arcpy. I've done a few over the years. For a lot of cases, cursors and geometry methods will do a lot of the heavy lifting. Take Buffer as an example, a combination of an SearchCursor and InsertCursor ...


1

0.01192239336492888 is your pixel size see more information on world files so you can work this out if you know the number of pixels your image is http://en.wikipedia.org/wiki/World_file you only need your top left for images in ArcGIS TO SAVE TIME: you know you can use Build Footprints (Data Management) ...


1

If you create a model in the model builder function, you can see the % completed bar. I like to do this when processing large amounts of data so I can monitor the progress. Results Window should do the same thing but doesn't.


0

Looks like your path at the beginning could be a problem. You should make it a 'raw' string or escape the slashes: path = r"C:\Users\OuelletteMS\Desktop\Ice_Data_from_JohnIacozza" path = "C:\\Users\\OuelletteMS\\Desktop\\Ice_Data_from_JohnIacozza" My guess is the the List result is empty because the workspace doesn't exist.


1

Since the network analysis is not concerned with specific attributes or properties of the features, only their location on and relation to the network, there isn't really a way to include them as part of the solver output. However, you can take your polygon results, export them to a standalone shapefile/feature class, and then use a spatial join or other ...


1

Restarting ArcGIS service involves using ArcGIS Rest Admin API and ability to authenticate using token-based authentication with ArcGIS server. One way to do it is to write a script/program to monitor the ArcGIS Service and in the event service is found stopped restart it , schedule it to run periodically. But it gets cumbersome when you have to monitor more ...



Top 50 recent answers are included