<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Reading shapefile with C# EasyGIS in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/reading-shapefile-with-c-easygis/m-p/1003948#M5683</link>
    <description>&lt;PRE&gt;shapeFile.RenderSettings.FieldIndex is -1.&lt;BR /&gt;What could be the reason for that?&lt;/PRE&gt;</description>
    <pubDate>Mon, 23 Nov 2020 13:54:14 GMT</pubDate>
    <dc:creator>MattiasWesterberg</dc:creator>
    <dc:date>2020-11-23T13:54:14Z</dc:date>
    <item>
      <title>Reading shapefile with C# EasyGIS</title>
      <link>https://community.esri.com/t5/developers-questions/reading-shapefile-with-c-easygis/m-p/1003904#M5681</link>
      <description>&lt;P&gt;I am trying to read a shapefile using EasyGIS with C#.&lt;/P&gt;&lt;P&gt;My code seems to work except for the last row were i call the GetRecord method.&lt;/P&gt;&lt;P&gt;The exception i get is:&lt;/P&gt;&lt;P&gt;System.ArgumentException: 'fieldIndex must be &amp;lt;= DBFRecordHeader.NumFields and &amp;gt;=0'&lt;/P&gt;&lt;P&gt;What am i doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;string path = System.IO.Directory.GetCurrentDirectory();
EGIS.ShapeFileLib.ShapeFile shapeFile = new EGIS.ShapeFileLib.ShapeFile();
shapeFile.LoadFromFile(path + "\\CD_VIC_06_imr.shp");
string[] record = shapeFile.GetRecords(shapeFile.RenderSettings.FieldIndex);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 09:56:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/reading-shapefile-with-c-easygis/m-p/1003904#M5681</guid>
      <dc:creator>MattiasWesterberg</dc:creator>
      <dc:date>2020-11-23T09:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reading shapefile with C# EasyGIS</title>
      <link>https://community.esri.com/t5/developers-questions/reading-shapefile-with-c-easygis/m-p/1003905#M5682</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/220451"&gt;@MattiasWesterberg&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would debug and verify through the breakpoints if the shapefile was able to read and load through the path.&lt;/P&gt;&lt;P&gt;Also, while in debug mode you might check if the&lt;/P&gt;&lt;PRE&gt;shapeFile.RenderSettings.FieldIndex&lt;/PRE&gt;&lt;P&gt;returns the desired value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Manish&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 10:05:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/reading-shapefile-with-c-easygis/m-p/1003905#M5682</guid>
      <dc:creator>ManishPatel</dc:creator>
      <dc:date>2020-11-23T10:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Reading shapefile with C# EasyGIS</title>
      <link>https://community.esri.com/t5/developers-questions/reading-shapefile-with-c-easygis/m-p/1003948#M5683</link>
      <description>&lt;PRE&gt;shapeFile.RenderSettings.FieldIndex is -1.&lt;BR /&gt;What could be the reason for that?&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Nov 2020 13:54:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/reading-shapefile-with-c-easygis/m-p/1003948#M5683</guid>
      <dc:creator>MattiasWesterberg</dc:creator>
      <dc:date>2020-11-23T13:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Reading shapefile with C# EasyGIS</title>
      <link>https://community.esri.com/t5/developers-questions/reading-shapefile-with-c-easygis/m-p/1003949#M5684</link>
      <description>&lt;P&gt;shapeFile.RenderSettings.FieldIndex is -1.&lt;BR /&gt;What could be the reason for that?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 13:54:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/reading-shapefile-with-c-easygis/m-p/1003949#M5684</guid>
      <dc:creator>MattiasWesterberg</dc:creator>
      <dc:date>2020-11-23T13:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Reading shapefile with C# EasyGIS</title>
      <link>https://community.esri.com/t5/developers-questions/reading-shapefile-with-c-easygis/m-p/1004162#M5685</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/220451"&gt;@MattiasWesterberg&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If no FieldName is set or FieldName is not in the DBF file Field index returns -1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When you debug does the shapeFile contain any values, if not then you might want to check the path for the shapefile. You can try to to hard code the path to the shapefile and try if it is able to read that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Manish&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 22:52:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/reading-shapefile-with-c-easygis/m-p/1004162#M5685</guid>
      <dc:creator>ManishPatel</dc:creator>
      <dc:date>2020-11-23T22:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Reading shapefile with C# EasyGIS</title>
      <link>https://community.esri.com/t5/developers-questions/reading-shapefile-with-c-easygis/m-p/1005009#M5690</link>
      <description>&lt;P&gt;How do i get the long and lat values?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 12:42:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/reading-shapefile-with-c-easygis/m-p/1005009#M5690</guid>
      <dc:creator>MattiasWesterberg</dc:creator>
      <dc:date>2020-11-26T12:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Reading shapefile with C# EasyGIS</title>
      <link>https://community.esri.com/t5/developers-questions/reading-shapefile-with-c-easygis/m-p/1005010#M5691</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Do you know how i can get the coordinates?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 12:44:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/reading-shapefile-with-c-easygis/m-p/1005010#M5691</guid>
      <dc:creator>MattiasWesterberg</dc:creator>
      <dc:date>2020-11-26T12:44:26Z</dc:date>
    </item>
  </channel>
</rss>

