Archive for January, 2009

Published by breki on 29 Jan 2009

GroundTruth Update: Fixing Some Bugs

Im thirst................
Creative Commons License photo credit: Matthew Fang

Ah the beauty of new software. Especially if you like killing bugs:

  • The latest version seems to be working on Linux. See OSM wiki page for more information.
  • The Characters conversion table on OSM Wiki had the wrong section name (my mistake), so it was being ignored by GroundTruth.
  • Labels for line types are now automatically converted to uppercase – there were problems with showing lowercase letters on some Garmin units.

I’m also slowly adding content to the GroundTruth Manual.

Published by breki on 28 Jan 2009

Fresh Catch For January 28th

These are my new delicious links for January 28th:


Published by breki on 27 Jan 2009

SharpZipLib: Making It Work For Linux/Mac

Mr. Monster Mouth
Creative Commons License photo credit: massdistraction

I’m writing this post since I’ve found a lot of people having similar problems, so hopefully it will be useful to someone.

I’ve had Linux/Mac people reporting that the ZIP package of GroundTruth which I released yesterday could not be extracted. The package was created programmatically using the SharpZibLib, an open source .NET ZIP library. I myself did not detect any problems, it works OK on my Vista machines.

I’ve done some investigation (Google, inspecting other open source projects…) and found a small hint what could be the culprit – I wasn’t setting the ZipEntry.Size property when I was adding files to the package. So here I’m posting a code snippet on how to create a ZIP package with selectively added files:

using (FileStream zipFileStream = new FileStream(
    zipFileName,
    FileMode.Create,
    FileAccess.ReadWrite,
    FileShare.None))
{
    using (ZipOutputStream zipStream = new ZipOutputStream(zipFileStream))
    {
        byte[] buffer = new byte[1024 * 1024];

        foreach (string fileName in filesToZip)
        {
            string cleanedFileName = ZipEntry.CleanName(fileName);

            using (FileStream fileStream = File.OpenRead (fileName))
            {
                ZipEntry entry = new ZipEntry (cleanedFileName);
                entry.DateTime = File.GetLastWriteTime(fileName);
                entry.Size = fileStream.Length;
                zipStream.PutNextEntry (entry);

                int sourceBytes;

                while (true)
                {
                    sourceBytes = fileStream.Read(buffer, 0, buffer.Length);

                    if (sourceBytes == 0)
                        break;

                    zipStream.Write(buffer, 0, sourceBytes);
                }
            }
        }
    }
}
 

Published by breki on 27 Jan 2009

GroundTruth: Problems With ZIP

angry sandwich closeup
Creative Commons License photo credit: Sakurako Kitsa

Grrrr…. looks like my code for zipping the build package is doing something wrong – some people reported they couldn’t extract files due to problems with a corrupt ZIP file. I tested it on my two machines (both Vistas) and it worked OK (both with the Windows integrated unzipper and with 7zip).

I’m using SharpZipLib for zipping. I did some investigation on Google and there are a lot of reports with SharpZipLib zipped files being unaccessible on Linuxes and Macs. I’ll take a deeper look into this issue today, in the meantime I rezipped the files manually (so it should hopefully work now) and placed the ZIP file on the download location: http://downloads.igorbrejc.net/osm/groundtruth/

Published by breki on 26 Jan 2009

GroundTruth Released!

I’m happy to announce I finally managed to finish most of the things I planned for the first release of GroundTruth, a mapmaking software for Garmin maps.

You can find the download package on http://downloads.igorbrejc.net/osm/groundtruth/.

For more information about GroundTruth, here are some links:

I still have to write the manual on OSM wiki, so please be patient. And since this is a first release, expect bugs. Please report if you find any. Thanks!

BTW here are some screenshots of a GroundTruth hiking map taken from my Garmin eTrex Vista:

unit6unit5unit4unit3unit2unit1

Published by breki on 25 Jan 2009

Fresh Catch For January 25th

These are my new delicious links for January 25th:


Published by breki on 24 Jan 2009

Fresh Catch For January 24th

These are my new delicious links for January 24th:


Published by breki on 22 Jan 2009

Fresh Catch For January 22nd

These are my new delicious links for January 22nd:


Published by breki on 21 Jan 2009

Fresh Catch For January 21st

These are my new delicious links for January 21st:


Published by breki on 21 Jan 2009

Fresh Catch For January 21st

These are my new delicious links for January 21st:


Next »