ShapeFileFeatureLayer¶
Namespace: ThinkGeo.Core
This class represents a Layer backed by a Shape File.
public class ShapeFileFeatureLayer : FeatureLayer, IFeatureLayer
Inheritance object → LayerBase → Layer → FeatureLayer → ShapeFileFeatureLayer
Implements IFeatureLayer
Remarks:
None
Properties¶
HasBoundingBox¶
This property checks to see if a Layer has a BoundingBox or not. If it has no BoundingBox, it will throw an exception when you call the GetBoundingBox() and GetFullExtent() APIs. In ShapeFileFeatureLayer, we override this API and mark it as true.
public bool HasBoundingBox { get; }
Property Value¶
Remarks:
The default implementation in the base class returns false.
UsingSpatialIndex¶
This property gets whether the Shape File FeatureSource has an index or not.
public bool UsingSpatialIndex { get; }
Property Value¶
Encoding¶
This property gets and sets the encoding information for the DBF.
public Encoding Encoding { get; set; }
Property Value¶
CultureInfo¶
Gets or sets the CultureInfo.
public CultureInfo CultureInfo { get; set; }
Property Value¶
ShapePathFilename¶
This property returns the path and filename of the Shape File you want to represent.
public string ShapePathFilename { get; set; }
Property Value¶
Exceptions¶
ArgumentException
Setting an invalid PathFilename structure will throw an ArgumentException.
Remarks:
None
IndexPathFilename¶
This property returns the path and filename of the index file you want to represent.
public string IndexPathFilename { get; set; }
Property Value¶
Exceptions¶
ArgumentException
Setting an invalid PathFilename structure will throw an ArgumentException.
Remarks:
None
ReadWriteMode¶
Gets or sets the ReadWriteMode.
public FileAccess ReadWriteMode { get; set; }
Property Value¶
RequireIndex¶
This property gets and sets whether an index is required when reading data. The default value is true.
public bool RequireIndex { get; set; }
Property Value¶
ProgressiveDrawingRecordsCount¶
Gets or sets the ProgressiveDrawingRecordsCount.
public int ProgressiveDrawingRecordsCount { get; set; }
Property Value¶
SimplificationAreaInPixel¶
Gets or sets the SimplificationAreaInPixel.
public int SimplificationAreaInPixel { get; set; }
Property Value¶
Projection¶
Gets the projection used by the underlying FeatureLayer.FeatureSource.
public Projection Projection { get; }
Property Value¶
EditTools¶
This property gets the EditTools that allow you to easily edit InternalFeatures in the Feature Layer.
public EditTools EditTools { get; protected set; }
Property Value¶
Remarks:
The EditTools are supplied as an easily accessible wrapper for the editing methods of the FeatureSource.
FeatureIdsToExclude¶
A collection of strings representing record id of features not to get in the Layer.
public Collection<string> FeatureIdsToExclude { get; }
Property Value¶
Remarks:
This string collection is a handy place to specify what records not to get from the source. Suppose you have a shape file of roads and you want to hide the roads within a particular rectangle, simply execute GetFeaturesInsideBoundingBox() and add the id of the return features to the collection and forget about them. Since you can set this by Layer it makes is easy to determine what to and what not to.
QueryTools¶
This property gets the QueryTools that allow you to easily query Features from the Feature Layer.
public QueryTools QueryTools { get; protected set; }
Property Value¶
Remarks:
Feature Layer. The QueryTools are supplied as an easily accessible wrapper for the query methods of the FeatureSource.
MaxRecordsToDraw¶
Gets or sets the maximum number of features that may be rendered per draw call.
public int MaxRecordsToDraw { get; set; }
Property Value¶
FeatureSource¶
This property gets the FeatureSource for the FeatureLayer.
public FeatureSource FeatureSource { get; set; }
Property Value¶
FeatureSource
This property gets the FeatureSource for the FeatureLayer.
Remarks:
The FeatureSource is the provider of data to the FeatureLayer. There are different FeatureSource classes to match the various ways that feature data is stored. It is important that, when you inherit from the FeatureLayer, in the constructor you set the FeatureSource you want to use.
DrawingQuality¶
This property gets and sets the general drawing quality for the FeatureLayer's view.
public DrawingQuality DrawingQuality { get; set; }
Property Value¶
This property gets the general drawing quality for the FeatureLayer's
Remarks:
The DrawingQuality enumeration allows you to control, in a macro sense, the drawing quality that will be used in the GeoCanvas. Each GeoCanvas, which is responsible for drawing of the features, may have its own specialized drawing quality properties. What the DrawingQuality enumeration does is define some general guidelines for each GeoCanvas. For example, if you set the DrawingQuality to HighSpeed, then inside of the PlatformGeoCanvas there is a profile for HighSpeed. This profile sets specific properties, such as the smoothing mode and composing drawing mode of the PlatformGeoCanvas. As each GeoCanvas may have different drawing quality properties, this offers a general way to control drawing quality and speed.
If you need complete control over how a specific GeoCanvas will draw, then you can set the DrawingQuality to Custom. This will tell the specific GeoCanvas to use the properties on its own object instead of one of the pre-defined profiles. If one of the profiles -- such as HighSpeed or HighQuality -- is set, then the specific GeoCanvas ignores its own properties for drawing quality.
ZoomLevelSet¶
This property gets and sets the ZoomLevelSet, which contains the specific zoom levels for the FeatureLayer.
public ZoomLevelSet ZoomLevelSet { get; set; }
Property Value¶
This property gets the ZoomLevelSet, which contains the specific zoom levels for
the FeatureLayer.
Remarks:
The ZoomLevelSet is a class that contains all of the ZoomLevels for the FeatureLayer. Each ZoomLevel contains the styles that are used to determine how to draw the InternalFeatures.
LabelDisplayMode¶
Gets or sets the labeling strategy to apply when drawing this layer.
public LabelDisplayMode LabelDisplayMode { get; set; }
Property Value¶
DrawingMarginInPixel¶
Gets or sets the pixel margin applied when requesting data for this layer.
public float DrawingMarginInPixel { get; set; }
Property Value¶
RequestDrawingInterval¶
Gets or sets the interval between automatic draw requests. Obsolete.
public TimeSpan RequestDrawingInterval { get; set; }
Property Value¶
Name¶
Gets or sets the display name for the layer.
public string Name { get; set; }
Property Value¶
string
The name used to identify the layer within UI components such as legends.
Remarks:
The name is user defined. Assign a descriptive value so tooling such as legends and layer lists can surface a meaningful label to end users.
IsOpen¶
Gets a value indicating whether the layer is currently open.
public bool IsOpen { get; }
Property Value¶
bool
true if the layer has completed its open routine; otherwise, false.
Remarks:
This method is the concrete wrapper for the abstract method IsOpenCore. Various methods on the Layer require that it be in an open state. If one of those methods is called when the state is not open, then the method will throw an exception. To enter the open state, you must call the Layer Open method. The method will raise an exception if the current Layer is already open.
As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.
IsVisible¶
Gets or sets a value indicating whether the layer is visible.
public bool IsVisible { get; set; }
Property Value¶
bool
true to draw the layer; otherwise, false.
Remarks:
If this property is set to false, the layer will not draw. We ensure this in the Draw method. This is useful for legends and other controls that control the visibility of layers.
DrawingTime¶
Gets the last recorded drawing time for the layer.
public TimeSpan DrawingTime { get; protected set; }
Property Value¶
TimeSpan
The duration of the most recent draw operation.
Remarks:
We track the drawing time for the layer and report it back in this method. This is useful for determining the speed of various layers.
DrawingExceptionMode¶
Gets or sets how drawing exceptions are handled when the layer renders.
public DrawingExceptionMode DrawingExceptionMode { get; set; }
Property Value¶
Background¶
Gets or sets the background color used when rendering the layer.
public GeoColor Background { get; set; }
Property Value¶
GeoColor
The fill applied to areas not covered by layer content.
Transparency¶
Gets or sets the amount of transparency applied to the rendered image.
public float Transparency { get; set; }
Property Value¶
float
A value between 0 (fully transparent) and 255 (fully opaque).
BlueTranslation¶
Gets or sets the intensity adjustment applied to the blue channel.
public float BlueTranslation { get; set; }
Property Value¶
float
A value between -255 and 255 representing the blue channel translation.
RedTranslation¶
Gets or sets the intensity adjustment applied to the red channel.
public float RedTranslation { get; set; }
Property Value¶
float
A value between -255 and 255 representing the red channel translation.
GreenTranslation¶
Gets or sets the intensity adjustment applied to the green channel.
public float GreenTranslation { get; set; }
Property Value¶
float
A value between -255 and 255 representing the green channel translation.
KeyColors¶
Gets the collection of key colors that should be rendered as transparent.
public Collection<GeoColor> KeyColors { get; }
Property Value¶
Remarks:
Attempting to access this collection when the associated GeoCanvas does not support key colors (see GeoCanvas.SupportKeyColor) results in an exception. Add colors to this collection to ensure they render as transparent.
IsNegative¶
Gets or sets a value indicating whether the image should be rendered with inverted colors.
public bool IsNegative { get; set; }
Property Value¶
bool
true to invert the color channels; otherwise, false.
IsGrayscale¶
Gets or sets a value indicating whether the image should be converted to grayscale prior to rendering.
public bool IsGrayscale { get; set; }
Property Value¶
bool
true to apply a grayscale filter; otherwise, false.
ThreadSafe¶
Gets or sets the threading guarantees provided by the layer implementation.
public ThreadSafetyLevel ThreadSafe { get; set; }
Property Value¶
ThreadSafetyLevel
The level of thread safety that callers can expect when interacting with the layer.
ColorMappings¶
Gets the color translation map that will be applied when rendering the layer.
public Dictionary<GeoColor, GeoColor> ColorMappings { get; }
Property Value¶
Dictionary<GeoColor, GeoColor>
WrappingMode¶
Gets or sets how the layer wraps when the map extent crosses world boundaries.
public WrappingMode WrappingMode { get; set; }
Property Value¶
WrappingExtent¶
Gets or sets the geographic extent to use when wrapping is enabled.
public RectangleShape WrappingExtent { get; set; }
Property Value¶
Constructors¶
ShapeFileFeatureLayer()¶
This is a constructor for the class.
public ShapeFileFeatureLayer()
Remarks:
ShapeFileFeatureLayer(string)¶
This is a constructor for the class.
public ShapeFileFeatureLayer(string shapePathFilename)
Parameters¶
shapePathFilename string
This parameter is the Shape File path and filename.
Remarks:
None
ShapeFileFeatureLayer(string, FileAccess)¶
This is a constructor for the class.
public ShapeFileFeatureLayer(string shapePathFilename, FileAccess readWriteMode)
Parameters¶
shapePathFilename string
This parameter is the Shape File path and filename.
readWriteMode FileAccess
This parameter specifies whether the file will be opened in read-only or read/write mode.
Remarks:
None
ShapeFileFeatureLayer(string, string)¶
This is a constructor for the class.
public ShapeFileFeatureLayer(string shapePathFilename, string indexPathFilename)
Parameters¶
shapePathFilename string
This parameter is the Shape File path and filename.
indexPathFilename string
This parameter is the index file path and filename.
Remarks:
None
ShapeFileFeatureLayer(string, string, FileAccess)¶
This is a constructor for the class.
public ShapeFileFeatureLayer(string shapePathFilename, string indexPathFilename, FileAccess readWriteMode)
Parameters¶
shapePathFilename string
This parameter is the Shape File path and filename.
indexPathFilename string
This parameter is the index file path and filename.
readWriteMode FileAccess
This parameter specifies whether the file will be opened in read-only or read/write mode.
Remarks:
None
ShapeFileFeatureLayer(string, string, FileAccess, Encoding)¶
This is a constructor for the class.
public ShapeFileFeatureLayer(string shapePathFilename, string indexPathFilename, FileAccess readWriteMode, Encoding encoding)
Parameters¶
shapePathFilename string
This parameter is the Shape File path and filename.
indexPathFilename string
This parameter is the index file path and filename.
readWriteMode FileAccess
This parameter specifies whether the file will be opened in read-only or read/write mode.
encoding Encoding
This parameter specifies the encoding of the data.
Remarks:
None
Methods¶
CloneDeepCore()¶
Provides the overridable implementation that performs clone deep.
protected LayerBase CloneDeepCore()
Returns¶
LayerBase
The result of the operation.
Rebuild(string)¶
This method rebuilds the SHP, SHX, DBF, IDX and IDS files for the given shape file.
public static void Rebuild(string shapePathFilename)
Parameters¶
shapePathFilename string
This parameter is the shape file you want to rebuild.
Returns¶
void
None
Remarks:
file. When we do editing we have optimized the updates so that we do not need to rebuild the entire shape file. This leads to the shape file being out of order which may cause it not to open in other tools. One optimization is if you update a record instead of rebuilding a new shape file we mark the old record as null and add the edited record at the end of the shape file. This greatly increases the speed of committing shape file changes but will over time unorder the shape file. In addition we do a delete the DBF file will simply mark the record deleted and not compact the space. Rebuilding the shape file will correctly order the SPX and SHX along with compacting the DBF file and rebuild any index with the same any of the shape file if it exists.
Note that if you have build custom index files where the name of the index differs from that of the shape file you will need to rebuild those manually using the BuildIndex methods.
Rebuild(string, ShapeFileSortingMode, int)¶
Performs rebuild.
public static void Rebuild(string shapePathFilename, ShapeFileSortingMode sortingMode, int sridForSorting)
Parameters¶
shapePathFilename string
The shape path filename.
sortingMode ShapeFileSortingMode
The sorting mode.
sridForSorting int
The srid for sorting.
Returns¶
CreateShapeFile(ShapeFileType, string, IEnumerable<DbfColumn>)¶
Static API to create a new Shape File.
public static void CreateShapeFile(ShapeFileType shapeType, string pathFilename, IEnumerable<DbfColumn> databaseColumns)
Parameters¶
shapeType ShapeFileType
This parameter specifies the the Shape File type for the target Shape File.
pathFilename string
This parameter specifies the Shape filename for the target Shape File.
databaseColumns IEnumerable<DbfColumn>
This parameter specifies the DBF column information for the target Shape File.
Returns¶
CreateShapeFile(ShapeFileType, string, IEnumerable<DbfColumn>, Encoding)¶
Static API to create a new Shape File.
public static void CreateShapeFile(ShapeFileType shapeType, string pathFilename, IEnumerable<DbfColumn> databaseColumns, Encoding encoding)
Parameters¶
shapeType ShapeFileType
This parameter specifies the the Shape File type for the target Shape File.
pathFilename string
This parameter specifies the Shape filename for the target Shape File.
databaseColumns IEnumerable<DbfColumn>
This parameter specifies the DBF column information for the target Shape File.
encoding Encoding
This parameter specifies the DBF encoding infromation for the target Shape File.
Returns¶
CreateShapeFile(ShapeFileType, string, IEnumerable<DbfColumn>, Encoding, OverwriteMode)¶
Static API to create a new Shape File.
public static void CreateShapeFile(ShapeFileType shapeType, string pathFilename, IEnumerable<DbfColumn> databaseColumns, Encoding encoding, OverwriteMode overwriteMode)
Parameters¶
shapeType ShapeFileType
This parameter specifies the the Shape File type for the target Shape File.
pathFilename string
This parameter specifies the Shape filename for the target Shape File.
databaseColumns IEnumerable<DbfColumn>
This parameter specifies the DBF column information for the target Shape File.
encoding Encoding
This parameter specifies the DBF encoding infromation for the target Shape File.
overwriteMode OverwriteMode
This parameter specifies the override mode when the target Shape File exists.
Returns¶
Remarks:
An exception will be thown when the target Shape File does not exist while the overwrite mode is set to DoNotOverwrite.
BuildIndexFile(string)¶
This method builds a spatial index for the layer.
public static void BuildIndexFile(string pathFilename)
Parameters¶
pathFilename string
The path and filename to the Shape File.
Returns¶
void
None
Remarks:
This overload allows you to pass in the Shape File.
BuildIndexFile(string, string, BuildIndexMode)¶
This method build a spatial index for the shape file which increases accessspeed.
public static void BuildIndexFile(string shapePathFilename, string indexPathFilename, BuildIndexMode buildIndexMode)
Parameters¶
shapePathFilename string
This parameter is the shape file name and path that you want to build an index for.
indexPathFilename string
This parameter specifies the index file name.
buildIndexMode BuildIndexMode
This parameter determines what will happen if there is an existing index file.
Returns¶
void
None
Remarks:
BuildIndexFile(string, BuildIndexMode)¶
This method builds a spatial index for the layer.
public static void BuildIndexFile(string pathFilename, BuildIndexMode rebuildExistingIndexMode)
Parameters¶
pathFilename string
This parameter is the matching pattern that defines which Shape Files to include.
rebuildExistingIndexMode BuildIndexMode
This parameter determines whether an index file will be rebuilt if it already exists.
Returns¶
void
None
Remarks:
BuildIndexFile(IEnumerable<Feature>, string)¶
This method builds a spatial index for the specified group of features.
public static void BuildIndexFile(IEnumerable<Feature> features, string indexPathFilename)
Parameters¶
features IEnumerable<Feature>
This parameter specifies the features for which to build the index.
indexPathFilename string
This parameter specifies the target index path and filename.
Returns¶
void
None
Remarks:
BuildIndexFile(IEnumerable<Feature>, string, ProjectionConverter)¶
This method builds a spatial index for the specified group of features and target projection.
public static void BuildIndexFile(IEnumerable<Feature> features, string indexPathFilename, ProjectionConverter projectionConverter)
Parameters¶
features IEnumerable<Feature>
This parameter specifies the features for which to build the index.
indexPathFilename string
This parameter specifies the target index path and filename.
projectionConverter ProjectionConverter
This parameter specifies the projection to build index against those features.
Returns¶
void
None
Remarks:
BuildIndexFile(IEnumerable<Feature>, string, BuildIndexMode)¶
This method builds a spatial index for the specified group of features.
public static void BuildIndexFile(IEnumerable<Feature> features, string indexPathFilename, BuildIndexMode buildIndexMode)
Parameters¶
features IEnumerable<Feature>
This parameter specifies the features for which to build the index.
indexPathFilename string
This parameter determines the target index path filename.
buildIndexMode BuildIndexMode
This parameter determines whether an index file will be rebuilt if it already exists.
Returns¶
void
None
Remarks:
BuildIndexFile(IEnumerable<Feature>, string, ProjectionConverter, BuildIndexMode)¶
This method builds a spatial index for the specified group of features.
public static void BuildIndexFile(IEnumerable<Feature> features, string indexPathFilename, ProjectionConverter projectionConverter, BuildIndexMode buildIndexMode)
Parameters¶
features IEnumerable<Feature>
This parameter specifies the features for which to build the index.
indexPathFilename string
This parameter determines the target index path filename.
projectionConverter ProjectionConverter
This parameter determines the Projection to build index against those features.
buildIndexMode BuildIndexMode
This parameter determines whether an index file will be rebuilt if it already exists.
Returns¶
void
None
Remarks:
BuildIndexFile(string, string, string, string, BuildIndexMode)¶
This method builds a spatial index only for those features that satisfy a regular expression.
public static void BuildIndexFile(string shapePathFilename, string indexPathFilename, string columnName, string regularExpression, BuildIndexMode buildIndexMode)
Parameters¶
shapePathFilename string
This parameter specifies the Shape File for which to build the index.
indexPathFilename string
This parameter determines the target index path filename.
columnName string
This parameter determines the column name whose values will be tested against the regular expression.
regularExpression string
This parameter represents the regular expression to test against each feature for inclusion in the index.
buildIndexMode BuildIndexMode
This parameter determines whether an index file will be rebuilt if it already exists.
Returns¶
void
None
Remarks:
This overload allows you to pass in a Shape File and specify the index filename to use.
BuildIndexFile(string, string, ProjectionConverter, string, string, BuildIndexMode)¶
This method builds a spatial index only for those features that satisfy a regular expression, based on a passed-in projection.
public static void BuildIndexFile(string shapePathFilename, string indexPathFilename, ProjectionConverter projectionConverter, string columnName, string regularExpression, BuildIndexMode buildIndexMode)
Parameters¶
shapePathFilename string
This parameter specifies the Shape File for which to build the index.
indexPathFilename string
This parameter determines the target index path filename.
projectionConverter ProjectionConverter
This parameter determines the projection that will be used to build the index against those features that satisfy the regular expression.
columnName string
This parameter determines the column name whose values will be tested against the regular expression.
regularExpression string
This parameter represents the regular expression to test against each feature for inclusion in the index.
buildIndexMode BuildIndexMode
This parameter determines whether an index file will be rebuilt if it already exists.
Returns¶
void
None
Remarks:
This overload allows you to pass in a Shape File and specify the index filename to use.
BuildIndexFile(string, string, ProjectionConverter, string, string, BuildIndexMode, Encoding)¶
This method builds a spatial index only for those features that satisfy a regular expression, based on a passed-in projection.
public static void BuildIndexFile(string shapePathFilename, string indexPathFilename, ProjectionConverter projectionConverter, string columnName, string regularExpression, BuildIndexMode buildIndexMode, Encoding encoding)
Parameters¶
shapePathFilename string
This parameter specifies the Shape File for which to build the index.
indexPathFilename string
This parameter determines the target index path filename.
projectionConverter ProjectionConverter
This parameter determines the projection that will be used to build the index against those features that satisfy the regular expression.
columnName string
This parameter determines the column name whose values will be tested against the regular expression.
regularExpression string
This parameter represents the regular expression to test against each feature for inclusion in the index.
buildIndexMode BuildIndexMode
This parameter determines whether an index file will be rebuilt if it already exists.
encoding Encoding
This parameter specifies the encoding information used in the source DBF file.
Returns¶
void
None
Remarks:
This overload allows you to pass in a Shape File and specify the index filename to use.
CloneShapeFileStructure(string, string)¶
Clone the structure from the source ShapeFile to the target ShapeFile. After cloning the structure, the target ShapeFile will have the same type and the same DBF columns as the source ShapeFile, but without any records in it.
public static void CloneShapeFileStructure(string sourceShapePathFilename, string targetShapePathFilename)
Parameters¶
sourceShapePathFilename string
The source Shape File to be cloned.
targetShapePathFilename string
The target Shape File, which will have the same structure as the source Shape File after cloning operation is complete.
Returns¶
CloneShapeFileStructure(string, string, OverwriteMode)¶
Clone the structure from the source ShapeFile to the target ShapeFile. After cloning the structure, the target ShapeFile will have the same type and the same DBF columns as the source ShapeFile, but without any records in it.
public static void CloneShapeFileStructure(string sourceShapePathFilename, string targetShapePathFilename, OverwriteMode overwriteMode)
Parameters¶
sourceShapePathFilename string
The source Shape File to be cloned.
targetShapePathFilename string
The target Shape File, which will have the same structure as the source Shape File after cloning operation is complete.
overwriteMode OverwriteMode
This parameter specifies the overwrite mode when the target ShapeFile already exists.
Returns¶
Remarks:
An exception will be thown when the target ShapeFile does not exist and the overwrite mode is set to DoNotOverwrite.
CloneShapeFileStructure(string, string, OverwriteMode, Encoding)¶
Clone the structure from the source ShapeFile to the target ShapeFile. After cloning the structure, the target ShapeFile will have the same type and the same DBF columns as the source ShapeFile, but without any records in it.
public static void CloneShapeFileStructure(string sourceShapePathFilename, string targetShapePathFilename, OverwriteMode overwriteMode, Encoding encoding)
Parameters¶
sourceShapePathFilename string
The source Shape File to be cloned.
targetShapePathFilename string
The target Shape File, which will have the same structure as the source Shape File after cloning operation is complete.
overwriteMode OverwriteMode
This parameter specifies the overwrite mode when the target ShapeFile already exists.
encoding Encoding
This parameter specifies the encoding information in the source Shape File.
Returns¶
Remarks:
An exception will be thown when the target ShapeFile does not exist and the overwrite mode is set to DoNotOverwrite.
BuildRecordIdColumn(string, string, BuildRecordIdMode)¶
Static API used to build RecordId. The Id will start from 0.
public static void BuildRecordIdColumn(string shapeFilename, string fieldname, BuildRecordIdMode rebuildNeeded)
Parameters¶
shapeFilename string
The name of the target ShapeFile on which to base the newly built RecordId.
fieldname string
The field name for the RecordId.
rebuildNeeded BuildRecordIdMode
The RecordId build mode.
Returns¶
BuildRecordIdColumn(string, string, BuildRecordIdMode, int)¶
Static API used to build RecordId from the specified starting Id number.
public static void BuildRecordIdColumn(string shapeFilename, string fieldname, BuildRecordIdMode rebuildNeeded, int startNumber)
Parameters¶
shapeFilename string
The name of the target ShapeFile on which to base the newly built RecordId.
fieldname string
The field name for the RecordId.
rebuildNeeded BuildRecordIdMode
The RecordId build mode.
startNumber int
The starting Id number of the RecordId.
Returns¶
BuildRecordIdColumn(string, string, BuildRecordIdMode, int, Encoding)¶
Static API used to build RecordId from the specified starting Id number.
public static void BuildRecordIdColumn(string shapeFilename, string fieldname, BuildRecordIdMode rebuildNeeded, int startNumber, Encoding encoding)
Parameters¶
shapeFilename string
The name of the target ShapeFile on which to base the newly built RecordId.
fieldname string
The field name for the RecordId.
rebuildNeeded BuildRecordIdMode
The RecordId build mode.
startNumber int
The starting Id number of the RecordId.
encoding Encoding
This parameter specifies the encoding information in the DBF.
Returns¶
GetShapeFileType()¶
Get the Shape File type for the Shape File FeatureSource.
public ShapeFileType GetShapeFileType()
Returns¶
ShapeFileType
The ShapeFileType for the ShapeFile FeatureSource.
Reproject(string, string, ProjectionConverter, OverwriteMode)¶
This API provide a easy way to project features in a shape file into another projection and save it to shape file.
public static void Reproject(string sourceShapeFile, string targetShapeFile, ProjectionConverter projectionConverter, OverwriteMode overwriteMode)
Parameters¶
sourceShapeFile string
This parameter specifies the source shape file to be projected.
targetShapeFile string
This parameter specifies the target shape file to be saved for the projected features.
projectionConverter ProjectionConverter
Shape file should be in the FromProjection of the Projection prameter, and the targetShapeFile will be in the ToProjection of the Projection.
overwriteMode OverwriteMode
This parameter specifies the override mode when the target shape file exists.
Returns¶
Validate()¶
This method checks all features in a shapefile is supported by Mapsuite or not.
public Dictionary<string, string> Validate()
Returns¶
Dictionary<string, string>
A dictionary which contains all the unsupported features. The key is the Indexs which failed to pass the check, the value contains the reason for its failure.
GetValidColumns(IEnumerable<DbfColumn>)¶
Returns valid columns from the underlying data source.
public static Collection<DbfColumn> GetValidColumns(IEnumerable<DbfColumn> columns)
Parameters¶
columns IEnumerable<DbfColumn>
The columns.
Returns¶
Collection<DbfColumn>
The result of the operation.
GetValidColumns(IEnumerable<DbfColumn>, Encoding)¶
Returns valid columns from the underlying data source.
public static Collection<DbfColumn> GetValidColumns(IEnumerable<DbfColumn> columns, Encoding encoding)
Parameters¶
columns IEnumerable<DbfColumn>
The columns.
encoding Encoding
The encoding.
Returns¶
Collection<DbfColumn>
The result of the operation.
GetValidColumnNames(IEnumerable<string>)¶
Returns valid column names from the underlying data source.
public static Collection<string> GetValidColumnNames(IEnumerable<string> columnNames)
Parameters¶
columnNames IEnumerable<string>
The column names.
Returns¶
Collection<string>
The result of the operation.
GetValidColumnNames(IEnumerable<string>, Encoding)¶
Returns valid column names from the underlying data source.
public static Collection<string> GetValidColumnNames(IEnumerable<string> columnNames, Encoding encoding)
Parameters¶
columnNames IEnumerable<string>
The column names.
encoding Encoding
The encoding.
Returns¶
Collection<string>
The result of the operation.
DrawCore(GeoCanvas, Collection<SimpleCandidate>)¶
Provides the overridable implementation that draws onto and appends any label candidates to .
protected void DrawCore(GeoCanvas canvas, Collection<SimpleCandidate> labelsInAllLayers)
Parameters¶
canvas GeoCanvas
The to draw to.
labelsInAllLayers Collection<SimpleCandidate>
A shared collection that receives label candidates generated during drawing.
Returns¶
Events¶
StreamLoading¶
This event allows you to pass in your own stream to represent the files.
public event EventHandler<StreamLoadingEventArgs> StreamLoading;
Remarks:
If you choose you can pass in your own stream to represent the file. The stream can come from a variety of places such as isolated storage, a compressed file, and encrypted stream. When the Image is finished with the stream it will dispose of it so be sure to keep this in mind when passing the stream in. If you do not pass in a alternate stream the class will attempt to load the file from the file system using the PathFilename property.
DrawingFeatures¶
This event is raised when features are about to be drawn in the layer.
public event EventHandler<DrawingFeaturesEventArgs> DrawingFeatures;
Remarks:
This event is raised when features are about to be drawn in the layer. In the event arguments, there is a collection of features to be drawn. You can easily add or remove items from this collection so that extra items will draw or not draw.
DrawingWrappingFeatures¶
Raised when wrapping features are about to be drawn. Deprecated; use FeatureLayer.DrawingFeatures instead.
public event EventHandler<DrawingWrappingFeaturesFeatureLayerEventArgs> DrawingWrappingFeatures;
DrawingProgressChanged¶
Occurs as the layer reports drawing progress (useful for async or tiled rendering scenarios).
public event EventHandler<DrawingProgressChangedEventArgs> DrawingProgressChanged;
RequestedDrawing¶
Raised after the drawing buffer elapses so consumers can handle a legacy drawing cycle. Obsolete.
public event EventHandler<RequestedDrawingLayerEventArgs> RequestedDrawing;
RequestingDrawing¶
Raised before the drawing buffer elapses so consumers can cancel a legacy drawing operation. Obsolete.
public event EventHandler<RequestingDrawingLayerEventArgs> RequestingDrawing;
DrawingException¶
Occurs when the DrawingException event is raised.
public event EventHandler<DrawingExceptionLayerEventArgs> DrawingException;
DrawnException¶
Occurs when the DrawnException event is raised.
public event EventHandler<DrawnExceptionLayerEventArgs> DrawnException;