3

Can you define a split policy or split rule on a field without a domain? When a domain is involved, you can set the default value of the field and chose a rule for when a feature is split or merged.

The setSplitRule exists, but the only two options are 'None' or 'Ratio'. 'None' sets the attributes to the copy of the original value. http://resources.arcgis.com/en/help/main/10.2/index.html#//018z0000004v000000

I am looking to set a field to the Default Value (null) instead of copying the value from the original feature.

3

Those are actually two different things. Geoprocessing tools don't honor the split policies of feature classes or tables as noted on most of help pages for the tools - this one for example (look for the yellow triangle exclamation point). Those are the policies set using domains, and where that third option of Default comes in. As far as I know, this functionality is not available without the use of domains.

With an operation performed on a Feature Layer you can specify a ratio policy as a property of that feature layer, but you do not have the Default choice because it's not actually a split/merge policy - just use ratio or don't.

I believe the same principle applies in the arcpy field method you link to though they call it split rule there. If I understand correctly, the only time the split/merge policies take effect is during editing tasks, as opposed to geoprocessing tools.

  • I should have clarified a bit more in the question. I am looking to using the "Split Tool" from the Editor toolbar on a line. It has a value in text field X, but I am looking for the two resulting features to both have nulls, instead of copying the original value for field X. It looks like a text field only can duplicate the original value unless it has a domain associated with the field. – Dan Jul 21 '14 at 21:33
  • @Dan Gotcha - I've edited my answer to include a clarifying sentence in that as far as I know you can't do it without domains (though could happily be proven wrong). I've left the rest, because as written it does talk about two different things (and I think this actually makes the question more useful). – Chris W Jul 21 '14 at 21:41
  • That agrees with what I found (you're unable to set a value without using domains as of 10.2). I'm choosing this as the answer unless someone can demonstrate differently. – Dan Jul 21 '14 at 22:06
1

I'd make this a comment but wanted to post the below code that may help with the understanding of how to use a field info object, or at least add an example (from here: https://geonet.esri.com/message/287684#287684). The key happened to be (and obviously at that thread we were all struggling with it) the field info is modified as an object in memory and available to be applied to other layers in subsequent processing.

inFeaturesAlb = "blocks_01_alb.shp"  

# Create a describe object  
desc = arcpy.Describe(inFeaturesAlb)  

# Create a fieldinfo object  
field_info = desc.fieldInfo  

# Get the field index and set ratio policy  
field_info.setSplitRule(field_info.findFieldByName("POP10"), "RATIO")    

layer = "temp_layer"  
arcpy.MakeFeatureLayer_management(inFeaturesAlb, layer, '', '', field_info)  

######################################################################      
#Do the intersection  
#####################################################################       
intOut = "State_01_int_3.shp"      
inFeatures_int = [USA_layer, layer]  

arcpy.Intersect_analysis(inFeatures_int, intOut)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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