views:

63

answers:

1

My question is the following: How can I grab 'blocks' in a city for use in a game? (And then display them shaded in a certain color?)

My general idea is to use real blocks of your city in a game, that you can own/sell.

I want to display the areas you own as polygon overlays in google maps.

Are google maps the way forward, or are other APIs like OpenStreetMap, etc, more useful for this?

Any pointers would be appreciated, like general algorithms of what data to grab and how to construct 'blocks' out of it, or API calls that could return a block/house level polygon for me.

+1  A: 

Sounds hard, mostly because you'll have a hard time consistently defining what a block is -- one side of one street, or the rectangle enclosed by four streets? What if it's not a rectangle? Etc.

OpenStreetMap data is probably your best bet, because you can actually download the data -- via OSM Export or Cloudmade extract by region.

You might consider another approach (i.e. letting users define their own polygons) or letting users own streets (which would be easier to do with OSM data).

There are also commercially available parcel datasets which will give you a property-level view of a city. These can be very expensive.

tcarobruce
thanks, that is a pretty useful idea. Owning streets and even splitting them into segments by house numbers is probably much easier than defining blocks. (I think that owning a whole street could reduce the available parts of a city too much to be fun.) The main advantage of owning blocks is that I could nicely shade the city for areas that belong to you / other players.If you or anyone else has a block-wise partitioning idea, that would be cool, though!
rdrey