Tag Info

Hot answers tagged

8

Yes, it is possible. Before you can add a feature class you need to turn it into a feature layer. This arcpy code should help: import arcpy FC = r"C:\...\featureclass" arcpy.MakeFeatureLayer_management(FC, "nameoffeatureclass") MXD = arcpy.mapping.MapDocument(r"C:\...\your.mxd") DF = arcpy.mapping.ListDataFrames(MXD)[0] layer = ...


7

I just found this ArcGIS Forum Discussion that suggests that you should be able to but you will need to follow the advice therein about how to cite and where to find Terms of Use for the particular basemap(s) you are intending to use.


6

I found this page about the ESRI World Imagery basemap with links to a Summary and Terms of Use. The Summary says "You May: Include screen captures or a printed or plotted maps in the following ways... In academic publications (research journals, textbooks, etc.)"


5

A nice Pythonic way of tackling this is to use the filter function, which takes two inputs: the value you'd like to exclude, and the input object (any interable). After that, just sum the result: def stack(*args): return sum(filter(None, args))


4

Use the model only tool called Parse Path. Right-click on the ModelBuilder screen > Model Only Tools > Parse Path. Make sure to select the "NAME" Parse Type, which will pass on "LST01011990" to the next tool Connect "Value" to the next tool as a precondition, so that the name is parsed before the Raster to ASCII is run Call the raster name in the raster ...


4

When running something like this in a Toolbox Tool, you indeed want to use Tool Validation. For example: class ToolValidator: """Class for validating a tool's parameter values and controlling the behavior of the tool's dialog.""" def __init__(self): """Setup arcpy and the list of tool parameters.""" import arcpy self.params = ...


4

It works similarly to the Append tool. It uses the target dataset coordinate system and adjusts accordingly. That being said, if you are loading data from a coordinate system that needs a transformation (E.g., NAD83-WGS84, NAD27-NAD83), I'm not sure how it chooses which transformation to apply. It may just default to the most common, which may not be ...


3

You need to go to Customize> Customize Mode on the Menu bar, in ArcMap. Once the Customize dialog appears, click on the keyboard button. For more details, have a look at this help article: Assigning a shortcut key


3

Another variation that I often use is: arcpy.SelectLayerByAttribute_management("layer", "NEW_SELECTION", ' "ATTRIBUTE" = ' + " 'Criterion' ") Note how the double quotes on the field name are inside single quotes, while the single quotes on the value are inside double quotes.


3

This isn't an automated process and more cosmetic, but I think it will get you what you want (see my example below) Create a mask of the areas you wish not to show. In the example below, everything on the outside of the blue circle is the mask. In the layout view (ARCMAP), move the edges of the data frame so that its a little bit bigger than your area of ...


3

That appears to be a fixed width text file, not a CSV. It will be much easier to import into ArcGIS if you first save it as a CSV using Excel. Recommended steps: Edit the text file, renaming ID to ID_Num and veg name to veg_name then save Open the text file in Excel as a fixed width file. Carefully line up the columns - Excel will see "swamp 1" from the ...


2

Try using Split (Analysis) to subset your data. To illustrate, I added a new text field to the split features (i.e. 1-16 based on OID) and used that as the basis for the split. There are 16 resulting shapefiles on the image to the right. Also, try the Split Layer by Attributes script tool if you have licensing issues. I believe you may need to ...


2

I think Hornbydd is right; instead of MakeFeatureLayer_management I think what you want to be using is CreateFeatureclass_management instead with an in_memory location. I'm not sure what further processing you want to do, but here's a quick replacement for your MakeFeatureLayer: linefc = CreateFeatureclass_management("in_memory", templines, "POLYLINE") ...


2

It looks like combining the fields was what I was looking for. I was so set on using separate fields it didn't occur to me to try that. If anyone isn't super comfortable with the field calculator, I used this to combine the separate fields together: [Street_Num] & " " & [Street_Name]


2

How about using the data access module? It looks like you can start an edit session with this module. A few caveats: I have not tried this module and the am not sure if it is 10.0 compatible. (New in 10.1?) Example 1 shows the use of a with statement. This is a great paradigm to implement as it handles potential exceptions well. You might be able to ...


