Tag Info

New answers tagged

0

In a SpatialPolygonsDataFrame, the polygons and the dataframe should automatically link up through the names of the polygons or the row.names of the dataframe. Assuming your SpatialPolygonsDataFrame is called spdf take a look at: row.names(spdf@data) names(spdf@polygons)


0

The right answer is here: I forgot points 3 and 4. support_esri_33027


0

Following @crmackey with his mention of using the da (Data Access) module, the following code is pretty quick for this type of thing. However, as mentioned it requires 10.1 or higher. I have found that the da module is far superior when it comes to running through tables and performing tests on the data in ArcGIS. with arcpy.da.SearchCursor(fc, ...


3

I just wanted to point out that just using if not row.Stand may yield undesired results (remember, explicit is better than implicit from the Zen of Python). Take the following example: >>> for i, sample in enumerate(['a',1,None, '', ' ', 0]): if not sample: print 'value "{}" at index {} is empty'.format(sample, i) value "None" at ...


3

Yes. Data Driven Pages were introduced at ArcGIS Desktop 10.0: Data Driven Pages allow you to quickly and easily create a series of layout pages from a single map document. A feature layer, or index layer, divides the map into sections based on each index feature in the layer and generates one page per index feature. arcpy.mapping was also ...


1

Here are a few resources I've found about automatically generating maps for transit and other data: Stott et al. "Automatic Metro Map Layout Using Multicriteria Optimization" - Abstract: "This paper describes an automatic mechanism for drawing metro maps. We apply multicriteria optimization to find effective placement of stations with a good line ...


1

The documentation for Near Analysis indicates "NEAR_DISTANCE: The distance between the input and near feature. The value is in the linear unit of the input features coordinate system, or Meters when the Method parameter is set to GEODESIC and the input is in a geographic coordinate system." So my understanding of that statement is: A Geographic Coordinate ...


0

I've had very good luck exporting to pdf etc from arcmap 10.1+ compared to earlier versions - until recently. On export or print to virtual printer for a 36x48 poster, arcmap would process for a while, memory usage would spike, and then arcmap would crash. Every. Single. Time. Because of the out of memory message, I tried tweaking memory and settings on my ...


2

Yes, the location central meridian will change the pattern of distortions in most map projections. In the polyconic projection the length of the central meridian is correct, and also along latitude lines (which are not straight). The latitude of origin doesn't affect the pattern of distortions, but only sets the Y (Northing) = 0 location. For China, if your ...


1

I think it is important to make this Q&A cover not just ArcGIS Desktop 10.0, Python 2.7 and Python 3.1, but also to incorporate the latest versions of desktop products from the ArcGIS platform and the Python programming language. For Python support in the (currently) latest desktop products from the ArcGIS platform I think you should consider: ArcGIS ...


1

The following python script (which requires ArcGIS 10.1 or later) utilizes arcpy.da to take a shapefile as an input and create a spreadsheet with an entry for each vertex in each polygon present in the .shp (and I believe it works with lower level arcgis licenses). Object and sequence id's tie the points back to a specific position in a specific polygon. ...


1

To my knowledge No. You can embed the fonts to an exported map if the build-in security flag of the font file allows it.


0

Try reclassifying (Reclassify tool) the raster. That way you can set any value that you are not looking for to "No Data" or "0". Then from there you can use the raster to polygon tool or leave it in raster format.


2

I updated to ArcMap 10.2. This worked for all types of fields: import arcpy fc ="C:\gSSURGO_test.gdb\chor_comp_zone1" fieldObs = arcpy.ListFields (fc) fieldNames = [] for field in fieldObs: fieldNames.append(field.name) fieldCount = len(fieldNames) curU = arcpy.da.UpdateCursor(fc, fieldNames) for row in curU: rowU = row for ...


4

ArcPy did not have a Data Access module until ArcGIS 10.1. This will explain your second error message. The only way to specify fields in ArcPy cursors prior to that was by using their names rather than an index.


2

Do you want to change the extent of the actual data or just the plot? If it is just the plot you can use ylim and xlim to define the extent of the plot. Create some example data library(sp) x <- SpatialPointsDataFrame(SpatialPoints(cbind(runif(10, -115, -110), runif(10, 30, 45))), data.frame(ID=1:10) ) y <- ...


0

Thank you for the help, the problem was solved. The solution is to change format(ID) into format(str(long(ID))). ".0" was not recognized so the error occurred. I'm sorry for the assertion that "llipse_6406685702.0 indeed exist ", it turns out that I was mistaken, a feature class does not support .0 in arcpy . Specail Thanks to Slslam ! Hope my case can ...


1

Per @blah238 suggustion, This python code lists all Relashionship classes within a geodatabase and put them in a unique list (relClasses): inGDB = r"D:\mygeodatabase.gdb" env.workspace = inGDB #################Getting all Tables and Feature Classes########### fcs = [] #root of workspace for item in arcpy.ListFeatureClasses("*"): fcs.append(item) for item ...


0

The format of your ID_individ field is probably "double" and that's how it is read. Turn it into an integer either when appending it to your pplWH list: for row in cursor: if row[1]== 2: pplWH.append(int(row[0])) or when creating the clipfc and outclipfc variables: clipfc= "Ellipse/ellipse_{0}".format(int(ID)) outclipfc= ...


1

I just ran into the same issue editing a layer in WGS 1984. I created a new shapefile without a defined projection and the distortion did not occur after I saved the edits. Looks like Zbynek was correct, it is a projection issue. Try projecting the layer into what your mxd is projected in and maybe redrawing the circle.


1

Custom snap agents only apply to the classic snapping environment. You can choose the snapping environment through the editor options dialog or by setting the IEditProperties4.ClassicSnapping property.


2

The functionality that you are describing is known in ArcGIS for Desktop as extent indicators which can be used for overview, locator, inset and index maps. It is well documented in a page entitled Using extent indicators to enhance overview or locator maps: Extent indicators are a way to show the extent of one data frame within another data frame. ...


1

Spatial autocorrelation does look at whether two phenomena have similar spatial distribution, however I believe what you want goes a bit beyond that. You're looking at a regression analysis, which explores correlation between several independent or explanatory variables and an occurrence (dependent variable). In your case, why is this disease outbreak ...


1

I have just had a similar problem and used this work around. Open the layer properties and select Definition query and use the expression below. KM NOT LIKE '%.%' This will remove all rows with a . in the field. As long as the kilometer points aren't whole numbers like 1.0 or 2.0 etc. this should work.


0

This is a long shot, but do you have a 'Production Mapping', 'Defense Mapping', 'Aviation', or 'Maritime Charting' extension for ArcGIS? It seems the "Dice Polygons" tool will accomplish what you need. I've never used the tool personally, but from the description, it sounds like a winner. Search Link EDIT: Alternatively, I've written a dice algorithm ...


0

I wrote a script using MoveLayer and a temporary Group Layer to get this to work. First create a new group layer anywhere in your TOC (it doesn't matter what it's called, it will be deleted at the end). mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd)[0] # Assuming one data frame group_lyr = [lyr for lyr in ...


