Quantcast

New Cache structure

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

New Cache structure

Pablo Martínez Pérez
Hi,

I need for my kaMaps applications a new cache structure.
This is what I make:

Objetive:

        - Make cache available for different kaMap applications.
        - New cache directory structure:

                [cache_dir]/[layer]/[scales]

                example of new cache dir:

                /cache/raster_2007/80000/def/...
                /cache/rivers/30000/def/...

Implementation:


- Config.php:

//$szMapCacheDir = $szBaseCacheDir.$szMap;
$szMapCacheDir = $szBaseCacheDir;



- Tile.php:

//$szCacheDir = $szMapCacheDir."/".$scale."/".$szGroupDir."/".$szLayerDir."/".$szMetaTileId;

$oMap = ms_newMapObj($szMapFile);
$aLayersIdx = $oMap->getLayersIndexByGroup($groups);
$oLayer = $oMap->getLayer($aLayersIdx[0]);

$szMetaGroupDir = $oLayer->getMetaData('tile_folder');
$szCacheDir = $szMapCacheDir."/".$szMetaGroupDir."/".$scale."/".$szMetaTileId;

...

//$oMap = ms_newMapObj($szMapFile);


- MAP FILE:

METADATA
        "tile_folder"  "[directory]"    ->   "tile_folder" "raster_2007"
END


Its all ok?
I need your opinion.



-------------------
Pablo Martínez





_______________________________________________
ka-Map-dev mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/ka-map-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New Cache structure

pagameba
Pablo,

what is the purpose of changing the cache structure.  Your changes  
look okay at first glance, but there may be a way to achieve what you  
are trying to do without modifying ka-Map.

Cheers

Paul

On 21-Jun-07, at 3:01 AM, Pablo Martínez Pérez wrote:

> Hi,
>
> I need for my kaMaps applications a new cache structure.
> This is what I make:
>
> Objetive:
>
> - Make cache available for different kaMap applications.
> - New cache directory structure:
>
> [cache_dir]/[layer]/[scales]
>
> example of new cache dir:
>
> /cache/raster_2007/80000/def/...
> /cache/rivers/30000/def/...
>
> Implementation:
>
>
> - Config.php:
>
> //$szMapCacheDir = $szBaseCacheDir.$szMap;
> $szMapCacheDir = $szBaseCacheDir;
>
>
>
> - Tile.php:
>
> //$szCacheDir = $szMapCacheDir."/".$scale."/".$szGroupDir."/".
> $szLayerDir."/".$szMetaTileId;
>
> $oMap = ms_newMapObj($szMapFile);
> $aLayersIdx = $oMap->getLayersIndexByGroup($groups);
> $oLayer = $oMap->getLayer($aLayersIdx[0]);
>
> $szMetaGroupDir = $oLayer->getMetaData('tile_folder');
> $szCacheDir = $szMapCacheDir."/".$szMetaGroupDir."/".$scale."/".
> $szMetaTileId;
>
> ...
>
> //$oMap = ms_newMapObj($szMapFile);
>
>
> - MAP FILE:
>
> METADATA
> "tile_folder"  "[directory]"    ->   "tile_folder" "raster_2007"
> END
>
>
> Its all ok?
> I need your opinion.
>
>
>
> -------------------
> Pablo Martínez
>
>
>
>
>
> _______________________________________________
> ka-Map-dev mailing list
> [hidden email]
> http://lists.maptools.org/mailman/listinfo/ka-map-dev

+-----------------------------------------------------------------+
|Paul Spencer                          [hidden email]    |
+-----------------------------------------------------------------+
|Chief Technology Officer                                         |
|DM Solutions Group Inc                http://www.dmsolutions.ca/ |
+-----------------------------------------------------------------+






_______________________________________________
ka-Map-dev mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/ka-map-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New Cache structure

Pablo Martínez Pérez
In reply to this post by Pablo Martínez Pérez
Paul,

I have one kaMap application with 178 MAPs in config.php
All of this MAPs uses the same Raster Layer.

This is the only way that I found to avoid the duplicated tiles in the
Raster Layer.

You can look at the application at:
http://www.iderioja.larioja.org/municipios 

Also, I want to use the Raster Layer for other kaMap applications.

Thanks,

Pablo

_______________________________________________
ka-Map-dev mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/ka-map-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: New Cache structure

Paul Spencer-5
Pablo,

I thought that might be the case.  I just went looking because I  
thought we had added an optional configuration that allowed  
specifying a shared cache for particular layer/groups.  I can't find  
it right now, so perhaps it isn't in there.

I'm hoping perhaps Lorenzo will remember :)

Paul

On 26-Jun-07, at 2:51 AM, Pablo Martínez Pérez wrote:

> Paul,
>
> I have one kaMap application with 178 MAPs in config.php
> All of this MAPs uses the same Raster Layer.
>
> This is the only way that I found to avoid the duplicated tiles in the
> Raster Layer.
>
> You can look at the application at:
> http://www.iderioja.larioja.org/municipios
>
> Also, I want to use the Raster Layer for other kaMap applications.
>
> Thanks,
>
> Pablo
>
> _______________________________________________
> ka-Map-dev mailing list
> [hidden email]
> http://lists.maptools.org/mailman/listinfo/ka-map-dev

+-----------------------------------------------------------------+
|Paul Spencer                          [hidden email]    |
+-----------------------------------------------------------------+
|Chief Technology Officer                                         |
|DM Solutions Group Inc                http://www.dmsolutions.ca/ |
+-----------------------------------------------------------------+






_______________________________________________
ka-Map-dev mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/ka-map-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: New Cache structure

Lorenzo Becchi
I remember Sebastian offered the patch but nobody answered ;-)
so no patch

IMO, it would be good to add such a feature.

ciao
Lorenzo


Paul Spencer wrote:

> Pablo,
>
> I thought that might be the case.  I just went looking because I
> thought we had added an optional configuration that allowed specifying
> a shared cache for particular layer/groups.  I can't find it right
> now, so perhaps it isn't in there.
>
> I'm hoping perhaps Lorenzo will remember :)
>
> Paul
>
> On 26-Jun-07, at 2:51 AM, Pablo Martínez Pérez wrote:
>
>> Paul,
>>
>> I have one kaMap application with 178 MAPs in config.php
>> All of this MAPs uses the same Raster Layer.
>>
>> This is the only way that I found to avoid the duplicated tiles in the
>> Raster Layer.
>>
>> You can look at the application at:
>> http://www.iderioja.larioja.org/municipios
>>
>> Also, I want to use the Raster Layer for other kaMap applications.
>>
>> Thanks,
>>
>> Pablo
>>
>> _______________________________________________
>> ka-Map-dev mailing list
>> [hidden email]
>> http://lists.maptools.org/mailman/listinfo/ka-map-dev
>
> +-----------------------------------------------------------------+
> |Paul Spencer                          [hidden email]    |
> +-----------------------------------------------------------------+
> |Chief Technology Officer                                         |
> |DM Solutions Group Inc                http://www.dmsolutions.ca/ |
> +-----------------------------------------------------------------+
>
>
>
>
>
>
> _______________________________________________
> ka-Map-dev mailing list
> [hidden email]
> http://lists.maptools.org/mailman/listinfo/ka-map-dev
_______________________________________________
ka-Map-dev mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/ka-map-dev
Loading...