-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Henrik,

well done. I just changed a few minor things. Mostly to get rid of std
c++ stuff and formatting. It is in SVN now.

I can't test if my changes broke something because I do not have such
a zip. Maybe it's a good idea to add a little subsection on how to
create such an archive in the Wiki. Here would be the right place:

http://sourceforge.net/apps/mediawiki/qlandkartegt/index.php?title=Adding_maps

Thanks for the patch.

Oliver


> 
> Oliver, please find attached the diff file and new files.
> 
> Please let me know, if you find anything odd.
> 
> Henrik
> 
> On 02/05/2012 05:41 PM, Oliver Eichler wrote:
>> Hi Henrik
>> 
>>> For the time being it was better not to mangle around with
>>> existing code to much.
>>> 
>>> The difference is minor, but the CMapTms accesses remote TMS
>>> servers, while the local zip archive uses the ZipReader.
>>> Effectively, I could inherit from CMapTms and just overwrite
>>> the access to TMS method, since the rest remains the same.
>> 
>> QLGT queries the cache before it sends any request to the
>> network. Thus if the cache object returns a valid image for the
>> given URL things should be fine. If the map URL is precede by
>> "file://" the constructor of CMapTms can easily open a different
>> cache location than the default one from CResources.
>> 
>> To accept URLs that start with "file://" it needs some minor
>> changes in CMapDB. For the cache you might either enhance current
>> CDiskCache class or create a common interface class IDiskCache
>> and derive CDiskCache and CDiskCacheZip from it. CMapTms and
>> CMapWms will then operate on IDiskCache.
>> 
>>> 
>>> I would keep Cache and local Tms repository separately. One is
>>> to optimize temporary access and the second is a full
>>> repository with millions of small tile pngs that occupy lots of
>>> disk space if stored as individual file and unzipped.
>> 
>> I would like to keep the amount of CMap... objects low because
>> each time I add a new feature or fix a bug I have to crosscheck
>> with all these objects.
>> 
>> I personally would convert a local tile cache into GeoTiff files.
>> The current SVN trunk even provides a command line application to
>> convert a map level in the cache into a GeoTiff. Have a look at
>> cache2gtiff.
>> 
>> 
>> Oliver
>> 
>>> 
>>> 
>>> On 02/05/2012 10:23 AM, Oliver Eichler wrote:
>>>> Hi Henrik,
>>>> 
>>>> of course I am interested in user patches. To submit a patch
>>>> svn up to latest version in the trunk and add your changes.
>>>> Then do
>>>> 
>>>> svn diff>  patchname.diff
>>>> 
>>>> and send the file patchname.diff.
>>>> 
>>>> I wonder if it is really necessary to create a new class. Is 
>>>> CMapTmsLocalZipArchive really such different from CMapTms?
>>>> Most likely it's just expanding the CDiskCache to use the zip
>>>> archive instead of the cache path, isn't it?
>>>> 
>>>> Oliver
>>>> 
>>>>> Dear Oliver et al, for the past months we have been using
>>>>> QLandkarte first preparing a longer offroad travel
>>>>> afterwards to navigate and track our routes.
>>>>> 
>>>>> I think, it is a great piece of software and I'm grateful
>>>>> for your efforts.
>>>>> 
>>>>> Because we relied to some extend on a TMS repository that
>>>>> was stored locally as huge bunch of tiles in z/x/y.png
>>>>> directoy structure, we archived all pngs within for
>>>>> particular x directory. In order to support reading from
>>>>> the zipped archive on the fly I added some code to 
>>>>> COsmTilesHash to read the addressed pngs from the zip file,
>>>>> which worked quite well. It seems, COsmTilesHash is
>>>>> abandoned, and recent versions of QL are structuring the
>>>>> source of the handling of TMS maps much better. So I added
>>>>> a new class CMapTmsLocalZipArchive (effectively a modified 
>>>>> copy of CMapTms) that is used when the url has a prefix
>>>>> file://  but hardcoded the local zip-archive Tms repository
>>>>> in CMapDB as OpenStreetMap.
>>>>> 
>>>>> First, would you be interested in adding this small
>>>>> extensions ?
>>>>> 
>>>>> And if, second, where should I add a menu item to create a
>>>>> new TMS CMapTmsLocalZipArchive ?
>>>>> 
>>>>> third, how do you incorporate external developments ?
>>>>> Sending files ? Access through svn ?
>>>>> 
>>>>> regards, Henrik
>>>>> 
>>>>> ------------------------------------------------------------------------------
>>>>>
>>>>>
>>>>> 
Try before you buy = See our experts in action!
>>>>> The most comprehensive online learning library for
>>>>> Microsoft developers is just $99.99! Visual Studio,
>>>>> SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps,
>>>>> more. Free future releases when you subscribe now! 
>>>>> http://p.sf.net/sfu/learndevnow-dev2 
>>>>> _______________________________________________ 
>>>>> Qlandkartegt-users mailing list 
>>>>> [email protected] 
>>>>> https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users
>>>>>
>>>>
>>>>
>>>>
>>>>> 
-
------------------------------------------------------------------------------
>>>> 
>>>> Try before you buy = See our experts in action! The most
>>>> comprehensive online learning library for Microsoft
>>>> developers is just $99.99! Visual Studio, SharePoint, SQL -
>>>> plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future
>>>> releases when you subscribe now! 
>>>> http://p.sf.net/sfu/learndevnow-dev2 
>>>> _______________________________________________ 
>>>> Qlandkartegt-users mailing list 
>>>> [email protected] 
>>>> https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users
>>>>
>>>
>>
>>
>>
>>>> 
-
------------------------------------------------------------------------------
>> 
>> Try before you buy = See our experts in action! The most
>> comprehensive online learning library for Microsoft developers is
>> just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3,
>> MVC3, Metro Style Apps, more. Free future releases when you
>> subscribe now! http://p.sf.net/sfu/learndevnow-dev2 
>> _______________________________________________ 
>> Qlandkartegt-users mailing list 
>> [email protected] 
>> https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users
>> 
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8yKKgACgkQhhhJXTUlePqOoACgplFm86jHoLeCiKIaDKolyJoC
RgoAoMYGw6tSSan5BjaTcQOzdVYuIOF9
=dgKO
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Qlandkartegt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users

Reply via email to