Hot answers tagged

4

I got an orders of magnitude speed-up simply by moving two if statements just underneath their corresponding fiona.listlayers calls. if (featureName == "HydrographySrf") if (bldgName == "StructureSrf") I just went from taking over 5.5 hours of parsing down to less than 2.5 minutes. Sorry for getting things spun up on what is otherwise an easy fix.


4

You need to load all your municipalities and zip codes from your CSV into a dictionary, and then in an update cursor loop through your GDB table, look up each municipality in the dictionary and write the corresponding dictionary zip value into the ZIP column of your GDB table. This assumes columns in your CSV called "City" and "ZIP". import arcpy ...


2

If fiona.open(gdb_path) doesn't raise an exception, you've got an open dataset. You can print out its metadata for more verification. with fiona.open(gdb_path) as src: print(src.meta) Shapely is a computational geometry library: buffers, intersections, &c. It doesn't do spatial joins but can be used to help your own join implementations.


2

Thank you for the comments, Russ and Felix. Turns out my problem was that the web map was synced and within My Content on Arc Online but I had not shared it with any groups. I did not think I needed to share it unless I wanted to share the map with someone. But, once I shared it with my work group, the map was automatically enabled for offline use and now ...


2

Upgrade to 2.14.2. It's been fixed already.


2

Look first at More Efficient Spatial join in Python without QGIS, ArcGIS, PostGIS, etc The results of Fiona are Python dictionaries (GeoJSON format) import fiona layer = fiona.open("test_regex.shp") # first feature first = layer.next() print first {'geometry': {'type': 'Polygon', 'coordinates': [[(203371.23902535878, 89863.381050732), ...


1

It could be that your GDB files (which are self-contained databases) have indexes designed to make these kinds of operations very fast for ArcGIS. If OGR (which is what Fiona uses to read GDB files) supports these indexes, you should be able to get a significant speed up if not the same performance as ArcGIS. The section at ...


1

I spend a lot of time working on fantasy maps, currently I am working on several large shapefiles/geodatabases which in combination cover the whole of northern Africa. I have had a lot of trouble running that much data in ArcGIS Pro, but ArcMap on the other hand, gives me no trouble at all working on such a large dataset. I would suggest working with ArcMap ...


1

There is no way to do this with a file geodatabase. If the user has rights to the directory it is in they can access all parts of it the same as any other part. SDE would be required to apply security that would make the feature class invisible to the user and yet accessible to the tool through a secure connection using code. You would also have to apply ...


1

This could work, based on answer Michael wrote, but there are still some problems: >>> fdList = ["Datase_A", "Dataset_B", "Dataset_C"] folList = ["D:\\GIS_Temp\Folder A", "D:\\GIS_Temp\\Folder B", "D:\\GIS_Temp\\Folder C"] workRange = range(len(fdList)) for thisIndex in workRange: fd = fdList[thisIndex] arcpy.env.workspace = ...


1

I suspect that your script is failing because the output already exists, to avoid this set overwrite to True, which is easier than check and delete, but may not be what you need in the long run. Putting together your scraps into a contiguous codeblock: # set overwrite = True so it won't crash if # the output already exists arcpy.env.overwriteOutput = True ...



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