Showing posts with label large table. Show all posts
Showing posts with label large table. Show all posts

Friday, June 10, 2011

Unique IDentification

I don't know how I missed this, but the Global ID (GUID) field in ArcGIS gives you a hands free way to add unique ids to features. The Add Global IDs tool will create the field and populate it with the ID. The GlobalID will stick with the features as you edit or join or export or clip or whatever. This will allow you to trace back and maintain relationships.

I will start using this in everything. No more staring at the attribute table to see what I can combine to make a Unique ID.

Wednesday, May 11, 2011

Breaking up large files

I have been running into tables that are too big for Excel and needed an easy way to break them into smaller chunks. Unix to the rescue on that. If you have a Unix box like Ubuntu or emulator like Cygwin all you need to do is run the command line code split option filename prefix. Split has two options -l (by line number) or -b (size in bytes, I think).

So I had the giant table in a csv, I ran "split -l 500000 d:\folder\folder\bigfile.csv smallerfile" and my big csv was broken up into 500k line csvs. From there I just opened them in a text editor and copied the header line into each new file.