Tag Info

New answers tagged

2

You should be able using the 'zonal statistics as table' tool that you mention. There is an option of what 'statistics type' to calculate, select "All" and the last column of the resulting table will be a sum of all pixels within each specified zone.


1

This is more a sysAdmin question than a GIS one - you may be better off asking - http://serverfault.com/ However, it should be fairly simple: - Use a tool to monitor the ArcGIS service. For example Nagios or a member of its ilk. - When the service ceases to respond, have a script run automatically (such as the one you found) that restarts it.


1

I found Example: Stop or start all services in a folder . It was very useful for the purpose . If you want to start automatically just change some of items in this sample and run in task scheduler of windows .


3

First, use Define Projection (from the Data Management / Projections and Transformations toolbox). The metadata specifies NAD 83 in decimal degrees, so, GCS_North_American_1983. This gives the shapefile some spatial reference data. After that, you can use Project to turn it into whatever projected coordinate system you want.


2

Your rename won't work because you are replacing the extension with nothing. Use os.path.splitext() to remove the extension and then you can add it back. polyFCs = arcpy.ListFeatureClasses("*_Value.shp", "POLYGON") field = "Area" #Don't need to keep redefining this each loop. field = "SHAPE@AREA" #Or, use this to grab the area of the feature. for polyf ...


1

Try this for your cursor (as I stated your cursor field parameter needs to be a string or a list and using the da.cursor use row[0] for getting the value): with arcpy.da.SearchCursor(polyf, field) as cursor: for row in cursor: if row[0] > X: # your rename here


-2

Do you have an actual field named 'Area', or are you using a shape_area field? Assuming you have an actual field 'Area', you need to check the value from row.getValue against X (although where is the value for X coming from?). You're checking the string 'Area'. Try something like: for row in cursor: if row.getValue(field) > X: # I ...


0

As a workaround, the documentation recommends calling Python from out of process. While the topic is on arcpy, it should apply to anything that uses Python in the stack. I'd strongly recommend contacting Esri support to address this particular issue, though. It may already be in their knowledge bade with a solution.


2

See this prior answer. Each version of ArcGIS uses a specific version and architecture of Python and is hard-linked against it. Forcing an ArcObjects application to use an incompatible Python version will likely lead to a crash.


5

The python addin button is actually simpler than I first thought. Just highlight a layer in the TOC and the button will pan to it. import arcpy, pythonaddins class ButtonClass1(object): """Implementation for pantolayer_addin.button (Button)""" def __init__(self): self.enabled = True self.checked = False def onClick(self): ...


4

Another potential workaround (at least in 10.2) that doesn't make you mess with scale would be to right click the layer -> selection -> Select All, then right click the layer -> selection -> Pan to Selected Features, and then clear the selection.


0

If you have hidden fields in the attribute table, then they will not show up in Field Calculator. In the attribute table, go to Table Options, and then Turn all Fields On. The key to note here is "in other dialogs". If you hide them here, they will be invisible to most other tools, identify, export, etc.


0

Had a quick search on Google for what R6034 meant and here are some threads, it may not even be anything to do with ArcMap? Thread Reason StackOverflow Q&A And a whole load more...


4

The problem is that your data is still retaining the decimal degree numbers, although not units. Subsequent geometry calculations still use the same raw numbers that were associated with decimal degrees, but erroneously assume different units (meters). For example, if I say I'm 65 feet tall, I haven't actually grown, I'm just using different units than ...


1

Alternatively, if you do not have an Advanced license and you do want centroids even if they fall outside the shape, there is another slightly more involved method. Open the polygon attribute table and create two new fields, X and Y. Right-click on each one in turn and use Calculate Geometry to calculate the respective X centroid coordinate and Y centroid ...


1

The Field Calculator would crash on me whenever I would run the Field Calculator to update about 2,300 records on a point dataset that was generated as a checkout file geodatabase. This turned out to be a known ESRI bug where ArcMap would crash if the Field Calculator was used on more than 100 records at a time in a checkout file GDB, and was addressed in ...


2

@ChrisW said: As far as I know and can find evidence for, you cannot set a classification range below the minimum value in the data. This got me thinking, and I actually found a way to set the classification range below the minimum value. My original issue was built around the fact that the lowest classification range was required to contain the ...


