public IFeatureSet Union(bool selectedOnlySubject, IFeatureSet featureSetOverlay, bool selectedOnlyOverlay) { var sfOverlay = featureSetOverlay.GetInternal(); var sf = _shapefile.Union(selectedOnlySubject, sfOverlay, selectedOnlyOverlay); return(WrapShapefile(sf)); }
public IFeatureSet Merge(bool selectedOnlyThis, IFeatureSet featureSet, bool selectedOnly) { var sf = featureSet.GetInternal(); var result = _shapefile.Merge(selectedOnlyThis, sf, selectedOnly); return(WrapShapefile(result)); }
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)); }
public bool SelectByShapefile(IFeatureSet featureSet, SpatialRelation relation, bool selectedOnly, out int[] result) { var sf = featureSet.GetInternal(); object indices = null; if (_shapefile.SelectByShapefile(sf, (tkSpatialRelation)relation, selectedOnly, ref indices)) { result = indices as int[]; return(true); } result = null; return(false); }
/// <summary> /// Changes selection of the feature set adding new shapes using the specified mode /// </summary> public static void UpdateSelection(this IFeatureSet fs, IEnumerable <int> indices, SelectionOperation mode) { if (fs == null || indices == null) { return; } if (mode == SelectionOperation.New) { fs.ClearSelection(); } var sf = fs.GetInternal(); switch (mode) { case SelectionOperation.New: foreach (var item in indices) { sf.ShapeSelected[item] = true; } break; case SelectionOperation.Add: foreach (var item in indices) { sf.ShapeSelected[item] = true; } break; case SelectionOperation.Exclude: foreach (var item in indices) { sf.ShapeSelected[item] = false; } break; case SelectionOperation.Invert: foreach (var item in indices) { sf.ShapeSelected[item] = !sf.ShapeSelected[item]; } break; } }
public bool ImportLayer(IFeatureSet featureSet, string layerName, string creationOptions = "", ValidationMode validationMode = ValidationMode.TryFixSkipOnFailure) { return(_datasource.ImportShapefile(featureSet.GetInternal(), layerName, creationOptions, (tkShapeValidationMode)validationMode)); }
public Grid ShapefileToGrid(IFeatureSet shapefile, bool useShapefileBounds = true, GridSourceHeader gridHeader = null, double cellsize = 30, bool useShapeNumber = true, short singleValue = 1) { return(_utils.ShapefileToGrid(shapefile.GetInternal(), useShapefileBounds, gridHeader.GetInternal(), cellsize, useShapeNumber, singleValue)); }
public IGeometry ShapeMerge(IFeatureSet featureSet, int indexOne, int indexTwo) { var shape = _utils.ShapeMerge(featureSet.GetInternal(), indexOne, indexTwo); return(shape != null ? new Geometry(shape) : null); }
public IFeatureSet ShapeToShapeZ(IFeatureSet shapefile, IGridSource grid) { var sf = _utils.ShapeToShapeZ(shapefile.GetInternal(), grid.GetInternal()); return(sf != null ? new FeatureSet(sf) : null); }
public bool ExportSelection(IFeatureSet fs, string outputFilename, bool overwrite) { return(_utils.ExportSelection(fs.GetInternal(), outputFilename, overwrite)); }
public bool RemoveColinearPoints(IFeatureSet feature, double linearTolerance) { return(_utils.RemoveColinearPoints(feature.GetInternal(), linearTolerance)); }
public bool ExplodeShapes(IFeatureSet fs, bool selectedOnly, string outputFilename, bool overwrite) { return(_utils.ExplodeShapes(fs.GetInternal(), selectedOnly, outputFilename, overwrite)); }
public bool BufferByDistance(IFeatureSet fs, bool selectedOnly, double distance, int numSegments, bool mergeResults, string outputFilename, bool overwrite) { return(_utils.BufferByDistance(fs.GetInternal(), distance, numSegments, selectedOnly, mergeResults, outputFilename, overwrite)); }
public bool GridStatisticsToShapefile(IGridSource grid, IFeatureSet sf, bool selectedOnly, bool overwriteFields) { return(_utils.GridStatisticsToShapefile(grid.GetInternal(), sf.GetInternal(), selectedOnly, overwriteFields)); }
public IFeatureSet ReprojectShapefile(IFeatureSet sf, ISpatialReference source, ISpatialReference target) { var result = _utils.ReprojectShapefile(sf.GetInternal(), source.GetInternal(), target.GetInternal()); return(result != null ? new FeatureSet(result) : null); }
public bool Validate(IFeatureSet featureSet) { var sf = featureSet.GetInternal(); return(_operations.Validate(sf)); }