Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have ~30 feature datasets and ~100 feature classes spread throughout the feature datasets. I would like to search for a feature class by name among the feature datasets. Also, I would like to query out of all the feature classes those records that have "Date_Mod" from someDate to someOtherDate.

This is all in ArcGIS SDE 10.0 on sql server 2008.

share|improve this question

3 Answers 3

As for me I would recommend choosing python scripting for this task (arcpy).

Here are some ideas:

  1. Use ListDatasets for getting all datasets.
  2. Use ListFeatureClasses for getting all featureclasses.
  3. Use SearchCursor for querying data.
  4. Take a look at Describe function - it also can be very usefull for some tasks.

UPDATE:

Have found after posting: @Aragon has described in detail how to perform step 3.

share|improve this answer

you can check out SearchCursor method here. only one thing is that build an SQL expression instead of where_clause. Query expressions is the same as standard SQL expressions in ArcGIS too. it is similar to Select By Attributes dialog box. you can write your own tool by looking at the following code

Summary

The SearchCursor function establishes a read-only cursor on a feature class or table. The SearchCursor can be used to iterate through row objects and extract field values. The search can optionally be limited by a where clause or by field, and optionally sorted.

Syntax SearchCursor (dataset, {where_clause}, {spatial_reference}, {fields}, {sort_fields})

Example:

import arcpy

# Open a searchcursor 
#  Input: C:/Data/Counties.shp 
#  FieldList: NAME; STATE_NAME; POP2000 
#  SortFields: STATE_NAME A; POP2000 D 
# 
rows = arcpy.SearchCursor("C:/Data/Counties.shp", "'POP2000' > 5000", "", "NAME; 
STATE_NAME; POP2000", "STATE_NAME A; POP2000 D") 
currentState = "" 

# Iterate through the rows in the cursor 
# 
for row in rows: 
    if currentState != row.STATE_NAME: 
        currentState = row.STATE_NAME 

    # Print out the state name, county, and population 
    # 
    print "State: %s, County: %s, population: %i" % \
            (row.STATE_NAME, row.NAME, row.POP2000) 

i hope it helps you....

share|improve this answer

You can also enable the arcmap search indexing (note performance hit).
The usability for me is begining to outweigh the performance loss.

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.