Tag Info

Hot answers tagged

4

No - in_memory workspaces are only similar to and not identical to geodatabase workspaces. They support feature classes but not feature datasets. This is documented on the Using in-memory workspace help page: Feature datasets or folders cannot be created in the in-memory workspace.


4

Your code is not correctly formatted Python code: Indentation is important in Python, as it defines where functions and conditions start and end. You need a : after the function definition The correct operator for equality-comparison is the == and not simply = which assigns a value to a variable. Also, with respect to the field calculator in ArcGIS, if ...


4

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


3

The model you want is below: You want to be using the Feature Selection iterator not the Row iterator. You set that up using the ID field as the case field. This is what becomes Value and this is what you use with in-line substitution in the field calculate tool. But you should heed @Baltok's warning as if you have overlapping buffers then that will ...


3

Since the field datatypes are static, you can pre-cast pylist to whatever you need it to be. For example: pylist= [(1.0, u'10',''), (2.0, 1.0, 2.0), (u'9', '', 2.0)] cast = [(float(x), str(y), str(z)) for x,y,z in pylist] #[(1.0, '10', ''), (2.0, '1.0', '2.0'), (9.0, '', '2.0')] fields =["A", "B", "C"] #fields of arcgis table #using with means closure in ...


3

Are you sure it is arcpy.ListFeatureClasses() that takes such a long time? Could it be some other piece of code? Verify with the profiler with just a dummy os.time as shown here. On the SSD disk (2 years old, was heavily used daily), the arcpy.ListFeatureClasses() returns the list of ~800 shapefiles found in the folder specified in less than 5 secs (just ...


3

I'm not sure how to do this is VB Script, but I do in python. In the field calculator, set your Parser to Python. Click the Show Codeblock box. In the input box (where you see fieldname = above), type in getYear (!fieldname!), where fieldname is the name of the field with the years. The code block code depends on if your field is a string or a number type ...


2

I have tried to understand what you are asking without success. What I can say is that I think your code snippet should start from code like below: l = [[u'OBJECTID', 1.0 , 2.0 , 3.0 , 4.0 ], [u'LENGTH', 56.29, 61.8 , 11.01 ,164.03]] print l[0] From this you can see that a list gets printed: [u'OBJECTID', 1.0, 2.0, 3.0, 4.0] However, I am unable ...


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

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 ...


1

Here's an example of technique I mentioned in the my comment to your question. Reading a CSV and populating a feature class with its values can be easy. The script assumes the Latitude field is the 1st column and Longitude field is the 2nd column. You can tweak the coordinate system in the code to something other than WGS84, tweak the field types, etc. # ...


1

I've found a model builder model to be fastest with: "Make X Y Event Layer" followed by "Feature class to Feature Class"


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

It looks like it is complaining about a path name to the table that contains a file geodatabase name shell_ele.gdb twice. It seems unlikely that you would store a file geodabase inside a file geodatabase folder so I would say that either the message that it does not exist is accurate, or if it does exist at that location then it is an unsupported pathname.


1

http://gislab.net/pics/3.jpg This is what you need to do i believe, right click on the map part you created (not the margins Arc wants to put the map in) then goto distribute, then goto fit to margins. This will make your map fit the margins of your layout choice. I would have put in comments, but it wouldnt let me


1

Yes, you can. Use the Copy_Features GP tool for that. pnt_fc = r"C:\Users\us\Documents\ArcGIS\Default.gdb\_PointDistanceFc" mem1 = r"in_memory\bufferOne" mem2 = r"in_memory\bufferTwo" arcpy.Buffer_analysis(in_features=pnt_fc, out_feature_class=mem1, buffer_distance_or_field='10 Meters') ...


1

It is not possible to save the output of the Copy tool to in_memory, whatever the input's workspace. It is explained in the last answer of the post you mentioned, I add here an updated reference. FYI, there are some other tools that don't accept in_memory as output workspace, e.g. Project.


1

One option is to add the aircraft graphic at the center of the map and simply keep it there. As you update the center of the map extent, the graphic at the center will accurately represent the aircraft location without being updated.



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