<?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: Import CSV data and convert to polygon shapefile in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/import-csv-data-and-convert-to-polygon-shapefile/m-p/234949#M13337</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the suggestions.&amp;nbsp; I am not a Python and find it easier to use the built-in windows-driven tools. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use the "Points to Line" feature, what do I specify for "Line field" "Sort field" and "Close line" boxes?&amp;nbsp; If I enter nothing, I then receive the error message when I try to draw the line layer/shapefile stating&amp;nbsp; "a lock cannot be acquired".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I missing here?&amp;nbsp; Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Sep 2015 17:28:16 GMT</pubDate>
    <dc:creator>OmarMcDoom</dc:creator>
    <dc:date>2015-09-29T17:28:16Z</dc:date>
    <item>
      <title>Import CSV data and convert to polygon shapefile</title>
      <link>https://community.esri.com/t5/data-management-questions/import-csv-data-and-convert-to-polygon-shapefile/m-p/234944#M13332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have GIS data in csv file format that describes polygons (administrative districts).&amp;nbsp; There are four values: 1. Longitude 2. Latitude 3. Unique identifier 4. Text name of the administrative districts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A polygon then is described in the following manner: Note the first vertex point is repeated at the end to indicate the extent of the polygon before a new polygon is described.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 260px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="15" width="65"&gt;Description&lt;/TD&gt;&lt;TD width="65"&gt;ID&lt;/TD&gt;&lt;TD width="65"&gt;Longitude&lt;/TD&gt;&lt;TD width="65"&gt;Latitude&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="15"&gt;Adams (Pob.)&lt;/TD&gt;&lt;TD align="right"&gt;12801001&lt;/TD&gt;&lt;TD align="right"&gt;120.8646&lt;/TD&gt;&lt;TD align="right"&gt;18.4333&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="15"&gt;Adams (Pob.)&lt;/TD&gt;&lt;TD align="right"&gt;12801001&lt;/TD&gt;&lt;TD align="right"&gt;120.8665&lt;/TD&gt;&lt;TD align="right"&gt;18.4391&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="15"&gt;Adams (Pob.)&lt;/TD&gt;&lt;TD align="right"&gt;12801001&lt;/TD&gt;&lt;TD align="right"&gt;120.8677&lt;/TD&gt;&lt;TD align="right"&gt;18.4424&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="15"&gt;Adams (Pob.)&lt;/TD&gt;&lt;TD align="right"&gt;12801001&lt;/TD&gt;&lt;TD align="right"&gt;120.8685&lt;/TD&gt;&lt;TD align="right"&gt;18.449301&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="15"&gt;Adams (Pob.)&lt;/TD&gt;&lt;TD align="right"&gt;12801001&lt;/TD&gt;&lt;TD align="right"&gt;120.8691&lt;/TD&gt;&lt;TD align="right"&gt;18.4515&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="15"&gt;Adams (Pob.)&lt;/TD&gt;&lt;TD align="right"&gt;12801001&lt;/TD&gt;&lt;TD align="right"&gt;120.8708&lt;/TD&gt;&lt;TD align="right"&gt;18.4554&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="15"&gt;Adams (Pob.)&lt;/TD&gt;&lt;TD align="right"&gt;12801001&lt;/TD&gt;&lt;TD align="right"&gt;120.872&lt;/TD&gt;&lt;TD align="right"&gt;18.459&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="15"&gt;Adams (Pob.)&lt;/TD&gt;&lt;TD align="right"&gt;12801001&lt;/TD&gt;&lt;TD align="right"&gt;120.8735&lt;/TD&gt;&lt;TD align="right"&gt;18.462999&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="15"&gt;Adams (Pob.)&lt;/TD&gt;&lt;TD align="right"&gt;12801001&lt;/TD&gt;&lt;TD align="right"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;120.8646&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;18.4333&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone tell me, if it is possible, how to import these data into ArcGIS and create a polygon shape file?&amp;nbsp; My ultimate objective is to calculate the area of district.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 15:48:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/import-csv-data-and-convert-to-polygon-shapefile/m-p/234944#M13332</guid>
      <dc:creator>OmarMcDoom</dc:creator>
      <dc:date>2015-09-29T15:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Import CSV data and convert to polygon shapefile</title>
      <link>https://community.esri.com/t5/data-management-questions/import-csv-data-and-convert-to-polygon-shapefile/m-p/234945#M13333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmmm, shapefiles, CSV - I bet &lt;A href="https://community.esri.com/migrated-users/3116"&gt;Dan Patterson&lt;/A&gt; has a solution.&amp;nbsp; One caveat - it may involve Python &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris Donohue, GISP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 15:55:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/import-csv-data-and-convert-to-polygon-shapefile/m-p/234945#M13333</guid>
      <dc:creator>ChrisDonohue__GISP</dc:creator>
      <dc:date>2015-09-29T15:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Import CSV data and convert to polygon shapefile</title>
      <link>https://community.esri.com/t5/data-management-questions/import-csv-data-and-convert-to-polygon-shapefile/m-p/234946#M13334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Omar Mcdoom I think the answer to your question can be found here: &lt;A href="https://community.esri.com/thread/45079"&gt;Format for CSV to import as polygons (rectangles)?&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 16:21:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/import-csv-data-and-convert-to-polygon-shapefile/m-p/234946#M13334</guid>
      <dc:creator>ZackaryKing</dc:creator>
      <dc:date>2015-09-29T16:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Import CSV data and convert to polygon shapefile</title>
      <link>https://community.esri.com/t5/data-management-questions/import-csv-data-and-convert-to-polygon-shapefile/m-p/234947#M13335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This ESRI article suggests several methods:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/43993" title="http://support.esri.com/en/knowledgebase/techarticles/detail/43993"&gt;43993 - Convert a point feature class to a polygon feature class&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that some of the processes require higher level licenses and one solution requires a third-party software (ET Geowizards).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris Donohue, GISP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 16:27:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/import-csv-data-and-convert-to-polygon-shapefile/m-p/234947#M13335</guid>
      <dc:creator>ChrisDonohue__GISP</dc:creator>
      <dc:date>2015-09-29T16:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Import CSV data and convert to polygon shapefile</title>
      <link>https://community.esri.com/t5/data-management-questions/import-csv-data-and-convert-to-polygon-shapefile/m-p/234948#M13336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a starting point using Python. This only reads your csv and outputs a polygon for all the points. It gets a little more complicated to create separate polygons for each ID, to write out all the attributes, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import csv # import csv library
