Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Creating Point Feature Class from Fields in Table

$
0
0
Hi everyone one,

I wrote a script that searches Tweets and writes them to a table in a geodatabase. I got this to work finally, and now I would like to map out the tweets that have a location attached to them.

As you can see in the following screenshot, I have a latitude and longitude field already:

Attachment 29125

What would be the best approach to use these two fields and create a point feature class? I initially was thinking about Add XY, but I do not think that works with my data. I stumbled upon tokens (SHAPE@XY, for instance), and I was wondering if that might be what I need to implement.

Here is my current cursor in case that helps:

Code:

cursor = arcpy.da.InsertCursor("E:/Redlands/MIP/Files/Twitter.gdb/TweetTable4", ("DateRun", "Username", "GeoEnabled", "Coordinates", "Latitude", "Longitude", "PostTime", "Tweet"))
Any advice is appreciated. Thank you!
Attached Thumbnails
Click image for larger version

Name:	TweetTable.png‎
Views:	N/A
Size:	3.5 KB
ID:	29125  

Viewing all articles
Browse latest Browse all 2485

Trending Articles