Question: Write a script that converts a CSV file to polygons. You are given a CSV file called parcel _ points.csv with coordinates. The file looks

Write a script that converts a CSV file to polygons.
You are given a CSV file called parcel_points.csv with coordinates. The file looks as follows:
The PARCELID field indicates the parcel of interest, while the POINT_X and POINT_Y fields represent the
coordinates of the vertices of each parcel. Logically, the PARCELID repeats since each parcel is made up of
multiple vertices. The coordinate system for the data is NAD 1983 UTM Zone 10N.
Notice that the first and last vertex for each parcel are identical, i.e. the points are coincident. There is no need to
remove one of these coincident points when creating a polygon for each parcel.
Your script needs to accomplish the following:
Read the CSV file.
Create a new polygon shapefile or geodatabase feature class.
Add a text field called PARCEL with a meaningful length where the PARCELID values are stored.
Create one polygon for each unique parcel and write the value of PARCELID to the PARCEL field
Delete any unnecessary field, if applicable
Notes:
you are required to use cursor objects for this script to create the polygons and add the attribute values
no intermediate data should be written to disk the only output should be a single polygon feature class
creating the new (empty) feature class should be part of the script

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!