NetWork Dataset (INetworkDataset)

Source: Internet
Author: User

Obtain a network dataset from geodatabase feature dataset (fds)

Obtain a network dataset from shapefile workspace (de> shpWSde>)

1 IFeatureDatasetExtensionContainer fdsExtCont = fds as IFeatureDatasetExtensionContainer; 2 IFeatureDatasetExtension fdsExt = fdsExtCont.FindExtension(esriDTNetworkDataset); 3 IDatasetContainer2 dsCont = fdsExt as IDatasetContainer2;                    4 IDataset dataset = dsCont.DatasetByName(esriDTNetworkDataset, "Street_ND" ); 5 INetworkDataset networkDataset = dataset as INetworkDataset;

 

 

 

 

IWorkspaceExtensionManager wsExtMgr = shpWS as IWorkspaceExtensionManager;
UID myUID = new UIDClass ();
MyUID. Value = "esriGeoDatabase. NetworkDatasetWorkspaceExtension ";
IWorkspaceExtension wsExt = wsExtMgr. FindExtension (myUID );
IDatasetContainer2 dsCont = wsExt as IDatasetContainer2;
IDataset dataset = dsCont. DatasetByName (esriDTNetworkDataset, "Street_ND ");
INetworkDataset networkDataset = dataset as INetworkDataset;

Obtain a network dataset from SDC workspace (de> sdcWSde>)

IWorkspaceExtensionManager wsExtMgr = sdcWS as IWorkspaceExtensionManager; UID myUID = new UIDClass ();
MyUID. Value = "esriGeoDatabase. NetworkDatasetWorkspaceExtension ";
IWorkspaceExtension wsExt = wsExtMgr. FindExtension (myUID );
IDatasetContainer2 dsCont = wsExt as IDatasetContainer2;
IDataset dataset = dsCont. DatasetByName (esriDTNetworkDataset, "Street_ND ");
INetworkDataset networkDataset = dataset as INetworkDataset;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.