Opened 10 years ago

Closed 5 years ago

#5650 closed enhancement (wontfix)

GDAL_DEFAULT_WMS_CACHE_DEPTH

Reported by: vindoctor Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: default Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

I'm hoping you will add this to the current 2.0 trunk. You can copy paste what I have below and it will keep all the old behaviors with the addition to being able to set the cache depth as an option if not in the xml file.

CPLErr GDALWMSCache::Initialize(CPLXMLNode *config) {

const char *xmlcache_path = CPLGetXMLValue(config, "Path", NULL); const char *usercache_path = CPLGetConfigOption("GDAL_DEFAULT_WMS_CACHE_PATH", NULL); if(xmlcache_path) {

m_cache_path = xmlcache_path;

} else {

if(usercache_path) {

m_cache_path = usercache_path;

} else {

m_cache_path = "./gdalwmscache";

}

}

const char *cache_depth = CPLGetXMLValue(config, "Depth", NULL);

if(!cache_depth) {

cache_depth = CPLGetConfigOption("GDAL_DEFAULT_WMS_CACHE_DEPTH", NULL);

}

if(cache_depth) {

m_cache_depth = atoi(cache_depth);

} else {

m_cache_depth = 2;

}

const char *cache_extension = CPLGetXMLValue(config, "Extension", ""); m_postfix = cache_extension;

return CE_None;

}

Change History (5)

comment:1 by Even Rouault, 10 years ago

A more detailed rationale justifying the change, the change attached as a proper patch (svn diff), and including the update of the WMS documentation page would help integrating it.

comment:2 by vindoctor, 10 years ago

Ok. I'll work on such. As for rationale, the code in c++ has hardcoded defaults which are the best choice for the original software coder, but not for others. We use JSON abilites which means we have no way to set these defaults(as we have no XML file at times)

comment:3 by Even Rouault, 9 years ago

Still no patch ?

comment:4 by Even Rouault, 9 years ago

Milestone: 2.0

Removing obsolete milestone

comment:5 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.