0

Just for fun, I noticed ESRI 10.3 only shows NULL as 0 so you have no idea what is in there. In QuantumGIS Brighton or later, the field shows as NULL, but you don't know which one. I modified this as the following (I added a zero after copying off Jamie): def RemoveNULL(x): if x is None: return '0' elif x == '': return '0' else: ...


0

Fastest alternative if you have many holes to cover in a single file is a slight modification of mkennedy's comment suggestion using Union. There is no need to create a second layer that covers the extent of the one you're working with. Simply Union the layer to itself (add only the one layer to the Union tool) and be sure to uncheck the box at the bottom ...


0

Another option, faster than detailed tracing depending on how complex your boundaries are: Edit the layer and either reshape the feature you want to enlarge to cover the hole using the Reshape Feature tool on the Editor toolbar (left side of image) or draw a whole new feature over the hole (right side of image). In both cases just ensure overlap with ...


1

Indeed, you could create a python addin to do this for you! http://resources.arcgis.com/en/help/main/10.1/index.html#//014p00000025000000 Basically, you would be able to create a tool that could sit in your bosses tool bar. Using the tool your boss could click the map and get the data back for the area as you described. The tool would take care of all the ...


0

May be the problem has already been solved. I was facing the same problem and today I fixed it in this way Customize--ArcMap options---Data view---round coordinates to (select from drop down).I put 6 and that worked.


1

This sort of problem is what the topology tool was made for: Create a topology for this layer using the "No Gaps" rule Validate the topology Add it the TOC Use the fix topology tool to Create Features. You can do this one by one or all at once.


4

Depend what means 'many holes', but if it's not hundreds/thousands you can always use Auto Complete polygon tool. All you have to do is start edit session, select the tool, draw the line across a hole and merge created polygons to required polygon. It is better than digitising and Trace but still semi manual… see screenshots: Select Auto complete tool and ...


1

You can start editing on the selected polygon and snap the new vertices to the boundaries of the polygons surrounding the hole, effectively increasing the "selected polygon" to the area contained by the hole. You will also have recalculate the area in the attribute table to update the entire area. This can be accomplished using the tools in the editor ...


1

I would edit the polygon layer. trace the missing polygon boundary. merge the selected polygon and the newly created one. screenshots edit Trace create a new feature using the autocomplete polygon tool. @ChrisL is correct... You can simply draw a line crossing one of the edges (justone single segment from one existing polygon into the ...



Top 50 recent answers are included