2

I discovered the solution to this by accident a couple of weeks ago. It's so simple it's almost too good to be true: Select the formatted cells of interest in Excel, Copy, then Paste into an active Arcmap Layout dataframe. Size and place to suit. Done. To ensure you don't get any jpeg jaggies use the same font size in Excel as you would in Arcmap if ...


2

Massi, You would use automation to drive ArcMap from another application. For example I have developed extensions that are referenced by MS Access which will open up ArcMap, load an MXD fire off a select by attribute query and zoom to the selected extent. This can all be achieved using automation. Look at this page, there is an explanation and sample code. ...


2

One very handy way to have full control of the labels is to convert them to annotation. Right click on the layer > Convert Labels to Annotation... > Store Annotation In the Map > Convert. From there, all you have to do is select the label and drag it to wherever you like.


2

Defining dynamic hyperlinks through Identify results You can dynamically add a hyperlink to a feature using the Identify tool Identify. With dynamic hyperlinks, you do not use an attribute field to supply the hyperlink targets. The hyperlink target you specify is associated with the identified feature. This association is stored with your layer. ...


2

What they're asking you how to do is called a "Spatial Join". It's a very common task in GIS software. You can find the ArcGIS help you need here. Once you have joined the data together, you can update your fields with the joined data. Now that you know the terminology, you can search this site for more questions relating to the topic. Here's a video on ...


2

@ustroetz answer is almost correct. However, it won't necessarily give you the correct results. When you mutate the list while iterating over it, you may skip some values. For example, if your list is defined as such: mylist = [None, 3,4,5,6,7, None, None, 4,65,23,6, None] and you use this code: for item in myList: if item is None: ...


2

Are you saving it on one computer and opening it on another? If that's the case, you will want to look at setting relative paths. If your layers have red exclamation points next to them, it means it cannot locate the source data, and you will have to manually point to the source Another thought is that if you are using a served basemap, it might be ...


2

As far as I know, this can't be accomplished directly in the symbology of a layer easily. You'll have to create a new field, such as "Type" or "Symbology Type", and then calculate the type/symbology of each record based on an expression. The simplest way would be to use a definition query to create groups of layers, then field calculate your new ...


1

This was my final solution. There are basicaly two tools that are needed to convert *.xyz to arcmap friendly raster format. You can use this script when adding a script tool to arcmap toolbox. Some parameters are set for my example (e.g. resolution is 5 m). import arcpy arcpy.CheckOutExtension("3D") workspace=arcpy.GetParameterAsText(0) arcpy.env.workspace ...


1

concatenate all your xyz files together use a csv2dbf converter, because your xyz file is a form of csv file. There are tons of those available by googling. I found python source code at https://github.com/fitnr/census2dbf/blob/master/census2dbf.py , which seems to be a generic csv2dbf python module, despite the name. import this big dbf into arcgis or ...


1

This may help to some degree (as I think it is what you are after): You could use the Split Line at Point Tool to split the line where they intersect the points. Then using the Split line by distance function in the Editor tool bar, split the line by 500m. In saying this though, this will only work on 1 line at a time, so if you had 100 lines to buffer, ...


1

The following python field calculator code should do the job: total = stack( !field1!, !field2!, !field3!) Pre-Logic Script Code: def stack(*args): myList = list(args) for item in myList: if item is None: myList.remove(item) return sum(myList)


1

I'm not sure these options are what you're looking for, but hopefully one or more will be useful. It's possible to pause the drawing of the map in data or layout view by clicking the pause button at the bottom left of the data frame, but it's designed more for when you're changing a layer's symbology or properties, not working directly in the map or ...


1

You are trying to view data from two datums so will need to use a Transformation. I'm not familiar with datums used in Qatar but on the Coordinate System tab of the Properties for your data frame you should be able to find a Transformations button which should offer you choice(es) based on which datums are in the data frame. Try these steps using ArcGIS ...


1

The term for what you are doing is a suitable site analysis and here are links to two approaches: Using vector data Using raster data (needs Spatial Analyst extension) Hope it helps.



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