> -----Original Message----- > From: [email protected] [mailto:newbies- > [email protected]] On Behalf Of Simone Cortesi > Sent: 16 December 2010 11:49 > To: [email protected] > Subject: Re: [OSM-newbies] Project of the Week/Month, and results > > On Thu, Dec 16, 2010 at 10:07, Gregory Williams > <[email protected]> wrote: > > > > A great suggestion. I'm looking forward to seeing the results of this > on a > > cycle parking heat map that I maintain: > > > > http://www.spokeseastkent.org.uk/maps/cycle-parking-heat-map/ > > > > Remember to include the capacity=# tag for the most noticeable > effect. > > Gregory, > can you share with us some code behind your heat map system? > > Thankyou!
There's now some source code (C#) available at: http://www.spokeseastkent.org.uk/maps/cycle-parking-heat-map/OsmCycleHeatMap Source.zip It's still a tad messy and I'm also aware that it's not as efficient as it could be. You'll want to run the compiled code in one of a few ways: Process all the data that's in the Postgres database: heatmap --fullplanet Import data using replication sets, starting at 123456: heatmap --followreplication 123456 Import data using replication sets from where the code last got to (This currently assumes that the state has been saved to the registry): heatmap --followreplication The code gets its data from a Postgres instance that's consuming replication sets with osm2pgsql. You'll need to edit the connection string as appropriate for your own osm2pgsql instance. The style file for osm2pgsql is slightly modified such that it also gets capacity tag to support this. To ensure that the heat map code doesn't try to get ahead of the current osm2pgsql import it checks the state.txt file that the import process leaves in the filesystem. You'll need to edit the path to the state.txt file in order to match your environment too. Currently the tiles are dumped into a directory on my local PC. I then FTP these up to the website whenever I get round to it. I'll eventually add the FTP code in to do that automatically instead. Cheers, Gregory _______________________________________________ newbies mailing list [email protected] http://lists.openstreetmap.org/listinfo/newbies

