GeoTransformer 2.1

Layers-icon Download GeoTransformer.zip (823Kb)

There is one huge improvement in this version: the ability to automatically translate cache descriptions, hints and logs.

By using Bing Translator the application can automatically translate that foreign gibberish into something that actually helps you to find the cache.

Install and usage instructions in the previous post. Upgrade by just replacing the files (back-up GeoTransformer.data just to be sure).

GeoTransformer 2.0

Layers-icon Download GeoTransformer.zip (810Kb)

GeoTransformer is a small application that is a-must-have for everyone who does not use something more heavy-weight like GASK (and GeoTransformer is free of charge without any nag-screens).

GeoTransformer functions:

  • Decodes HTML entities in the cache description and logs. This function is required as Garmin devices cannot correctly display these entities but it can display the characters if decoded. This will allow you to see all non-latin characters correctly.
  • Saves the coordinates of solved mysteries and automatically inputs them in the .gpx file, changing the cache icon at the same time. After this simple manipulation it gets pretty hard to drive by a solved mistery and not notice.
  • Automatically uncompress .gpx files from a .zip archive.
  • Publishes the converted .gpx files either to a fixed folder or directly on Garmin device (the device must show in My Computer with a name that starts with “Garmin”).
  • Publishes the converted .gpx files also to Magellan device (the device must show in My Computer with a name that starts with “Magellan”).
  • Merges many .gpx files together so that it is not required to manage .gpx files that were previously published on the GPS unit.

Usage instructions:

  • Download and install Microsoft .NET Framework 4 Client Profile.
  • Decompress all files from the downloaded archive in a separate directory (can be a removable USB flash drive).
  • Save the .gpx and .zip files in the same directory.
  • In order to enter the solved coordinates, enter the geocache code (GCxxxx) and the correct coordinates (they can be entered in different formats – DMS, DM, Dec – they will be automatically converted to N XX XX.XXX format).
  • All data is stored in GeoTransformer.data file – this is the one you have to watch in order not to lose the entered data.
  • The cache title will be populated with data from the .gpx files during publish.
  • Click publish. If a recognized GPS device is connected it will show up in the list, otherwise you can publish to a folder.

Upgrade:

  • Just copy the new files overwriting anything you had previously, preserve the MovedCaches.txt – the new version will automatically import anything from the previous version.

Future plans:

  • Collect logs from previous pocket queries to increase the number of logs sent to GPS device (a standalone .gpx download includes 20 logs which is much better that the 5 included in pocket queries).
  • Detect duplicate cache entries and use newest (would be useful if pocket queries overlap or if individual files are often downloaded).
  • Adding additional hint to the .gpx file.
  • And more…

GeoTransformer + Magellan

Publicēta jaunākā GeoTransformer versija, kas māk automātiski publicēt .gpx failus uz Magellan ierīcēm (ja ierīces nosaukums iekš My Computer sākas ar “Magellan”) – direktorijās Geocaches un Waypoints.

Lejupielāde iepriekšējā rakstā.

GeoTransformer – palīgs ar .gpx failiem

Layers-icon Download GeoTransformer.zip (289Kb)

English description is available below.

Izveidoju nelielu programmiņu, ko varētu nosaukt par absolūti nepieciešamu rīku tiem slēpņotājiem, kas neizmanto, piemēram, GSAK.

GeoTransformer funkcijas:

  • Atkodē HTML entities slēpņu aprakstos un logos. Šī funkcija ir nepieciešama, jo Garmin ierīces HTML entities nespēj attēlot, taču pēc šīs apstrādes visi latviešu, krievu utt. burti normāli attēlosies.
  • Saglabā atrisināto mistēriju koordinātas un automātiski tās ievada .gpx failā, pie reizes nomainot slēpņa ikonu. Pēc šīs vienkāršās manipulācijas nejauši pabraukt garām atrisinātai mistērijai kļūst krietni grūtāk.
  • Automātiski atarhivē .zip arhīvā esošos .gpx failus.
  • Publicē pārveidotos .gpx failus vai nu uz konkrētu direktoriju vai arī pa tiešo uz Garmin ierīci (nepieciešams, lai ierīces nosaukums iekš My Computer sāktos ar “Garmin”).
  • Publicē pārveidotos .gpx failus arī uz Magellan ierīci (nepieciešams, lai ierīces nosaukums iekš My Computer sāktos ar “Magellan”).

