Tag Info

Hot answers tagged

6

Well, there are a few ways to go about this. Here is one approach: import arcpy from os.path import splitext #Use splitext, as slicing is hardcoded for extension length photos = arcpy.GetParameterAsText(0) #photos folder fc = arcpy.GetParameterAsText(1) #feature class arcpy.env.workspace = photos #Create list of image names without extension nameList = ...


6

You just need to split it into 2 steps: Dissolve on the NET_ID Spatial Join the dissolved layer to the original layer. Use the match type of CONTAINS and set the Merge Rule of the Geology field to Join and set the delimiter to a comma. Right click on the field in the field mapping list and select properties to get to the merge rule and delimiter settings


4

I thought at first the arcpy.Polyline.getLength() method would work, as you can specify a measurement type and units but it did not because it is GCS. As you can see here, we are still in Decimal Degrees: >>> with arcpy.da.SearchCursor("line_wgs", 'SHAPE@') as rows: ... for row in rows: ... print row[0].getLength('PLANAR', 'METERS') ... ...


4

A Map Package (mpk) will only hold 1 MXD, but could hold multiple GDBs. If your original MXD has 100 featureclasses from 5 different databases (multiple fGDB or SDE instances), the data that gets copied to the package will be held inside 5 GDBs named based on the original database. So to your point, you're sort of correct. Its more you'd have 400 MPKs if you ...


4

