DK for Delphi | GisLayerVector.TGIS_LayerVector.ImportLayer | Overloads | Constructors | Fields | Methods | Properties | Events
Imports a layer from an existing layer.
// Delphi public procedure ImportLayer( const _layer : TGIS_LayerVector; const _extent : TGIS_Extent; const _type : TGIS_ShapeType; const _scope : String; const _shape : TGIS_Shape; const _de9im : String; const _truncated : Boolean ); overload;
// C++ Builder public: void ImportLayer( TGIS_LayerVector* const _layer, TGIS_Extent* const _extent, TGIS_ShapeType* const _type, const UnicodeString _scope, TGIS_Shape* const _shape, const UnicodeString _de9im, const bool _truncated ) /* overload */;
Name | Type | Description |
---|---|---|
_layer | TGIS_LayerVector | layer to be imported |
_extent | TGIS_Extent | starting extent of layer - can't be zero sized |
_type | TGIS_ShapeType | shape type supported by a layer; if gistypeUnknown is used then import will try to recognize shape on its own; |
_scope | String | SQL query for which shape will be imported |
_shape | TGIS_Shape | if not nil, then only shapes matched _de9im matrix with _shape will be found |
_de9im | String | DE-9IM matrix of comparison |
_truncated | Boolean | if True, then all shapes will be truncated in _extent; if False, only the shape visible in _extent will be imported ; |
procedure MyClass.ImportMyLayer(); var ll : TGIS_LayerVector ; lo : TGIS_LayerVector ; begin // check whether GIS object has any layers if GIS.IsEmpty then exit ; // Get first layer from the viewer ll:= TGIS_LayerVector (GIS.Items[0]) ; // create a layer to which existing layer will be imported lo:=TGIS_LayerSHP.Create ; try lo.Path := 'imported.shp'; lo.ImportLayer(ll,GisWholeWorld,TGIS_ShapeType.Unknown,'',False); finally lo.Free; end; end;