On request I added a nice little feature to Mapparium. It can now extract GPS informations saved in the EXIF of JPG photos. Usually smartphones and better cameras with GPS chips add them to the photos.
Really nice to remember where the photos are taken. a little preview of the image is included, sadly the JPG loading is very slow on MorphOS. I’m not sure whats the reason for this maybe some x86 optimization or general endian problem. So I decided to make the preview with a small preview of the image loaded and call MultiView to show the whole image on request. Mostly the small image is enough to have an idea whats on it. And with MultiView you can inspect in detail. Of course it would be nice to make it configurable later.
Little movie to show how it will work:
The GPS support will have to wait a version more I think, still need a lot of work, and if included track recording and so on should also be implemented, so still a lot of work.
I got a question, if I will continue with my RSS reader I started a while before. So I searched for it, nice, it’s still on the backup 😛 and it still compiles. The home made HTML parser and print looks still strange, and the whole program is just a start. In fact I did this only to fiddle around with XML/Networking, tried some different RSS feeds all (in the list) seemed to work nicely. But to make a real usable program out of it, I was and I’m still too lazy :-P. And I also don’t think there is a real use for RSS today and every Browser has it already build in. So as an answer I’m not sure if I will ever continue it, Sorry.
I got already some requests for easy route planning inside Mapparium, for me thats not so important, because mostly I just drive without a plan. But it’s funny to play around. In fact I plan both ways of planning, online search “from to” and manual planing by defining some points. But first make the online search, rather easy with “YOUR”. Sadly the by turn announcements are only supplied as text wit no relations to the route. That means you cannot click onto a announcement and zoom to the map where it should happen. I found another one from the university of Heidelberg, and it has map coordinates for every turn. But today when I tried to implement it’s offline :-O I’m a little bit hesitated to include such a service, if it is this unstable to use. Especially because it’s not just offline, but just lagging some minutes to timeout, which is very annoying, because it looks like the application is crashed. (But just waiting for the answer.)
Polluks wrote a little AREXX script to extract positions from JPG exif informations to show on the map, it also create geo: URIs suitable for Mapparium. He also asked me if it would be possible to include AREXX support directly to Mapparium. I always played with the idea to try some AREXX support things, but never had a reason. In principle is rather easy to get a message and return a error value.
I added two simple commands to Mapparium, goto and addwaypoint.
Mapparium with AREXX
At AROS sadly I didn’t get the AREXX (or Regina) to work, thats the reason I implement for Amiga Classic at the moment.
Implemented GPX reading and writing, really very easy. Tested with some of my cycle routes (I cuted the start away for the screenshot). It also saves the waypoints and tracks into a default.gpx to load at next start, its the easiest way to start. At the moment I draw a little rectangle at every track point and connect them with a line. Sadly it seems to be not possible to draw a thick line with the standard methods, the PenWidth and PenHeight in RastPort are ignored. so I guess this point approach works best for recorded tracks. For planed routes with little points its hard to see. Maybe I write an own line drawing routine, with Bresenham it should be possible to make.
OpenStreetMap with Waypoints and Tracks
Besides I increased the speed dramatically on drawing, on Amiga 68k its much faster now, even usable and resizing on MorphOS with less problems and much faster, it does not recalculate the complete image on every resize step, but only draws the image.
More work on the OpenStreetMap viewer for Amiga systems. If a Tile is needed it will be set to a Queue and an extra thread checks the Queue tries to load the file from the hard disk, if it does not exist there it loads it from internet. The image shows a special replacement image as long the image is loaded. Of course if you browse around soon the number of tiles become huge. At a time you need to clean the tiles from memory. I introduced a maximum tile number to hold in memory (currently 1000). At every tile the time of last use is noted. The list is sorted and the oldest are removed (oldest means longest time not used).
It works already very nice, I added a little statistic window to see, when tiles are loaded from HD or from Net. Later I will introduce a prefs window to configure the number of tiles to keep in memory especially for Amiga 68k would be important to reduce the value. 1000 tiles needs around 150 MiB. Also the cache on hard disk could be inspected and deleted then. I checked my cache folder, which stores the tile files since I started this work, there are 8400 files inside with a complete size of 150 MB, so its not so urgent to clean it. OpenStreetMap suggests to keep the cache images for at least 7 days or check the status online. I do not plan to edit, so for me it’s not so important to have the very last map updates.
The next step to become more useful I added a search function, already work very nicely, only had some problems with german umlauts (äüö) and other standard characters (é,è,Î and so on). The Input from the Edit needs to be converted to UTF8 using AnsiToUTF8(). Maybe I should do that already indide the LCL code (like I make UTF8ToAnsi when drawing text to screen, thats the reason the copyright sign work).
AmOSM with Search function
The further work will include waypoints and tracks/routes with import and export of GPX data, usual format of GPS devices (mine also) and maybe KMZ the Google Earth format. In principle it would be nice to also read GPS data from a real GPS device, which is connected via serial cable with computer. I’m wondering how to use serial connection in AROS, if even possible, maybe even with an USB to serial adapter, most computers does not have serial connectors anymore.
New Version for the Virtual Lazarus crosscompiler, some crashes with mouse events (OnClick, OnMove, OnEnter, OnLeave), Redrawing and resizing problems and of course the biggest change adding support AmigaOS4 (PowerPC). I removed some not needed files and installations, so the download is much smaller this time.
Changes in short:
FIX: Redraw problems on AmigaOS3
FIX: Size problems
FIX: Mouse event crashes
ADD: Support for AmigaOS4
CHG: Striped image from unneeded things, reduced download size
I am thinking how to make an online updater, in principle not so difficult with a script, svn update from repository, recompile/install all compilers/crosscompilers, update lazarus repository, recompile and install lazarus, done.
I created a Release for the Free Pascal Compiler including RTL, Packages and a pre-alpha version of the Lazarus component Library.
For me the AmigaOS 4 implementation is considered as “done”. I will take care only that changes in FPC does not break the OS4 port and also the LCL changes not break OS4 compilation.
As promised, I cared about drawing with alpha channel on m68k Amiga. Little bit background. When I make a StretchDraw() the raw data is scaled directly in pascal (to keep the alpha channel) via a nearest neighbor routine. And exactly there I need to touch every pixel to scale it, of course a good position to also care about the alpha channel. For speed optimization the special cases 0 and 255 alpha channel are handled separately. And its not so slow as I thought, so I let it inside.
Amiga m68k with alpha channel drawing (left) and as comparison on AmigaOS4 (right)
Besides this I worked more on size calculations especially on MorphOS, still not completely sure how it should be. An additional problem appeared in the OS4 LCL. The size calculation as done before crashes, because it reads the Width/Height from the the MUI object which seems to be forbidden inside the Layout. If think about it’s not very surprising because the layout is called before the window is opened and to get the right size the Layout must be done. So I had to rewrite the section with AROS in mind of course. Seems it works now (again? I hope). With this changes the EdiSyn now also work on OS4.