ArcPad Split Polygon and Line

341
0
11-01-2018 12:44 AM
BalanmuruganThurmalingam
New Contributor II

Hi, I'm currently doing ArcPad programming to split a polygon and line. I want split a feature polygon from a layer which ONLY intersect with a cutter which are line. How to find which feature is intersect with cutter line. Can i get any code to find intersect. 

Currently use CUT esri example, but it cut all features in a layer. 

//Get the records of the cut layer and find the count
cutRS = Map.Layers( cutLayerName ).Records
cutRS.MoveFirst()

var numFeats = cutRS.RecordCount
for( i=1; i<=numFeats; i++ ) {

//Get the current feature, and call PerformCut routine
curFeat = cutRS.Fields.Shape
output = PerformCut( selLine, curFeat )

// if successfully split
if ( output[0] ) {

//ask if they want to add new feature
Add = MessageBox("Do you want to add the new features?", apYesNo)
if (Add == apYes) {

//Get the attributes and Bookmark of the oringial feature
origBM = cutRS.Bookmark
origAtts = new Array()
for( j=1; j<=cutRS.Fields.Count; j++){
origAtts = cutRS.Fields(j).Value
}

//Add features, and if successful, increment counter and add original feature to the toDelete pile
newFeats = output[1]
addedFeat1 = AddFeat( newFeats[0], cutRS, origAtts )
addedFeat2 = AddFeat( newFeats[1], cutRS, origAtts )
if( addedFeat1 && addedFeat2 ){
toDelete.push( origBM )
cut++
}
cutRS.Bookmark = origBM

}

}
//Move to next feature
cutRS.MoveNext()
}

Tags (1)
0 Kudos
0 Replies