Tag Info

Hot answers tagged

10

Which part of the script is actually taking up most of the time? There are about 5 other steps going on before you actually start deleting stuff. You might want to break your script down into bite-sized tests. For example, instead of creating a temporary connection file, listing a bunch of datasets, listing their contents, counting their records, and then ...


6

I've had problems importing features into a feature dataset if there is another feature anywhere else in the geodatabase with the same name, even if it's not in the same dataset. I don't remember the error I got and whether it was apparent to me at the time, but I guess if nothing else is working so far that's one more thing you could check...


6

Strings, even when marked as r"Raw strings", cannot end with a slash, it needs to be escaped. Should be: fullPath = WSpace + FDSName + "\\" + FCName Or better yet, use os.path.join: fullPath = os.path.join(WSpace, FDSName, FCName)


4

If upgrading to ArcGIS 10.1 (now released) is an option then I just found this in the What's New in ArcGIS 10.1 PDF: New tool to delete all rows from a table The TruncateTable geoprocessing tool in the Tables toolset can be used to delete all rows from a table or feature class. You should use the Truncate Table tool instead of the Delete Rows ...


3

From the help on About importing feature classes: Suppose you want to import a feature class that's in another coordinate system. For example, you may want to import a feature class that uses the North American Datum (NAD) 1927 coordinate system into a feature dataset that uses the NAD 1983 coordinate system. To import the feature class, use the Project ...


3

This is indeed a bug: NIM-070258 - The Extract Values to Points tool creates an output in the geodatabase when a feature dataset is specified as the destination. Found in 10.0 SP2 and solved in 10.2!


3

Why not just delete the feature datasets themselves with arcpy.DeleteFeatures_management(dataset)? If you still need the feature dataset to exist, you could simply recreate it after it's been deleted.


2

I think you will need to use ArcPy for this and the code needed can be found at http://forums.arcgis.com/threads/23078-how-to-delete-all-featuresclasses-in-a-featuredataset-using-arcpy


2

When the FeatureClass gets imported into a FeatureDataset it gets projected to the coordinate system because all FeatureClasses inside a FeatureDataset must have the same Spatial Reference. If you are curios as to the exact process in terms of code, the Import process grabs the ISpatialReference object from the Destination FeatureDataset and, as it loops ...


2

Try using Feature Class To Feature Class instead of Copy Features. The same coordinate system is not the same thing as identical; also see ArcCatalog 10.0 complains that spatial references don't match between a feature dataset and a feature class that have the same coordinate system? Fc-to-Fc is more thorough than copy and will automatically take care ...


2

Have you considered, or is it possible, to save your temporary featureclasses into the "in_memory" workspace? ArcGIS & Modelbuilder will automatically clean up your temporary datasets once the process is complete. Also, you will likely see a dramatic improvement in processing speed with your models. Working with data in memory is tremendously faster ...


2

If you exported the oid, fid or some other unique identification field. Then I would do a join back to that field. Then if you need to add a new field (actually create prior to the join) and calculate the join value to the fc. Note that if you edit/split/delete features after the csv export the oid can change. The csv will be on the end of the attribute ...


2

In version 9.3 there is a toolbox called Create Features from Text File, which can do what you require. The help files are quite detailed and are found here. The following code sample should be simple enough to adapt to reflect your dataset: # Create geoprocessing dispatch object import arcgisscripting gp = arcgisscripting.create() # Set up inputs to tool ...


2

Yes - you need to use a Python list and process it using a for loop: import arcpy arcpy.CreateFileGDB_management("I:/python/MultipleFD2GDB", "HabitatAnalysis.gdb") fdList = ["EMI_EMF", "Cultural_Resources", "Parcels", "Hazardous_Materials", "Footprint", "Checkpoint_B", "Wetlands", "Botany", "Land_Use", "Buffers", "Air_Quality", "Transportation", ...


1

If I were undertaking this task I would first break it into two "halves": Reading geodatabases and printing results Writing results to CSV I think this question should focus on just the first of these, and within that start by writing a code snippet that uses ListWorkspaces, ListFeatureDatasets and ListFeatureClasses to print the name of every feature ...


1

You might be able to do this using IDatasetContainer.AddDataset. From the IDatasetContainer documentation: The IDatasetContainer interface lets you move datasets between feature datasets and workspaces. Both objects implement the interface. It should only be used to move datasets between feature datasets and the workspace level within a single ...


1

The classes in the Esri Workspace Dataset Extension component category do not seem to implement IFeatureDatasetExtension2 (I checked the implemented interfaces in the documentation and with OLE Viewer). They are workspace extensions, implementing IWorkspaceExtension. This category appears to identify those workspace extensions which are tied to specialized ...


1

I don't know why, but r"\" and r'\' both gave me error. Following one works for me: workspacePath = r'C:\a.gdb' datasetName = r'dataset' featureClassName = r'ofc' featureClassPath = workspacePath+"\\"+datasetName+"\\"+featureClassName print featureClassPath output: C:\a.gdb\dataset\ofc


1

Here are some example to show the Json based FeatureCollection as Feature Layer in ARCGIS Javascript API Json Featurelayer 1 and Json To FeatureLayer 2. For showing the 50 Thousand write Handler which returns Json Something like this --->> Json Handler and give that output of the handler as a string to feature collection.Hope this helps you.


1

var featureCollection = { layerDefinition: { "geometryType": "esriGeometryPolygon", "fields": [ { "name": "ID", "type": "esriFieldTypeOID", ...


1

If you need to update records based on edits to the origin, there are several ways to do it. What it boils down is to listen to the Relationship Class events and to update accordingly. That is one way to do it. Another one is to do it as an Editor Extension.


1

I'm not sure what you mean by: ...rather than being deleted, are just turning up in the folder the feature dataset was stored in. The featuredataset is stored within the root of the file geodatabase. You can indeed use the Delete (Data Management) tool on a featuredataset and it will delete the featuredataset and all featureclasses within - I just ...


1

Edited for clarity: I had this error many times, and the only way around it, I found, was to use code to create the featuredatasets and featureclasses in arcpy It's usage is like this: arcpy.CreateFeatureDataset_management(workspacePath, fcName, sr) Where workspace path is obviously the path to your local fgdb, fcName is the Featuredataset and sr the ...



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