Line featureclass to network dataset

517
3
05-14-2014 12:35 PM
InsuHong1
New Contributor
Hello,

I have questions regarding to network analysis.

I'm using C# .Net.

What I gonna to do is

1) Produce line featureclass from some prior steps

2) Convert line featureclass to network dataset

3) Generate OD matrix


Step 1 is done. But I don't know how to copy a featureclass to featuredataset, which is required for network dataset.

I searched web, but there are only 'suggestions' like about using IDataset.adddata without any sample code.


Also, I tried to designate feature dataset as an output location of geogprocessing, but failed. If there is a way to designate feature dataset as output location of geogprocessing, it will be also fine. For example, code on the bellow is convert layer (polygon featureclass) to line featureclass. Is there any way to make output on the featuredataset at the same workspace?? I tried but failed.

fc2Line.in_features = layer;
fc2Line.out_feature_class = "grid_Line";
gp.Execute(fc2Line, null);


Thank you.
0 Kudos
3 Replies
DuncanHornby
MVP Notable Contributor
Have a look at this page and follow the links on it.
0 Kudos
InsuHong1
New Contributor
Thank you, but I think I should have made more clear point on my question.

What I need is how to put existing feature class into existing feature dataset, not 'create' new ones.



Thank you
0 Kudos
DuncanHornby
MVP Notable Contributor
I gues you could call the FeatureClass to FeatureClass tool to copy the dataset into the FeatureDataset? This page has a section called Converting and transferring data.
0 Kudos