Lietošanas instrukcija:

  • Nepieciešams Microsoft .NET Framework 4 Client Profile.
  • Jāatarhivē abi faili no lejupielādētā arhīva atsevišķā direktorijā.
  • .gpx un .zip faili jāsaglabā šajā pašā direktorijā.
  • Lai ievadītu atrisinātās koordinātas, nepieciešams norādīt slēpņa kodu un labotās koordinātas (tās var norādīt dažādos formātos – DMS, DM, Dec – programma automātiski tās konvertēs uz N XX XX.XXX formātu).
  • Saglabātie dati tiek saglabāti failā “MovedCaches.txt”.
  • Slēpņa nosaukumu var ievadīt, taču tas tiks pārrakstīts ar datiem no .gpx faila pie publikācijas.
  • Spiežot “Publish”, visi atrastie .gpx faili tiks apstrādāti un nokopēti vai nu uz Garmin vai Magellan ierīci vai apakšdirektorijā “Published”.

GeoTransformer is a small application that is a-must-have for everyone who does not use something more heavy-weight like GASK.

GeoTransformer functions:

  • Decodes HTML entities in the cache description and logs. This function is required as Garmin devices cannot correctly display these entities but it can display the characters if decoded. This will allow you to see all non-latin characters correctly.
  • Saves the coordinates of solved mysteries and automatically inputs them in the .gpx file, changing the cache icon at the same time. After this simple manipulation it gets pretty hard to drive by a solved mistery and not notice.
  • Automatically uncompress .gpx files from a .zip archive.
  • Publishes the converted .gpx files either to a fixed folder or directly on Garmin device (the device must show in My Computer with a name that starts with “Garmin”).
  • Publishes the converted .gpx files also to Magellan device (the device must show in My Computer with a name that starts with “Magellan”).

Usage instructions:

  • Download and install Microsoft .NET Framework 4 Client Profile.
  • Decompress both files from the downloaded archive in a separate directory.
  • Save the .gpx and .zip files in the same directory.
  • In order to enter the solved coordinates, enter the geocache code (GCxxxx) and the correct coordinates (they can be entered in different formats – DMS, DM, Dec – they will be automatically converted to N XX XX.XXX format).
  • The data is saved in the file “MovedCaches.txt”.
  • The cache title can be entered but will be overwritten with data from the .gpx files during publish.
  • After pressing “Publish” all .gpx files will be converted and copied either to Garmin or Magellan device or a subfolder “Published”.

Geocaching un latviešu burti

Geocaching.com lapas lielākā problēma ir UTF-8 neatbalstīšana. Pie tam, lai problēmas padarītu lielākas, pati lapa saka, ka tā it kā visu saturu rāda UTF-8 formātā, taču datubāze to neatbalsta, līdz ar to visi ievadītie simboli tāpat tiek samainīti. Kāpēc šis pēdējais fakts ir svarīgs? Jo interneta pārlūkprogrammas ir gana gudras, lai spētu strādāt ar lapām, kas UTF-8 neatbalsta – tajā brīdī, kad dati tiek nosūtīti uz serveri, tie tiek apstrādāti, piemēram, burtu “š” aizstāj simbolu virtene “š”, ko pārlūkprogrammas vienmēr varēs atpazīt kā to pašu “š” burtu.

Eksistē salīdzinoši vienkāršs risinājums – pašam autoram veikt šo pārveidošanu pirms nosūtīt savu komentāru vai citu tekstu. Taču, to darīt ar roku visbiežāk būs slinkums. Līdz ar to piedāvāju mazu, ērtu risinājumu.

