public IFeatureSet Intersection(bool selectedOnlyOfThis, IFeatureSet featureSet, bool selectedOnly, GeometryType geometryType) { var sf = featureSet.GetInternal(); var shpType = GeometryHelper.GeometryType2ShpType(geometryType); var result = _shapefile.GetIntersection(selectedOnlyOfThis, sf, selectedOnly, shpType); return(WrapShapefile(result)); }
/// <summary> /// Clips the rectangular shaped minor grid lines to the selected major grids whose shape may not be a 4 sided polygon /// </summary> /// <param name="clippingShapefile"></param> /// <returns></returns> public bool ClipMinorGrid(Shapefile clippingShapefile) { _shapefileMinorGridLines = clippingShapefile.GetIntersection(false, _shapefileMinorGridLines, false, ShpfileType.SHP_POLYLINE); //When we clip a shapefile and the result is the same shapefile, the shapeID field is duplicated. //The original ID field is renamed to MWShapeI_1. //We delete the duplicate and rename MWShapeI_1 to MWShapeID. _shapefileMinorGridLines.EditDeleteField(0, null); _shapefileMinorGridLines.Field[0].Name = "MWShapeID"; return(_shapefileMinorGridLines.NumShapes > 0); }