Select to view content in your preferred language

Does the Shape* column have to be added into the attribute table when using ArcGis Pro?

444
6
08-01-2024 01:01 PM
DannyMunoz
Emerging Contributor

Hello esri community, 

I am trying to understand the how the attribute table suppose to know what type of shape it has to be when importing data created (csv file). I know the sentence I stated may not make sense but what I trying to get at is, I'm currently trying to import a csv file that contains data of open spaces within a specific city. What data should I include for ArcGis Pro to know that "oh that a polygon" and create a polygon around the designated space. Is that something that has to be done via ArcGis Pro or can a column be inserted to indicate the type of shape. 

I'm still new to it, and I do apologize if I made it sound harder than is seems. 

 

Thanks

6 Replies
DanPatterson
MVP Esteemed Contributor

what data are in your csv?

show a row or two with the field names

If there are coordinates in there, what is the form?

And finally, the shape field is added to a featureclass in a file geodatabase or a shapefile.  If the shape field is in your table and no other visible coordinates, then you won't be able to "map" your data, especially if it is supposed to be a polygon


... sort of retired...
0 Kudos
DannyMunoz
Emerging Contributor

DannyMunoz_0-1722633760130.png

*The image doesn't consist of latitude and longitude coordinates, I am working on it currently.

 

I do appreciate the help, the image here is what my csv file consists of. I've been playing around with the feature classes within ArcGis Pro but I've notice that when using latitude and longitude coordinates your only able to create a point and not a polygon. I just wanted to know if there is something that I can insert into my csv to make ArcGis Pro read the csv file and say "oh that's a polygon that goes here". I know that you can create polygons using various x y coordinates but that would be far too much work for the amount of data that I'm working with. 

0 Kudos
clt_cabq
Frequent Contributor

Typically data in .csv format have pairs of coordinates (X, Y, Lat/Long, Northing, Easting, etc depending on the coordinate system you are using.) and typically represent points. There may be a way you can create a polygon from a CSV but I suspect it will take some coding with python to accomplish. There maybe other approaches depending on the structure of your data but usually you can only create points from the CSV.

If you have a polygon represented as multiple points in your CSV and there is a unique identifier then you could conceivably use the xy table to point tool to create a set of points, then the point to line geoprocessing tool, and then from there the feature to polygon tool. This is several steps and will almost certainly throw some errors along the way that you'll have to fix manually. 

0 Kudos
DannyMunoz
Emerging Contributor

I appreciate the help @clt_cabq 🙂


0 Kudos
DavidSolari
Frequent Contributor

The "Shape" field in spatial data is a wrapper around however the format stores the geometry data. This could be some sort of text or binary data field in the table, or a separate table that's joined to the attribute data in real time. Either way, ArcGIS has to recognize the data format as something that stores features, if it thinks it's just a standard table then it'll just show the raw field data at best.


In short, if you have your data in a CSV file or something like that you'll need to convert it to a spatial dataset of some sort -- usually a feature class in a file geodatabase. For point data the XY Table to Point tool should be good enough. For more complex geometries you'll have to figure out how each record stores the data and either dig up an appropriate conversion tool or write your own using arcpy. Once the data is copied to a feature class it can take advantage of all the ArcGIS tools and workflows

0 Kudos
DannyMunoz
Emerging Contributor

The help is much appreciated @DavidSolari 🙂

0 Kudos