ArcGIS engine retrieves feature sets, feature classes, and features

Source: Internet
Author: User

retrieving feature sets, feature classes, and features from source ArcGIS engine

[CSharp]View Plaincopy print?
  1. // <summary>
  2. /// Get all feature sets
  3. // </summary>
  4. /// <param name= "Workspace" > Workspace objects </param>
  5. /// <returns> feature set list </returns>
  6. public static list<ifeaturedataset> getallfeatureclass (Iworkspace workspace)
  7. {
  8. Ienumdataset DataSet = Workspace.get_datasets (Esridatasettype.esridtfeaturedataset);
  9. Ifeaturedataset Featuredataset = DataSet.  Next () as ifeaturedataset;
  10. list<ifeaturedataset> featuredatasetlist = new list<ifeaturedataset> ();
  11. While (featuredataset! = null)
  12. {
  13. Featuredatasetlist.add (Featuredataset);
  14. Featuredataset = DataSet.  Next () as ifeaturedataset;
  15. }
  16. return featuredatasetlist;
  17. }
[CSharp]View Plaincopy print?
  1. <summary>
  2. Get all feature classes
  3. </summary>
  4. <param name= "Featuredataset" > Feature set </param>
  5. <returns> Feature Class list </returns>
  6. Public static list<ifeatureclass> Getallfeatureclass (Ifeaturedataset featuredataset)
  7. {
  8. Ifeatureclasscontainer Featureclasscontainer = (ifeatureclasscontainer) featuredataset;
  9. Ienumfeatureclass enumfeatureclass = featureclasscontainer.classes;
  10. Ifeatureclass Featureclass = Enumfeatureclass.next ();
  11. list<ifeatureclass> featureclasslist = new list<ifeatureclass> ();
  12. While (featureclass! = null)
  13. {
  14. Featureclasslist.add (Featureclass);
  15. Featureclass = Enumfeatureclass.next ();
  16. }
  17. return featureclasslist;
  18. }
[CSharp]View Plaincopy print?
  1. <summary>
  2. Get all Features
  3. </summary>
  4. <param name= "Featureclass" > Feature class </param>
  5. <returns> Feature List </returns>
  6. Public static list<ifeature> Getallfeatureclass (Ifeatureclass featureclass)
  7. {
  8. list<ifeature> featurelist = new list<ifeature> ();
  9. Ifeaturecursor featurecursor = Featureclass.search (null, false);
  10. IFeature feature = Featurecursor.nextfeature ();
  11. While (feature! = null)
  12. {
  13. Featurelist.add (feature);
  14. Feature = Featurecursor.nextfeature ();
  15. }
  16. return featurelist;
  17. }

ArcGIS engine retrieves feature sets, feature classes, and features

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.