[OSM-dev] Extracting polygons from planet.osm - take 2

Robert Hart Robert.Hart at BuroHappold.com
Fri Mar 16 10:11:59 GMT 2007


> I would appreciate it if people could try this out and let me know if
it
> works, and is accurate!  If people think this is valuable I would like
> to create directory in SVN for both the script and a collection of
> polygon files, I am happy to oversee this.  I would also like to
create
> a Wiki page describing the script usage and polygon files.

Keith, 

Not had time to run this yet, but I read the code, so here's some things
I thought of along the way:

Line 106:

if ($compress > 99) {

Shouldn't that be ($compress < 99)?


Line 171:

if ($used_nodes->{$2} || $used_nodes->{$3})

Wouldn't it be better to only output segments with both nodes defined?
i.e. && instead of ||

Of course, you are making all the usual assumptions about the structure
of the OSM file, but I think that's an acceptable compromise for users
of your script.

Rob



This message has been scanned for viruses by MailControl - www.mailcontrol.com




More information about the dev mailing list