The first line should not contain the field call (!Classe!). Your code should look like this... def TextValue ( classe ): if ((classe == "Steppe arbustive") or (classe == "Steppe arbustive à arborée") or (classe == "Steppe arborée") or (classe == "Savane arbustive") or (classe == "Savane arbustive à arborée") or (classe == ...


4

This is a quirk of Esri, it used to be the other way around. By default it will save all customization in only the current document, to change this open the menu customize::customize mode.. Turn off the checks indicated by the arrows to make ArcMap save to your Normal.mxt. Please note that any open instances of ArcMap will write to the normal on exit so ...


3

You can change this by going to Customize -> ArcMap Options then click on the General tab and you'll find mouse wheel settings at the bottom. (Version 10.2+)


3

There is a bug in the Project Raster Tool. The output raster from the Project Raster tool is a little too big on the eastern edge, and on the southern edge (bottom of the easternmost gore/lobe). So the data extent doesn't quite match what the extent of a Goode's Homolosine projection is, and triggers the "not consistent extent" warning. A workaround is to ...


3

Ok, I have figured it out. Solution: Open ArcCatalog. Go to GeoProcessing... Environments... Set the correct workspace paths. Open ArcMap. It should now work.


3

You can do this in a few steps: edit: As Ali pointed out, you do need your grid to be polygons, not lines for this workflow. Create a field on the grids to hold the area of each grid (or since they are the same in this case, just note what that area is) Intersect the grids and land usage layers. Compare the area of each output polygon from the intersect ...


3

I would suggest two approaches: 1. You use Network Analyst to build a network dataset (ND) from your raw street feature class. Choosing the "Any Vertex" connectivity would create a junction point feature at each street intersection which you can export and use just like any other point feature class in ArcGIS. Start with this tutorial, the best getting ...


3

Your code isn't formatted correctly and you're using the wrong things for parameters. def TextValue ( input ): #needs to be a variable, not your field if input == "Steppe arbustive" or input == "Steppe arbustive à arborée" or input == "Steppe arborée" or input == "Savane arbustive" or input == "Savane arbustive à ...


2

A BLOB field is simply a field that stores data in binary. From Wikipedia: A Binary Large OBject (BLOB) is a collection of binary data stored as a single entity in a database management system. Blobs are typically images, audio or other multimedia objects, though sometimes binary executable code is stored as a blob. Database support for blobs is ...


2

A little Python automation gets this job done. The basic steps: Determine max distance in feature class's units with help from a spatial reference object (requires projected feature class I do believe) Create a new, empty feature class with the input line feature class as its template Iterate input feature class and check its line lengths If the length is ...


2

OK the syntax is incorrect, the example code using fields from my dataset will help you set up the correct VB script structure. if [NAID] = 23 or [NAID] = 38 then x = 5 elseif [NAID] = 34 or [NAID]= 35 then x = 3 else x = 1 end if You run this field calculate on a field (in my example its a numeric field called q), and you put x into the bottom box as ...


2

If you have a table joined when you create the field it will automatically add the layer name. If you want to avoid this remove the join then create the field and rejoin the table. Or you could right click the field and change the field alias to remove the layer name.


2

So, you have a polygon feature class where you have multiple polygons. Each polygon has a value stored in the field named Extra. You want to show polygons with unique colors. You should use the Unique values symbology in ArcMap. You can then choose what color your polygons with a certain value will show.


2

Attach script import arcpy, traceback, os, sys, math from math import radians,sin,cos from arcpy import env env.overwriteOutput = True inFC=arcpy.GetParameterAsText(0) outFolder=arcpy.GetParameterAsText(1) rectangle=r'in_memory\rectangle' tempf=r'd:\scratch\many.shp' def showPyMessage(): arcpy.AddMessage(str(time.ctime()) + " - " + message) def ...


2

First of all I would strongly recommend that you export your map to either a PDF or an image file and use that to plot. This is especially true for very complex maps with lots of layers, rasters, transparencies, annotations, etc. The Page Print and Setup Dialog has nothing to do with printing. Its sole purpose is to set a physical layout page size of your ...


2

Without opening ArcCatalog, you can also go to the Catalog window of ArcMap and choose Options at top right and set your Home Folder Path: Then closing and re-opening ArcMap to check the Environment Settings shows that they have been altered:


2

There is a useful method using Con and IsNull statements in the raster calculator to convert NoData to a different value. HowTo: Convert NoData values to other values for raster data


2

It is possible with a long workaround. But certainly worth it if you need to reuse. Create a dummy layer with the same data you want to show in legend. If you have a layer 'Roads' copy it and we will tweak the copy to make the legend. I often call layers like 'Roads - dummy for legend'. This layer will be turned off when done, be sure to uncheck 'Only ...


2

I would suggest you create a series of models using iterators. You can create a model for each type and nest the models as sub models in order to include all of them into a single model. You would have to do this because a model can have only one iterator. So each model will iterate through the data object then deltete. Use preconditions to control the flow. ...


2

If you're working with local data, then you can select any number of features. You may need a lot of RAM if you're working with millions of features. If you're working with remote data on ArcGIS Server, then that number is set by the map publisher. That can be changed when publishing a MXD and changing the setting under the Parameters tab:


2

Short answer: Go to this layer's symbology and under Categories pick a unique Value Field, push "Add All Values" and OK. Long Answer: In the Table Of Contents (the window on the left that contains the XY points layer), right click the layer of XY points and push "Open Attribute Table". Here you need to find a field with a unique value for each row, which ...


2

At this stage (when your legend is fixed), you should convert your legend to graphics, ungroup the component and manually arrange them as you want (there are tools to align and distribute the graphics).


1

This is not possible to to achieve "dynamically" out-of-the-box. You will have to convert your legend to graphics, un-group and arrange the items as you want them then create a text element for each of the labels you wish to also include in the legend, physically type in the values and apply the same symbology as the label has and move it place.


1

To do this you'll need to update the Description within the metadata. Unfortunately, there doesn't seem to be a real simple way to do this with arcpy. However, @Ashatz11 over on Stackoverflow documented a pretty straightforward workflow: Updating metadata for feature classes programatically using arcpy Also, here's a similar post on GIS SE, that's worth ...


1

There are three sets of properties to be aware of here: The envelope of horizon of the coordinate system, The extent of the coordinate reference, and The envelope of the feature class. The coordinate system horizon is mathematical space accessible by the coordinate system (e.g., infinite X, -90...+90 Y for GCS_WGS_1984). Esri uses these horizons to ...


1

I wasn't able to find the Model builder answer, but I managed to create a script in python that did the job. Here it is: ##domain clean up script ##Created by: Ruchira Welikala ##Date: Aug 27, 2015 import arcpy from arcpy import env #Workspace where domains will be deleted from gdbConnName = "Database Connections\\ProductionDB.sde" #Workspace/Table ...



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