Tag Info

New answers tagged

0

IContentsViewSelection should work for you. http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//000v00000064000000 This is VB, but you should get the idea... Dim pCVSel As IContentsViewSelection = My.ArcMap.Document.CurrentContentsView Then: pCVSel.SelectedItems.Count will give you the count of selected items in the TOC.


0

Using the Area of the polygon only works if you don't have multipart polygons or after exploding multipart polygons and it doesn't fill holes in the polygon, if I'm not mistaken. Have you tried using "Eliminate polygon parts" in ArcGIS (Data Management Toolbox - Generalization)


0

Not an answer but a workaround.... Guess I'll just make my smaller polygons on a new map using just the 1 meter LiDAR DEM, then add them to the 10m and 1m DEM composite map. Wish I had 1 meter coverage for the whole project!


1

Inside an MPK you'll find an MXD and a fGDB. (You may find shapefiles, tiffs or other files depending on how the MPK was created, but odds are you'll find data in the fGDB). With this knowledge, if you have an application other than ArcGIS that can read MXDs and fGDB, you can simply unzip an MPK (using something like 7zip) to get at the contents. As for a ...


0

I have been working on the team at PiinPoint since last year, and the reason I got involved with the them is because they wanted to solve this use case. Piinpoint is a web based SAAS platform with data included. We have built out a core of site analysis tools, but try to make sure that the interface is approachable by everyone on a real estate team, not ...


0

Solved! I start the process from layout view, but the script automatically switches to data view to turn various layers on/off. The issue was caused by the difference in scale when switching between views (still odd that the map was correct, just not the extent indicator!). I've corrected the issue by noting the scale at the start of the script and forcing ...


0

By just changing the symbology you can inspect the results visually, nothing else. By doing that you simply set a flow accumulation threshold what you want to see. This of course depends on the case and there are no exact answers what is right amount of flow accumulation for channel initialization. This visualization trick is of course very useful to ...


1

Personally I've never found looking at the flow accumulation raster directly to be all that interesting. The purpose of messing with the cartography is to simply show you where the greatest flow accumulation is (the below example classifies it into two groups, one of which is transparent, the other is blue) from this you check if the major parts of your ...


0

So, i figured it out by myself. It is because of the tiff compression. it was jpeg and it has to be LZ77 or LZW. Any compression without data loss. http://help.arcgis.com/de/arcgisdesktop/10.0/help/index.html#//001w00000020000000


2

Your model fails because your input shape files have names that contain spaces. As feature class names cannot contain spaces, you need to use add the Calculate Value tool to your model to remove spaces from your inline variable "Name" and replace them with underscores. In the model below, the Name variable is precondition to the Calculate Value tool. ...


1

This should work: import arcpy, os, sys InFolder = sys.argv[1] OutFolder = sys.argv[2] arcpy.env.workspace = InFolder for ThisRas in arcpy.ListRasters(): arcpy.MakeRasterLayer_management (ThisRas,"Layer"); arcpy.SaveToLayerFile_management("Layer",OutFolder + "\\" + ThisRas + ".lyr",True,"CURRENT"); arcpy.Delete_management("Layer") It ...


0

Add all of your Tiffs to map by dragging them from ArcCatalog. then use this code in python windows: import arcpy from arcpy import env mxd = arcpy.mapping.MapDocument("CURRENT") env.workspace = "d:/Layers" for lyr in arcpy.mapping.ListLayers(mxd): print lyr.name try: arcpy.SaveToLayerFile_management(lyr, lyr.name + ".lyr", "RELATIVE") ...


0

What is the port number in your url (mydomain.edu:port_number/arcgis). Your server firewall must allow communication through this port. Furthermore your client-machine must be able to connect to server via this port. In some organizations, IT administrator, block unpopular ports in client machines. Because you have mentioned: I have a website set up on ...


0

If you are willing to use a QGIS plugin, you could consider the simple to use NNJoin plugin. The GRASS plugin provides the powerful tool v.distance. Both will add a distance attribute that contains the distance to the nearest feature in the join layer, together with the attributes of this feature. NNJoin accepts point, line and polygon layers for both the ...


0

I note that you are using ArcGIS Desktop 10.0, but if you were using ArcGIS 10.1 for Desktop or later then you would have access to the Polygon Neighbors tool. For more details see Adding/updating field to polygon feature class that lists bordering (neighbor) polygons?


3

You are missing a very little detail: the fact that in Python you can pull elements from a list starting at the back. The last element of a list corresponds to index -1. For example: location = "Cedar Wood Park" locationChoppped = location.split(" ") print locationChoppped[-1] would return: Park, and: location = "Highland Grove Hyper Megalopolis" ...