3

No there isn't. The way a shapefile is made doesn't allow for that. A DBF is only the attribute/table information for the shapefile's features. The SHP file is the one that makes up the actual geometry/shapes of the shapefile while the SHX file is the one that contains the index between the two that helps associate the table information (DBF) with the ...


2

You can create a symbology of unique values for a layer without actually having a value occur in the dataset. you could use 'group values' (ctrl+select values and right click) to take all the possible values that indicate category 'A' in any given file. This way, you could have a single symbology that covers all possibilities from each dataset without ...


0

I was able to get the Results Window to show up again by deleting the following files: normal.gxt (%AppData%\Roaming\ESRI\Desktop10.1\ArcCatalog) normal.mxt (%AppData&\Roaming\ESRI\Desktop10.1\ArcMap\Templates) normal.mxd (%AppData&\Roaming\ESRI\Desktop10.1\ArcMap\Templates) Booting up ArcMap recreates the new files setting . I'm under the ...


1

Sounds like you are using the wrong tool. To create a separate dataset of points that are the centroids of a polygon use the Feature To Point tool. It requires an Advanced license.


0

I believe this is about feature legend but not rasters. If this is about rasters disregard my suggestion. I usually use these: Merge 2 (or more shapefiles) CHILDS into one, let's call it FAMILY create legend for FAMILY import symbology for every CHILD from FAMILY Hope it helps, FP


0

At the moment your code looks like it would produce errors. I think you should change it from: fcs = arcpy.arcpy.ListFeatureClasses("*_Value", "POLYGON") for fc in fcs: select = arcpy.SelectLayerByLocation_management("fieldname_layer", "INTERSECT", short) result = int(arcpy.GetCount_management(select).getOutput(0)) print ...


2

Try the following workflow: Reclassify your rasters so that Value = 1. Calculate Cell Statistics using a "SUM" statistic. Any value in the resulting raster > 1 is an overlap area. Additionally, the value of the resulting raster indicates how many overlapping rasters there are.


1

