Talk:Land usage

From Geohashing
Revision as of 16:27, 27 August 2009 by imported>Srs0 (Requests for scans)

That's nice. Neat idea. I like the "rather close to a road" interpretation.

Requests for scans

Can I make a request for Land Usage scans of a couple of graticules? I'd like someone to run Cape May, New Jersey again, and Fort Fisher, North Carolina would be much appreciated as well. "kthxbai" -- Jevanyn 18:39, 4 February 2009 (UTC)

Ooh, yes please, me too, if someone enjoyes running these things. I'd love to see Vancouver, British Columbia, Surrey, British Columbia, Victoria, British Columbia and Fort Nelson, British Columbia get this treatment. -Robyn 18:10, 17 June 2009 (UTC)
+1 for Victoria, British Columbia. --Wenslayer 20:23, 17 June 2009 (UTC)
I did all of the above requests just now. Obviously way later than asked for, but I just discovered the page. -Srs0 14:17, 27 August 2009 (UTC)
I just ran the script. You may wish to change some of the descriptions, as some would be "Mountains and Fields". I figured it was the numbers that people were requesting, and that they could change the names as necessary. -Srs0 16:13, 27 August 2009 (UTC)
After looking into it more, I don't know how accurate this script is for North America. With Vancouver as the example, the city is being registered as field, since the colour google maps is using for the field (and mountains) is the same as they're using inside the city. It's unfortunate, but I don't think that can really be fixed. Unless anyone has suggestions. Too bad... It definitely worked for Würzburg though, so it does work in at least Germany!

Script note

I had to make a small change when running the script on my computer to account for the opacity (alpha values). Yes, they were all 255, but the following line resulted in a problem because it was trying to access a 4-tuple instead of a 3-tuple:

counts[colors[pixel]] = colors[pixel] in counts and counts[colors[pixel]]+count or count

My simple hack, since I only have a small amount of experience in Python and don't know the simple way to do this, was the following (a terrible hack, but it works):

pixelConcat=(pixel[0],pixel[1],pixel[2])
counts[colors[pixelConcat]] = colors[pixelConcat] in counts and counts[colors[pixelConcat]]+count or count

I'm certain that there's a better way to concatenate a tuple, but I don't know it (at least yet). Any input from people used to Python would be appreciated. If it matters, I'm using Python 2.5.2 and using the PNG format for my pictures.

Also interesting to note is that I got slightly different values for the Berlin graticule (which I tested against since Relet did that one first). I'm guessing it has to do with different magnifications, but I can't say for sure. The values I got were:

37.38%	Fields
32.36%	Forests
9.81%	Natural reserves
8.22%	Roads
6.98%	Settlements
3.45%	Highways
1.81%	Water
0.00%	Industrial

Well, that's all for now. Insight would be wonderful!-Srs0 16:12, 27 August 2009 (UTC)