I3DMLFeatureLayer81
Mesh layers created from point feature layers with individually referenced 3D model files, imported BIM layers, and mesh layers classified using the legacy Classify Mesh Layer tools include associated feature layers that are pre-processed with their respective mesh layers. See the "TerraExplorer User Guide" for more information.
I3DMLFeatureLayer81 supplies the properties and methods for interacting with these 3DML’s feature layers. It enables you to access information about the data source a 3DML’s feature layer is based on, perform actions (e.g. set message, tooltip, tint) on the feature layer, as well as execute spatial queries.
A 3DML represented by IMeshLayer81 can be loaded from file using the ICreator81.CreateMeshLayerFromFile method or from SkylineGlobe Server using the ICreator81. CreateMeshLayerFromSGS method.
|
|
Properties |
|
|
|
An IDataSourceInfo81 that gives the client access to information about the data source a 3DML’s feature layer is based on. |
|
|
|
An I3DMLFeatureProperties81 that sets the value of a specified property of the specified layer’s features. |
|
|
|
Gets the ID of the feature layer. (Inherited from ITerraExplorerObject81) |
|
|
|
Gets an enum that identifies the type of the object. (Inherited from ITerraExplorerObject81) |
|
|
|
An IPosition81 representing the layer’s position on the terrain. |
|
|
|
Gets and sets a Boolean that determines whether the feature layer is saved in the Fly file. (Inherited from ITerraExplorerObject81) |
|
|
|
An IFeatures81 that provides access to the feature layer’s currently selected features. |
|
|
|
An ITreeItem81 describing the representation of the feature layer in the Project Tree. |
|
|
|
Methods |
|
|
|
Returns a feature based on the feature ID it was assigned by the data source. |
|
|
|
Returns a list of features that intersect with a selection area's geometry having a specified attribute value. |
|
|
|
Returns all the features in a layer that have a specified attribute value. When a combined attribute and spatial query is required, an IGeometry parameter can be defined that filters the returned features by a selection area geometry in addition to the attribute value. This method executes asynchronously, immediately returning an ITerraExplorerAsync81, thereby ensuring that control is promptly handed back to the calling function. |
|
|
|
Returns an IFeatures81 representing all the features that intersect with a selection area geometry according to the specified intersection type and renders all data in the 3D Window. |
|
|
|
Gets an array of text strings assigned to each object global namespace. (Inherited from ITerraExplorerObject81) |
|
|
|
GetParam |
Reserved. Currently not used. (Inherited from ITerraExplorerObject81) |
|
|
|
|
|
|
Saves layer changes to a file with a specified name. |
|
|
|
Sets an array of text strings assigned to each object global namespace. (Inherited from ITerraExplorerObject81) |
|
|
|
SetParam |
Reserved. Currently not used. (Inherited from ITerraExplorerObject81) |
ExecuteGetDataSourceFeatureIdQuery
This method returns a feature based on the feature ID it was assigned by the data source. Since the query is performed on the data source, even a feature that has not yet been streamed can be returned.
|
JavaScript |
|
|
ExecuteGetDataSourceFeatureIdQuery ( FeatureID) |
|
|
C# |
|
|
IFeature81 ExecuteGetDataSourceFeatureIdQuery ( string FeatureID) |
|
|
C++ |
|
|
HRESULT ExecuteGetDataSourceFeatureIdQuery ( BSTR FeatureID, IFeature81** pVal) |
|
Parameters
FeatureID
The ID of the feature requested.
Return Value
pVal
An IFeature81 representing the feature with a specified feature ID.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
ExecuteQuery
This method returns all the features in a layer that match the attribute query. When a combined attribute and spatial query is required, an AreaFilter parameter can be defined that filters the returned features by a selection area geometry in addition to the attribute value.
Note: In Javascript, if you do not want to use an area filter, you can call SGWorld.Creator.GeometryCreator.CreatePolygonGeometry(null) to create a null IGeometry object.
Note: When only a spatial query is required, "ExecuteSpatialQuery" can be called instead. Note that in addition to combining the spatial query with an attribute query, ExecuteQuery also offers the advantages of performing the query without rendering and of splitting the request into chunks (multiple "sub-queries", each on a defined subset of the features). ExecuteSpatialQuery, on the other has the advantage of rendering all the data in the 3D Window. See "ExecuteSpatialQuery" for more information.
|
JavaScript |
|
|
ExecuteQuery( AttributeFilter, NumOfFeatures, FromDataSourceFeatureId, AreaFilter) |
|
|
C# |
|
|
IFeatures81 ExecuteQuery( string AttributeFilter, int NumOfFeatures = -1, string FromDataSourceFeatureId = "", IGeometry AreaFilter) |
|
|
C++ |
|
|
HRESULT ExecuteQuery( |
|
|
BSTR AttributeFilter, long NumOfFeatures, BSTR FromDataSourceFeatureId, IGeometry* AreaFilter, IFeatures81** pITerraExplorerObject) |
|
Parameters
AttributeFilter
Any valid SQL WHERE clause that filters the layer’s features, thereby designating which of the layer’s features should be queried.
NumOfFeatures
The maximum number of features to query.
FromDataSourceFeatureId
The ID of the first feature that should be queried. When splitting a large query into multiple chunks ("sub-queries"),the FromDataSourceFeatureId for each subsequent call to ExecuteQuery should be set equal to the last feature ID of the previous call.
AreaFilter
An IGeometry representing the polygon, multipolygon, or linear ring that designates which part of the layer should be selected (only layer features that are spatially related to the polygon/ multipolygon/ linear ring will be selected).
Note: In Javascript, if you do not want to use an area filter, you can call SGWorld.Creator.GeometryCreator.CreatePolygonGeometry(null) to create a null IGeometry object.
Return Value
pIFeatures
An IFeatures81, containing all the features in the layer that have a specified attribute value. and intersect with the selection area geometry according to the attribute filter and area filter that were set.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
ExecuteQueryAsync
This method returns all the features in a layer that have a specified attribute value. When a combined attribute and spatial query is required, an IGeometry parameter can be defined that filters the returned features by a selection area geometry in addition to the attribute value. When splitting a large query into multiple "sub-queries" using the NumOfFeatures parameter (to prevent excessively long response time), the FromDataSourceFeatureId parameter for each subsequent call to ExecuteQuery should be set equal to the ID of the last feature returned in the previous call.
ExecuteQueryAsync executes asynchronously, immediately returning an ITerraExplorerAsync81 object, thereby ensuring that control is promptly handed back to the calling function. The ITerraExplorerAsync81 object provides a callback-based mechanism similar to the JavaScript promise and the C# Task that offers the following functionality:
§ Upon resolution of the query, passes an IFeatures81, containing all the features returned by the attribute and spatial query, to the OnResolve callback.
§ Allows for handling the various stages of the asynchronous operation, from tracking progress to managing rejection/error, and finally resolving the operation (using OnProgress, OnReject, and OnResolve respectively).
If you want to execute synchronously, use ExecuteQuery instead.
Note: When only a spatial query is required, "ExecuteSpatialQuery" can be called instead. Note that in addition to combining the spatial query with an attribute query, ExecuteQueryAsync also offers the advantage of performing the query without rendering. ExecuteSpatialQuery, on the other has the advantage of rendering all the data in the 3D Window. See "ExecuteSpatialQuery" for more information.
Note: In Javascript, if you do not want to use an area filter, you can call SGWorld.Creator.GeometryCreator.CreatePolygonGeometry(null) to create a null IGeometry object.
|
JavaScript |
|
|
ExecuteQueryAsync( AttributeFilter, NumOfFeatures, FromDataSourceFeatureId, AreaFilter) |
|
|
C# |
|
|
ITerraExplorerAsync81 ExecuteQueryAsync( string AttributeFilter, int NumOfFeatures = -1, string FromDataSourceFeatureId = "", IGeometry AreaFilter = null) |
|
|
C++ |
|
|
HRESULT ExecuteQueryAsync( BSTR AttributeFilter, long NumOfFeatures, BSTR FromDataSourceFeatureId, IGeometry* AreaFilter, ITerraExplorerAsync81** pITerraExplorerObject) |
|
Parameters
AttributeFilter
Any valid SQL WHERE clause that filters the layer’s features, thereby designating which of the layer’s features should be queried.
NumOfFeatures
The maximum number of features to return. This property can have a significant impact on the method’s execution speed.
FromDataSourceFeatureId
The ID of the first feature that should be returned. When splitting a large query into multiple "sub-queries" using the NumOfFeatures parameter (to prevent excessively long response time), the FromDataSourceFeatureId for each subsequent call to ExecuteQuery should be set equal to the ID of the last feature returned in the previous call.
AreaFilter
An IGeometry representing the polygon, multipolygon, or linear ring that designates which part of the layer should be selected (only layer features that are spatially related to the polygon/ multipolygon/ linear ring will be selected).
Note: In Javascript, if you do not want to use an area filter, you can call SGWorld.Creator.GeometryCreator.CreatePolygonGeometry(null) to create a null IGeometry object.
Return Value
pITerraExplorerObject
An ITerraExplorerAsync81 object, which provides a callback-based mechanism similar to the JavaScript promise and the C# Task that offers the following functionality:
· Upon resolution of the query, passes an IFeatures81, containing all the features returned by the attribute and spatial query, to the OnResolve callback.
· Allows for handling the various stages of the asynchronous operation, from tracking progress to managing rejection/error, and finally resolving the operation (using OnProgress, OnReject, and OnResolve respectively).
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
ExecuteSpatialQuery
This method returns all the features that intersect with a selection area geometry according to the specified intersection type and renders all data in the 3D Window. If rendering of the data is not desirable for the spatial query, the ExecuteQuery method can be used instead. Note that in addition to combining the spatial query with an attribute query, ExecuteQuery also offers the advantages of performing the query without rendering and of splitting the request into chunks (multiple "sub-queries", each on a defined subset of the features). ExecuteSpatialQuery, on the other has the advantage of rendering all the data in the 3D Window. See "ExecuteQuery" for more information.
|
JavaScript |
|
|
ExecuteSpatialQuery( pIGeometry, IntersectionType) |
|
|
C# |
|
|
IFeatures81 ExecuteSpatialQuery( IGeometry pIGeometry, IntersectionType IntersectionType = IntersectionType.IT_INTERSECT) |
|
|
C++ |
|
|
HRESULT ExecuteSpatialQuery( IGeometry* pIGeometry, IntersectionType IntersectionType, IFeatures81** pIFeatures) |
|
Parameters
pIGeometry
§ A valid IGeometry derived object.
IntersectionType
An enum that determines the intersection type. The following are the possible values:
· IT_NONE = 0
· IT_INTERSECT = 1
Select all features that geometrically intersect with the selection area.
· IT_WITHIN = 2
Select only features whose entire geometry falls within the selection area drawn.
Return Value
pIFeatures
An IFeatures81, containing all the features that intersect with the selection area geometry according to the IGeometry properties set.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
SaveAs
Saves the layer changes to a file with a specified name. Before saving, the layer can be filtered based on attribute and area filters. For security reasons the file is saved to a predefined "Skyline\TerraExplorer" folder in the "Application Data" space of the current user. The full path of the saved file is provided in the method’s return value. You can also use %APPDATA% in Windows Explorer to locate the path on your computer.
Note: In Javascript, if you do not want to use an area filter, you can call SGWorld.Creator.GeometryCreator.CreatePolygonGeometry(null) to create a null IGeometry object.
Note: If the folder contains a file by the same name, the existing file is overwritten without a prompt.
Note: The Application Data folder path changes between different users and different Windows operating systems. To find the path used by your client look at the %APPDATA% environment variable.
|
JavaScript |
|
|
SaveAs( FileName, AttributeFilter, AreaFilter) |
|
|
C# |
|
|
string SaveAs( string FileName, string AttributeFilter, IGeometry AreaFilter) |
|
|
C++ |
|
|
HRESULT SaveAs ( BSTR FileName, BSTR AttributeFilter, IGeometry* AreaFilter, BSTR* OutFilePath) |
|
Parameters
FileName
The name for the layer file. The layer can be saved as a shapefile (.shp), Excel (.xlsx), GeoPackage, GeoDatabase, PDF or SQLite (.sqlite).
· When saving as a shapefile, the connection string must include the following parameters:
"FileName=NameOfShapeFile.shp;TEPlugName=OGR"
· When saving as an Excel file, the connection string must include the following parameters:
"FileName=NameOfExcelFile.xlsx;TEPlugName=OGR"
Note: Only point layers can be saved to Microsoft Excel.
· When saving as an SQLite file, the connection string must include the following parameters:
"FileName=NameofFile;TEPlugName=OGR;LayerName=newlayername"
· When saving as a GeoPackage, the connection string must include the following parameters:
"FileName=NameOfGeoPackageFile.gpkg;TEPlugName=OGR;LayerName=newlayername"
· When saving as a GeoDatabase, the connection string must include the following parameters:
"FileName=NameOfGeoDatabaseFile.gdb;TEPlugName=OGR;LayerName=newlayername"
· When saving as a Geospatial PDF, the connection string must include the following parameters:
"FileName=NameOfGeospatialPDFFile.pdf;TEPlugName=OGR;LayerName=newlayername"
Note: A file name with a full path cannot be used here.
AttributeFilter
Any valid SQL WHERE clause that filters the layer’s features, thereby designating which of the layer’s features should be saved. If this parameter is set to "Selected Features", all currently selected features are saved.
AreaFilter
An IGeometry representing the polygon or multipolygon that designates which part of the layer should be saved (only layer features that are spatially related to the polygon/ multipolygon will be saved).
Note: In Javascript, if you do not want to use an area filter, you can call SGWorld.Creator.GeometryCreator.CreatePolygonGeometry(null) to create a null IGeometry object.
Return Value
OutFilePath
A full path of the layer file being created.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.