Izpildot drag-and-drop operāciju, šo pārveidotājadresi ievelkam savas pārlūkprogrammas saišu (Links) joslā vai pievienojam saviem Favorites (iespējams arī vienkārši ar copy-paste vienmēr pēc vajadzības pārveidotājadresi iekopēt adreses laukā). Tagad brīdī, kad iekš geocaching lapas esam uzrakstījuši savu komentāru skaistā latviešu (vai krievu, vai ķīniešu) valodā, spiežam uz šīs saglabātās adreses. Nekas no ievadītā nepazudīs – lapa nepārlādēsies, tikai izpildīsies skripts, kas veiks iepriekš aprakstīto manipulāciju ar ievadīto tekstu.

Zemāk pārveidotājadrese atšifrēta:

javascript:
(function () {
    function a(aa) {
        var bb = '';
        for (var i = 0; i < aa.length; i++)
            if (aa.charCodeAt(i) > 127)
                bb += '&#' + aa.charCodeAt(i) + ';';
            else 
                bb += aa.charAt(i);
            return bb;
    };
    var c = document.getElementsByTagName("input");
    for (var j = 0; j < c.length; j++)
        if (c[j].type == "text")
            c[j].value = a(c[j].value);
    c = document.getElementsByTagName("textarea");
    for (var j = 0; j < c.length; j++)
        c[j].value = a(c[j].value);
})();

OfflineCacher – new version (v.6)

As usual, the download is available from the original post.

New features:

  • Downloader application now looks a bit nicer, added context menu (right click) to the cache list.
  • Downloader application allows deletion of caches and waypoints.
  • You can mark caches as favourite on both the phone and downloader app – I currently use this to mark found caches during a geotrip.
  • Cache images are downloaded to subfolders to remove the long waiting time when opening an image on the phone.
  • Added Latvian Topographic map to the phone application (it requires lots of space on the memory card).

OfflineCacher – new version (v.5)

As usual, the download is available from the original post.

New and changed functionality:

  • Downloader application now asks the user to specify the target directory. This enables to work directly with data on the memory card when phone is connected and this approach will be required to work with favourite caches, moving caches and field notes (coming in next version) together on both computer and phone.
  • Downloader application displays more information in the list and also allows sorting for all visible columns.
  • Coordinates in the cache info page and waypoint creation is shown using “W 85 21.333” as this is the most widely used format in geocaching. The same is done in the downloader application.
  • Opening the info screen for the same cache multiple times in a row is much faster (the slow down is visible only when a lot of caches is loaded).
  • Added multiple checks so that the application will not crash if the map tiles are not downloaded correctly.
  • The downloader will no longer download the extras if they have already been downloaded in the last 7 days.

OfflineCacher – new version (v.4)

A new version of OfflineCacher has been published. The instructions are still the same and are available from previous post. The same post has more information on what OfflineCacher can do. In short – it is an Windows Mobile Smartphone application to enable geocaching from your mobile phone without ever using the GPRS (data) connection – this is really useful when traveling as roaming charges most of the time are through the roof.

New functionality:

  • Map storing is optimized to reduce space occupied up to 4x. It is done in two steps – first the application no longer converts every tile to PNG format (for satelite images this enlarged the files by up to 10x). The second optimization is merging these small images into larger “archives”. This optimization also dramatically reduces time needed to copy the maps to storage card.
    • Previously (map for 5 caches): 947 files and 33,8 Mb.
    • Now (map for the same 5 caches): 8 files and 12,64 Mb.
  • When viewing the map if a tile is not available the application now looks for a image from level higher and resizes that (useful when driving around where the maps are not downloaded).

Note that this change makes all previously downloaded maps unusable. You should delete them (folders OpenStreetMap, GoogleStreetMap and GoogleSatelite) manually to free up disk space.

