Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Everybody,

I'm undergoing development on a application which is constructed by GeoServer and OpenLayers. Considering that there is a large set of layers (8 layer groupS and totally 121 layers) to display, we decided that user access the map in the cache way rather than dynamic generating. Because there are only 2 optional Grid Set in GeoWebCache from, I searched from google to create a new user-defined Grid Set 'EPSG:2326' which is aimed for HongKong, following are steps I did:

1, Newly added a Grid Set in 'geowebcache.xml' which is under path 'data_dir/gwc':

  <gridSets>
    <gridSet>
      <name>EPSG:2326</name>
      <srs>
        <number>2326</number>
      </srs>
      <extent>
        <coords>
          <double>806677.9759</double>
          <double>802420.9858</double>
          <double>8876817.5647</double>
          <double>853384.7903</double>
        </coords>
      </extent>
      <scaleDenominators>
        <double>25000000</double>
        <double>1000000</double>
        <double>100000</double>
        <double>25000</double>
      </scaleDenominators>
      <tileHeight>256</tileHeight>
      <tileWidth>256</tileWidth>
    </gridSet>
  </gridSets>
  <layers>

2, Added new optional Grid Set into layer group's XML config file which is under the path 'data_dir/sample_group' and named for 'sample_group.xml':

<entry key="GWC.gridSets">EPSG:4326,EPSG:900913,EPSG:2326</entry>

Finally, I go to the GWC Seed Form page to generate cache png, and seeding task can done successfully only on the condition that Stop Zoom is lower 4, otherwise will be failed and below is the related error message:

java.lang.IllegalStateException: Found no range bounds for z level 4: {0=[J@16a4cf2, 1=[J@1e1b0e7, 2=[J@2516dc, 3=[J@1000323}
        at org.geowebcache.storage.TileRange.rangeBounds(TileRange.java:169)
        at org.geowebcache.seed.SeedTask.tileCount(SeedTask.java:217)
        at org.geowebcache.seed.SeedTask.doActionInternal(SeedTask.java:107)
        at org.geowebcache.seed.GWCTask.doAction(GWCTask.java:76)
        at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:36)
        at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:25)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)

I guess that means no Bound Box for Zoom Level 4, I'm now confused and hope anybody out there give me some ideas?

Thanks a lot.

share|improve this question
    
Can anybody offer a help?? –  Brady Jul 17 '12 at 9:06
add comment

2 Answers 2

This issue is caused by 'scaleDenominators' configuration is not completed.

  <scaleDenominators>
    <double>25000000</double>
    <double>1000000</double>
    <double>100000</double>
    <double>25000</double>
  </scaleDenominators>

You should add all possible scaleDenominators OR keep it null to use the default.

share|improve this answer
add comment

GeoWebCache zoom levels are 0 based so in your case zoom level 4 should be passed to GWC as zoom level 3 (0,1,2,3).

Also, another approach you can take is to specify the number of zoom levels and let GWC figure out the scales/resolutions. So, in your previous example you could change it to:

<gridSets>
  <gridSet>
    <name>EPSG:2326</name>
    <srs>
      <number>2326</number>
    </srs>
    <extent>
      <coords>
        <double>806677.9759</double>
        <double>802420.9858</double>
        <double>8876817.5647</double>
        <double>853384.7903</double>
      </coords>
    </extent>
    <levels>4</levels>
    <tileHeight>256</tileHeight>
    <tileWidth>256</tileWidth>
  </gridSet>
</gridSets>

More documentation on the schema can be found at http://geowebcache.org/schema/docs/1.2.2/index.html

Hope that helps!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.