... polys = [] # list to hold polygon geometry
... with open(r'C:\junk\pointcsv.csv', 'rb') as csvFile: # open csv file
...&amp;nbsp;&amp;nbsp;&amp;nbsp; csvFile.readline() # skip header
...&amp;nbsp;&amp;nbsp;&amp;nbsp; csvReader = csv.reader(csvFile) # create csv reader
...&amp;nbsp;&amp;nbsp;&amp;nbsp; polyPoints = arcpy.Array() # array to hold points
...&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in csvReader: # read csv
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyPoints.append(arcpy.Point(row[2],row[3])) # create point and add to array
...&amp;nbsp;&amp;nbsp;&amp;nbsp; polys.append(arcpy.Polygon(polyPoints,arcpy.SpatialReference(4326))) # create polygon and add to list
... arcpy.CopyFeatures_management(polys, r'in_memory\polys') # write out polygons&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless you're committed to learning Python, your best bet is probably to add your csv as points, convert to line, then convert to polygon.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 11:51:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/import-csv-data-and-convert-to-polygon-shapefile/m-p/234948#M13336</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T11:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Import CSV data and convert to polygon shapefile</title>
      <link>https://community.esri.com/t5/data-management-questions/import-csv-data-and-convert-to-polygon-shapefile/m-p/234949#M13337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the suggestions.&amp;nbsp; I am not a Python and find it easier to use the built-in windows-driven tools. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use the "Points to Line" feature, what do I specify for "Line field" "Sort field" and "Close line" boxes?&amp;nbsp; If I enter nothing, I then receive the error message when I try to draw the line layer/shapefile stating&amp;nbsp; "a lock cannot be acquired".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I missing here?&amp;nbsp; Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 17:28:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/import-csv-data-and-convert-to-polygon-shapefile/m-p/234949#M13337</guid>
      <dc:creator>OmarMcDoom</dc:creator>
      <dc:date>2015-09-29T17:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Import CSV data and convert to polygon shapefile</title>
      <link>https://community.esri.com/t5/data-management-questions/import-csv-data-and-convert-to-polygon-shapefile/m-p/234950#M13338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Line field is the field controlling the line IDs (tells the tool when to end the current line and move to the next line), Sort field sorts the records from first to last (if they aren't in the correct order already) and Close line forces the lines closed (if they aren't already).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 17:31:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/import-csv-data-and-convert-to-polygon-shapefile/m-p/234950#M13338</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-09-29T17:31:10Z</dc:date>
    </item>
  </channel>
</rss>