As others have suggested, reproject to something with a linear measurement. But be sure to use BILINEAR interpolation (not the default of Nearest Neighbor). This should avoid the grid-like artifacts that stem from resampling patterns (you may notice that if you do multiple reprojections and change the cell size among them, you can get the cross-hatching to ...


1

While the classification uses similar ranges, the data don't share a range. I think the solution here is to solve it in the legend and color assignments, and not the actual classification. Start with your lower left result, and convert that legend to a graphic. Edit the text to get the ranges you want. I notice all your other images have a 10 unit range, ...


4

The question asks for a rigid motion of the object on an idealization of the earth's surface. For ellipsoids the only continuous families of rigid motions possible are rotations around the earth's axis. But for a spheroidal model there is a three-dimensional family of rigid motions and they can move an object from any location to any other (for two ...


0

Like Erica said, your second format is easy. If all your street names were one word, you could check the length of the list after splitting the original field. Length of 3 = no prefix, length of 4 = has a prefix (also assuming SUFTYPE is always populated). This fails when a street is more than one word, such as 'Grand River'. You could check if the second ...


0

Make sure your input is in string format and simply use the string.split() function which will split on white space and return a list. (ex. "1234 W Main St." would return ["1234","W","Main","St."]) From there I would use some conditional statements to check your data depending on how consistent your input is. If the only inconsistency in your data is that ...


8

Instead of using multiple RegExes to parse addresses, just use Esri's out of the box tool that is designed for this task, Standardize Addresses. It's available at all license levels and my experience with it has been positive.


1

You can achieve this in field calculator using python. This may not be the most elegant but it's a start, assuming the simpliest case (ie. your addresses all look the same). I would first create the additional fields needed. Assuming your column with the full address is called "Address". For HOUSENO in the field calculator write: ##Return just numbers ...


3

I think the largest problem was with the structure of the update cursor. Also, you have two ListFeatureClasses (you only need one to create the list and start the for loop). Try this: bufferCalc = arcpy.ListFeatureClasses("*.shp") for calc in bufferCalc: # pull out the shapefile name shpName = os.path.splitext(calc)[0] # define update cursor ...


0

This is possible in python using FeatureClasstoFeatureClass with Fieldmappings. You can also rename fields at the same time. So if you have a Featureclass with FIELD3,FIELD2,FIELD1 and you want the result to be FIELD1,F2,F3 then the following code should accomplish this. arcpy.env.overwriteOutput = True input_fpath = ...


0

Thanks folks. It turned out ArcMap or arcpy were corrupted. I uninstalled and reinstalled ArcMap and it worked fine.


0

This answer was submitted by @Vince in the comments to the initial question. In a direct connection the Instance parameter needs to look like this INSTANCE = sde:sqlserver:(servername) and the Server parameter is ignored. More information can be found here


1

Add a new field (text) In field calculator, round the original Percent value to no decimals, and append a percent sign: format(round(!Percent!)) + "%" or the shorter, more elegant "{}%".format(round(!Percent!)) (Thanks to Paul for the improved syntax!)


0

The solution was to set IGeoProcessor2.AddToResults to false. Something like IGeoProcessor2 gp = new GeoProcessorClass(); gp.AddToResults = false; IGeoProcessorResult results = new GeoProcessorResultClass(); IVariantArray parameters = new VarArrayClass(); parameters.Add(tempFC); parameters.Add(outFC); results = ...


0

I don't see anywhere in the documentation for Clip_analysis where # is a valid argument. That position is reserved for cluster tolerance. However, that wouldn't give you the error you're getting. I wouldn't assume there are no errors just because it came from an esri course, either.


0

You could try creating a Model in ArcCatalog, add the tool you want to use to the Model. Run it as a Model first to be sure it works, then export it to a python script. Then, try running that python script from the os command line. Or, open the script in a text editor and run it line by line in the ArcCatalog Python window. Might still not work, but it might ...


1

If you've already done the join, yes. If not, then you should start with the Join Field tool. This allows you to directly write attributes from one file to another based on a join (a one-step process rather than join/export two-step).


3

Another solution would be to use the Copy Raster tool: arcpy.CopyRaster_management(in_raster, out_rasterdataset) Where you add the file extension to out_rasterdataset


1

The Raster to Other Format tool should do what you need. RasterToOtherFormat_conversion (Input_Rasters, Output_Workspace, {Raster_Format})


0

I've just written this for a similar task. It's for 10.2 but I think it will still work: def unique_values(table, field): with arcpy.da.SearchCursor(table, [field]) as cursor: dict = sorted({x[0] for x in cursor}) print type(dict) #testing to find type for i in range(len(dict)): whereD = dict[i] fname = whereD[0:5] + "_" + whereD[-4:] #just to ...


0

The last tip with the green tick mark solve my problem. Just to the the Untility and choose the "AdvancedArcMapSettings.exe", then check "create features using templates", reopen your arcmap, then start editors, everything works.


0

I think I know what you're trying to do, because I'm trying the same thing. I've got eight maps I want to create. I want the map title to be whatever layer is visible at the time. All the maps are the same, but only one of the eight layers will be visible. I didn't find an elegant solution but I found a work-around. I basically just hid the stuff I didn't ...


1

I've attempted to remove the errors from your code. You had "\\" but you started the string with an r so I think python was actually seeing "\\\\" instead of "\". Also you import a toolbox at the beginning of the script then add another within the loop which has the same name, that makes no sense so I have commented it out. But may be wanted to use that one ...


1

It's been awhile, but if I'm not mistaken you can select annotations from one group and paste them in a target group. In other words, from the default group select the ones you intended for a different target, right-click and copy (or cut), then change the group target to the one intended and paste. I'd copy them if cut is not an option, or at least to ...


1

I've made some modified and an additional tools to make this Model Builder a final one. I ran this on test and this works very nicely !! I would like to thank Erica for her help to make this possible


3

It appears that you have a few typos: The most pythonic way to add the name of the shapefile without the extension is to split the extension from the base name, via the os module. You don't need to cast shp to a string since it already is a string. appendExpression = os.path.splitext(shp)[0] arcpy.CalculateField_management(AT, "ProjName",appendExpression, ...


1

Create a field with the order they are supposed to be in, then input that field into the "sort field" option.



Top 50 recent answers are included