[OSM-talk] Few changes to png2tileinfo script (was: Re: too muchblue)

David Groom reviews at pacific-rim.net
Sun Apr 29 00:05:09 BST 2007



----- Original Message ----- 
From: "cagri coltekin" <cagri at xs4all.nl>
To: <talk at openstreetmap.org>
Sent: Saturday, April 28, 2007 11:04 PM
Subject: [OSM-talk] Few changes to png2tileinfo script (was: Re: too 
muchblue)


> Hi,
>
> On Fri, Apr 27, 2007 at 02:19:13PM +0200, Frederik Ramm wrote:
>> 1. check out the oceantiles_12.png file
>> 2. change the color of the Turku tiles from blue to green (or white
>> if you suspect they include coastline but that's not too important)
>> 3. run the perl script that generates the data file
>> 4. check in the new data file and the changed png file
>>
>> I'm happy to do 3./4. for you if you do not yet have an SVN account.
>> I can also do 1./2. but I prefer it when people familiar with an area
>> do that.
>
> While working on a mostly incorrect long coastline, I found it
> easier to change the png2tileinfo script to allow changing both
> .dat and .png files with the values provided in the command line.
> It works faster, it does not require an image editor, and may
> also help resolving trouble trouble with updating the png file in
> svn (merging two binary files from two different people who do
> not have svn accounts would be rather difficult).
>
> The changed version of the scrip (patch was almost the same size)
> is attached. It was made to save time, so I did not spend time to
> beautify it, but so far it worked for me it may also be of
> interest to others.
>
> Quick documentation: Running the script with arguments 'check x y'
> gives the current status of the tile x,y in both oceantiles_12.png
> and oceantiles_12.dat. Running it 'set x y (land|sea|coast)'
> sets the given value on both files. Both files need to be in
> the same directory. Running the script without these arguments
> still does the same thing.
>
> cheers,
> -- 
> cagri
>

If this could somehow be incorporated into a web interface it would be 
great!

I was thinking today how I would like to check the  land / sea status of 
tiles to see if that was the reason they were rendering incorrectly rather 
than the fact that there was something wrong with the underlying coastline 
data.

The problem I found was that in many instances, particularly where there was 
a complicated coastline with islands etc,  it was very difficult to identify 
the exact tile as represented in the png.  Even if I did identify it I was 
unwilling to change the png and run the png2tileinfo.pl script for fear that 
I might do something wrong and cause all the sea tiles in the world to be 
wrong :)

David 






More information about the talk mailing list