One of the reasons why the maps now take up much less space is that with usual storage card file systems there is a thing called allocation unit – any file will occupy certain number of these units and they can never share one unit. The default unit size is 4Kb so if a file is 6Kb large it will occupy 2 units and the actual size used will be 8Kb. This overhead is too small to notice for large files but if every file is smaller than 10Kb then the overhead is 30% to 50%. By merging the map tiles together this overhead is reduced to minimum.

OfflineCacher – new version (v.3)

A new version of OfflineCacher has been published. The instructions are still the same and are available from previous post. The same post has more information on what OfflineCacher can do. In short – it is an Windows Mobile Smartphone application to enable geocaching from your mobile phone without ever using the GPRS (data) connection – this is really useful when traveling as roaming charges most of the time are through the roof.

Download:

Changes in this version:

  • The cache storage is changed from a simple XML file to a SQLite database. This means that the application can work with lot more caches without eating all of the memory and startup time will always be constant – previously it could take even 20 seconds to load with 200 caches.
  • Download process is now made paralel and in total runs up to 4 times faster. It is also now possible to cancel the whole download or only part of it (for example, if you do not need the satelite maps).
  • The cache description is loaded correctly – previously only the long description (second part) was loaded and short description was ignored. This caused incomplete cache instructions to be displayed on the device.
  • Changed to download also the cache images not only images from logs. But still only the last 20 images are downloaded.
  • Turning off and on the GPS works correctly without restarting the application. Previously turning off worked fine but after turning it back on the application had to be restarted.

The work continues to enable the application to load and store more than 2000 caches at the same time with as much maps as possible. The first step has been done – it is now possible to store many caches at the same time, the next version will contain changes to how maps are stored to use the limited capacity of storage cards as effectively as possible.

It could be possible that some cache filtering options do not work correctly but my weekend caching session did not turn up any major issues.

The change from XML to SQLite also means that whatever caches you had loaded previously will be lost and you will have to load them again. As all .gpx files are not deleted but copied to the Processed directory, you can just move tham back up and the application will load them.

LKS-92 koordinātu sistēma

Pētot, kā priekš savas slēpņošanas programmas iegūt Latvijas topogrāfiskās kartes, uzdūros LĢIA karšu serverim. Kas mani iepriecināja – pārsteidzoši aktuāla informācija – laukos kaimiņa nesen izraktais dīķis (ar kuru viņš appludināja daļu mūsu meža) ir jau iezīmēts.

Taču reizē ar to uzzināju kaut ko jaunu – Latvijā šādām kartēm neizmanto vis kādu no standarta koordinātu sistēmām (UTM vai WGS84 – šis ir visbiežāk sastopamais formā N 56’ 23.233’’ – to nedaudz citā pierakstā izmanto arī Google Maps un citi), bet gan savu standartu LKS-92. Cik nu varēju izlobīt, tad tas pēc būtības ir tas pats UTM, tikai, lai to izmantotu, aprēķinos ir jāizmanto specifiskas konstantes. Katrā ziņā problēma ir vienkārša – ja man ir koordinātas WGS84 formātā, uz šādas kartes tās uzlikt tik vienkārši nevar.

Pameklējos internetā, uzdūros boot.lv foruma rakstam par tēmu. Tajā atbilde netika dota, taču bija norāde uz konkrētu resursu, kurš pārrēķina ievadītās koordinātas starp dažādām sistēmām, tajā skaitā LKS-92. Tā kā visi aprēķini tika veikti JavaScript-ā, tad ar salīdzinoši nelielu darbu esmu ieguvis C# kodu, kas pārrēķina starp WGS84 un LKS-92.

Pirmkoda lejupielāde

Arhīvā ir divas klases: PointD ir vienkārša struktūra X/Y vērtību pārim, bet LKS92andWGS84 satur divas metodes konvertēšanai starp LKS-92 un WGS84 koordinātu sistēmām.