Sunday, February 22, 2015

Print Field Names of Shapefile Feature Class Esri ArcObjects Snippets - Series

Esri ArcObjects Snippets - Series

Print Field Names of Shapefile, Feature Class

 // printDistinctFieldAliasNames work with shape file  
 static void printDistinctFieldAliasNames(IFeatureClass featureClass)  
           throws Exception {  
      // get the Fields collection from the feature class  
      IFields fields = featureClass.getFields();  
      IField field;  
      // on a zero based index iterate through the fields in the collection  
      for (int i = 0; i < fields.getFieldCount(); i++) {  
           // get the field at the given index  
           field = fields.getField(i);  
           System.out.println("field.getName() = " + field.getName());  
           if (!field.getName().equals(field.getAliasName())) {  
                System.out  
                          .println(field.getName() + ":" + field.getAliasName());  
           }  
      }  
      IFeatureCursor featureCursor = featureClass.search(null, true);  
      IFields fields1 = featureCursor.getFields();  
      System.out.println("fields1 = " + fields1);  
      int fieldCount = fields1.getFieldCount();  
      System.out.println("fieldCount = " + fieldCount);  
      for (int i = 0; i < fieldCount; i++) {  
           IField fieldI = fields1.getField(i);  
           String fieldName = fieldI.getName();  
           System.out.print(fieldName + "\t");  
      }  
      System.out.println();  
 }  



This code has been made using ESRI Resources and other Help Content and is provided here just for educational purpose.

7 comments:

  1. magnificentincense.com
    24K Monkey Classic Incense 10g
    AK-47 – X10 / PREMIUM
    Bizarro Incense
    Buy Black Mamba Incense Online
    Buy WTF Herbal Incense
    Cloud9 Mad Hatter Incense
    Crazy Monkey Incense
    k2 spray on paper
    k2 paper sheets
    Klimax Potpourri 15xxx Coconut(10g)
    Crazy Monkey Incense
    Cloud9 Mad Hatter Incense
    Buy Purple Diesel Incense Online
    Buy Pure Fire Herbal Incense Online
    Buy Kisha Cole Incense (11g) online
    Buy KUSH HERBAL INCENSE online
    Buy Mind Trip Incense Online
    Buy Platinum XXX Herbal Incense online
    buy Orange Platinum Caution 10G
    Buy OMG HERBAL POTPOURRI 10G online

    ReplyDelete
  2. https://k2incenseonlineheadshop.com/
    k2incenseonlineheadshop
    info@k2incenseonlineheadshop.com
    Buy liquid incense cheap
    Buy liquid incense cheap For Sale At The Best Incense Online Shop
    K2 Spice Spray | Liquid K2 | Liquid Spice | K2 Spray for sale
    https://k2herbalblendshop.com/

    ReplyDelete
  3. https://bestmjstrainsonline.com/

    Buy Liquid Incense Cheap
    Buy K2 E-Liquid online
    Cheap Herbal incense

    Buy K2 Infused paper spray online, order K2 Spray online +1 (925) 526-5453

    https://bestmjstrainsonline.com/product/5-co2-cannabis-oil-cartridges/



    ReplyDelete



  4. marijuana has been a stepping stone to the medical condition of most patients.
    many people https://credibleweeddelivery.com/product/super-lemon-haze/ suffering from cancer, chronic pain, anxiety, and many more have overcome their aillment with cannabis.
    you can order weed from our store.medical condition

    ReplyDelete