1

Your raster classification is incorrect. You need to change the symbology to either 'Unique Values' or 'Classified', doing this will enable your ArcScan toolbar. Right click layer > Layer properties > Symbology tab> "Unique Values" or "Classified" ***ArcScan tool bar WILL NOT enable with 'Streched' or 'Discrete Color' symbolization. ***ArcScan tool ...


0

Start a new, blank map document. Add your polygon layer to it. Double-click the layer in the ToC and go to the Source tab. That will tell you what coordinate system your polygon layer is in (just as an FYI). Add your table to the map. Drill down in the catalog window toolboxes to find, or type into the search window Make XY Event Layer and run it. Select ...


0

I note in your second image from the field names that you have a Join between a csv and a shapefile, and the field you are attempting to Dissolve on is from the csv. While I can't find it documented at the moment, I believe this won't work. You first need to export your joined data to a new shapefile/feature class and then run the Dissolve on that. And as ...


0

The script below works on buffers (around points). Layer name in the table of content in open mxd is PRIMARY. It also manipulates visibility of another layer called SECONDARY (you'll have to remove all the references to second one in a script). Script walks/pans through buffers, manipulate scale (scale=df.scale*5) and export everything that is visible in the ...


0

Ok, make query table nearly drove me insane. They key elements are that the fields you wish to query on NEED to be indexed and the query needs no quotations, brackets etc within the query. Only use fields in the Fields section that are indexed. And in Key Field Options use 'Add_Virtual_Key_Field'. Even though I have managed to get it to work I'm really not ...


1

You should use Print Conductor for Batch Printing documents. I use it daily for my batch PDF Printing work. It prints all files at once with its DRAG and Drop feature. You can just select multiple folders or files and get them printed. Go to www.print-conductor.com to download the Print-Conductor


12

Despite PolyGeo second suggestion, There is an extension called CarryMap. It does what you exactly want. It exports your mxd into an Exe file that can be opened with a double click. No other software is needed. Furthermore it export your map for use in Android or iOS devices! However you should pay to have the extension (commercial extension). ...


10

It's not an *.exe but you can either: export your map to a layered PDF so that anyone with the free Adobe Reader can view it use the Publisher extension to publish your map as a PMF so that anyone with the free ArcReader can view it


0

You need to start editing in order for the versioning buttons to be available. Go to Editor toolbar and "Start Editing". When you are finished with Reconcile and Post, Save and Stop Editing.


4

Assuming that there is a unique key in common to both shapefiles I think you should be able to use the Join Field tool to join the fields you want from shapefile2 onto shapefile1. Then you can do whatever calculations/comparisons that you wish.


1

An alternative method to adding a field to your attribute table is to use the legend to show your feature count. If you symbolize your polygons by group_nameand create a legend to show these there is an option to show feature count: This will then display in your legend as: Forest (4) Park (2) etc...


0

You could add another field to your attribute table called count and for each row put the total. It's probably easiest to do manually using the select by attributes function select all "Forest" records and then calculate the count field to equal 4. Then repeating for each group_nametype Then it's pretty simple to use this field for your labels.


0

Here is some python for you. as you can tell i am lazy too. #Assumes all data is within the same database #will look for FC called SUB and compare it to FC Inspection #Will create new FC called Sub_with_Insp #should overwrite Sub_with_Insp every time import arcpy arcpy.env.workspace = r"C:\Users\whatever\test.gdb" arcpy.env.overwriteOutput = True ...


0

I am going to give you a slight python alternative to the other answer. I am not going to write out the whole thing, but if you are familiar with arcpy, you should be able to fill in the gaps. First things first. Select those Subdivision features that contain and inspection point. arcpy.SelectLayerByLocation_management("SUBDIVISION", "CONTAINS", ...


2

You could also add a text field to your subdivision layer, HasInspection. Calculate the values in that field to Y or N based on whether it has an inspection point. Then set up a label class that only labels subdivisions where HasInspection = Y. Once you do this, you'll only have to run the field calculation periodically (or do the update in the new ...


2

This is what I would do. First I would use the selection tool to select all of the polygons that contain a point Selection→select by location→selct from "subdivion" Source layer "inspection"→ contain the source layer feature I would then right click on the subdivisions class and create a layer from selected features you now have a layer of subdivisions ...


0

I just had this exact same issue running ArcGIS 10.2. It turns out that (in 10.2 at least) you cannot set the symbology values via classBreakValues when the valueField is in a joined table. Instead, you need to export everything to a new feature class first, and then the following code should work: if lyr.symbologyType == "GRADUATED_COLORS": ...


0

A comment regarding Jay Cummins' expanded solution above (which I would add as a comment replying thereto, but stackexchange won't let me): This works, but there are limits. Using ArcMap 10.1 under Windows 7, it appears that the html popup cannot cover the clicked feature. So, if the feature is centered in the screen, you're limited to a bit less than half ...


1

I would start with reading what a script tool is: What is a script tool? Then check how to supply parameters to a script and how they work. Then read how validation works in script tools - you might want to do some checks on the input shapefile before proceeding any further: Understanding validation in script tools After that you are ready to perform the ...


0

After spending couple of hours with ESRI support, I concluded that it is not possible through ArcGIS. However, if you are willing to fiddle with your underlying database, you can hack the versions table to temporarily change any version's parent to virtully any other temporatily and then reconcile and post as desired. Of course you do all that at your own ...


1

Go into the symbology tab and select multiple attributes. From the main screen you can select the colours for your depth (click the drop down menu and select your depth attribute). If you look in the top right of the same window, you'll see a symbol size menu from which you can select the symbol size scale based on your magnitude attribute. This thread ...


0

I found that the easiest way for me to modify the layer in ArcSDE was to first use the "Copy Features" tool and set the "Environments" so that Z values and M values were both set to "disabled". Then that resulting shapefile could be used to copy and paste features into the ArcSDE layer inside of an edit session.


1

In the legend wizard, on the last step you will be prompted with spacing options. Recreate your legend and change the "Spacing between patches (Vertically)" until you find a spacing you like. In terms of creating more breaks, you have to go to the layer properties and select Symbology > Quantities and modify the number of classes.


0

To create a Intersection list I first needed to Unsplit the lines with the Unsplit line tool. When this was completed I used the intersect tool. THis created points at the intersection. Delete duplicates tool was run to shape. Then I did a Spatial Join as suggested Radouxju.


0

Just convert your legend to graphics, ungroup until it's all separated (you may have to do it several times) and manually edit the circle's size and labels. Then play a little with the "align" and "distribute" tools to make it look nice and centered.


1

I can see that multiple comments aren't being understood. This is what I meant: import os,arcpy from arcpy import env mxd = arcpy.mapping.MapDocument("CURRENT") #arcpy.env.overwriteOutput = True fieldName = "RasterID" RowsField = "unknown" # the field (numeric) for the number of rows ColsField = "unknown" # the field (numeric) for the number of columns ...


0

This doesn't answer your question directly, but may be helpful. Consider creating a timer that executes a method every X milliseconds. Then you can use this method to periodically check the properties of all kinds of objects, including the visibility of your dockable window. This way you can know if your window was closed. Below is some relevant code to ...


2

To apply the Layer file with python for all rasters with a certain name one could use: # read in mxd file mxd=arcpy.mapping.MapDocument(r"Path_To_MXD_File") # read in all rasters in the mxd which have names starting with "test" rasters=arcpy.mapping.ListLayers(mxd,"test*") # apply the symbology lyr file to the rasters for r in rasters: ...


1

As @Michael Miles-Stimson has commented your calculate field method will overwrite all row values each loop through the raster list method. So, the table will only have one raster name for each record. In addition, it is unclear from your question if the update table has an equal number of rows for rasters that exist within the directory. If you are ...


0

First, what you need to end up with is your polygon file with an attribute column for each value or tree species. It's important to note the for each part of that, because right now you have, and any summary method will generate, rows for each species and not columns. At some point you have to make that conversion. Let's start with the points. Each point is ...


1

Did you follow this set of best practices for multithreaded arcobjects code? Objects cannot cross thread boundaries and it appears that your code is doing so. Figure out the data source on the main UI thread and serialize the data source object to XML as recommended there.


3

The problem was that both the current working copy and the shadow copy tables were named the same. The join went fine but the field calculator and geometry were greyed out. To fix this, I simply renamed the backup table name to something different. I was able to field calculate and essentially restore the data. I did not find this resolution documented ...


0

ESRI has an standard xml format to export both the data and the schema of data. In ArcCatalg (Catalog window of Arcmap): 1- As arcgis cannot export shapefile directly to XML workspace first import your shapefile into a geodatabase featureclass. 2- right-click the featureCLass > Export> XML Workspace Document in the opened window there are two combo ...


2

Instead of using a RegX, another option you could use would just be a single line using the string join and isdigit() test. "".join(c for c in [NAME] if c.isdigit()) I just tried that for my roads layer (make sure the parser is set to Python) in ArcGIS Desktop 10.1 and it pulled out the road numbers very nicely. Only thing to note, non-numeric roads will ...



Top 50 recent answers are included