My ID fix was dependent on the assumption that you would never show more than one state's worth of counties per map. Which would mean that you could always do hex(fid - minFid), since you're probably not going to show more than 256 counties per map.
However, if you're looking for a solution that will generically support any fid, this is what I would do: you can convert the fid number to base 26, using only letters, and simply insert a hyphen after the second letter. You'll have to cut out the state name, but it should work for all your counties with minimal conflicts. On Tuesday, July 9, 2013, Bluestreak2k5 wrote: > Thanks Sergey! > > you didn't have to fix it, but thanks! I had actually already noticed I > was missing the " around each coordinate and had written a regex function > to add those to the file. > > I wrote a scraper that just scrapes the KML file and outputs to me the > corrected data, so these changes shouldn't take long. I was really just not > sure how to test it but now with your example I can test it when my parser > is done with each file. > > Your fix for the ID won't be able to last long term though, FIPS numbers > go into the 6000's: > > https://www.google.com/fusiontables/DataSource?docid=1KF4g1O0zxPwQBisz1tVHfd1dXvNiVB_OKxUiMw > > According to http://gallery.usgs.gov/audios/124 there are more then 3000 > counties in the US, so even converting to base 36 wouldn't solve the > problem. We would need 3 digits minimum to use Base 16 giving 4096 possible > combinations. > > But one problem at a time, first to fix the data! > > > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to > [email protected]<javascript:_e({}, > 'cvml', > 'google-visualization-api%[email protected]');>. > To post to this group, send email to > [email protected] <javascript:_e({}, 'cvml', > '[email protected]');>. > Visit this group at > http://groups.google.com/group/google-visualization-api. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- - Sergey -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/groups/opt_out.
