"An error occurred: can't find resolution index ..."

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

"An error occurred: can't find resolution index ..."

gulfoslides
I have my tilecache.cfg setup a layer called CountryLines, like this:

[CountryLines]
type=WMS
url=http://mymachine/cgi-bin/mapserv.exe?map=mymap.map
layers=CountryLines
resolutions=1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.002746582,0.002334595,0.001922607,0.00151062,0.001098633,0.000686646,0.000583649,0.000480652,0.000377655,0.000274658,0.000171661,0.000145912,0.000120163,0.0000944138,0.0000686646,0.00004291534

and an OpenLayers map setup like this:


            var map = new OpenLayers.Map( $('map'),
  {
           
            resolutions:

[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.002746582,0.002334595,0.001922607,0.00151062,0

.001098633,0.000686646,0.000583649,0.000480652,0.000377655,0.000274658,0.000171661,0.000145912,0.000120163,0.0000944138,0.0000686646,0.00004291534]

           
 
        } );



and I get no images back through the tilecache. I captured one of the urls that OpenLayers was submitting and it looks like this:

http://mymachine/cgi-bin/tilecache-2.03/tilecache.cgi?LAYERS=CountryLines&map=mymap.map&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=-172.0458984375,-16.5673828125,-104.8095703125,39.0673828125&WIDTH=256&HEIGHT=256

and when I past that url directly into my browser I get this error message:

An error occurred: can't find resolution index for 0.262642. Available resolutions are:
[1.40625, 0.703125, 0.3515625, 0.17578125, 0.087890625, 0.0439453125, 0.02197265625, 0.010986328125, 0.0054931640625, 0.002746582, 0.0023345950000000001, 0.001922607, 0.0015106200000000001, 0.0010986329999999999, 0.00068664599999999996, 0.000583649, 0.00048065199999999998, 0.00037765500000000002, 0.000274658, 0.00017166100000000001, 0.00014591199999999999, 0.00012016299999999999, 9.4413799999999994e-005, 6.8664600000000007e-005, 4.2915340000000002e-005]

So ... I must not be doing something right. Any ideas ?







Reply | Threaded
Open this post in threaded view
|

Re: "An error occurred: can't find resolution index ..."

carpel
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Hi,
How do you solve this issue? Can you give me any suggestions,please?

I have the same problem i.e.

An error occurred: can't find resolution index for 0.097656. Available resolutions are:
[0.056640625, 0.0283203125, 0.01416015625, 0.007080078125, 0.0035400390625, 0.00177001953125, 0.000885009765625, 0.0004425048828125, 0.00022125244140625, 0.000110626220703125, 5.53131103515625e-005, 2.765655517578125e-005, 1.3828277587890625e-005, 6.9141387939453125e-006, 3.4570693969726563e-006, 1.7285346984863281e-006, 8.6426734924316406e-007, 4.3213367462158203e-007, 2.1606683731079102e-007, 1.0803341865539551e-007]


browser url:

http://localhost/tilecachebin/tilecache.cgi?LAYERS=base&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG:4326&BBOX=-6,34.5,19,49&WIDTH=800&HEIGHT=530

tilecache.cfg

[base]
type=WMS
url= http://localhost/cgi-bin/mapserv.exe?map=mymap.map
layers=DEFAULT
srs=EPSG:4326
BBOX=6,34.5,19,49
maxResolution=0.025390625
resolutions=0.056640625, 0.0283203125, 0.01416015625, 0.007080078125, 0.0035400390625, 0.00177001953125, 0.000885009765625, 0.0004425048828125, 0.00022125244140625, 0.000110626220703125, 5.53131103515625e-005, 2.765655517578125e-005, 1.3828277587890625e-005, 6.9141387939453125e-006, 3.4570693969726563e-006, 1.7285346984863281e-006, 8.6426734924316406e-007, 4.3213367462158203e-007, 2.1606683731079102e-007, 1.0803341865539551e-007
extent_type=loose
levels=20
extension=png
size=256,256
debug=True

mymapfile
MAP
    NAME "DEFAULT"
        EXTENT 6 34.5 19 49
                       
    SIZE 300 200
        SHAPEPATH "."
    UNITS DD
    RESOLUTION 96
  TEMPLATEPATTERN ".*"
       
    WEB
        TEMPLATE "void"
                        IMAGEPATH "."
                        IMAGEURL ""
                       
        METADATA
                        ows_enable_request "*"
            "OMS-ZoomSlide" "12000000 8000000, 250000, 100000, 50000, 25000, 10000, 5000, 3000"
            "OMS-LimitResult" "300"
            "OMS-HighlightSelected" "on"
            "OMS-HighlightColor" "255, 255, 0"
            "OMS-AutoZoom" "search, select"
            "OMS-ZoomAll" "search, select"
            "OMS-TocStyle" "tree"
            "OMS-ScaleLayers" "0"
            "OMS-IconW" "30"
            "OMS-IconH" "15"
            "OMS-InfoWin" "window"
                        WMS_TITLE "Cartografia di Base"
                        wms_extent "6 34.5 19 49"
        END
    END

    PROJECTION
      "init=epsg:4326"
    END


    SYMBOL
        NAME 'circle'
        TRANSPARENT 1
        TYPE ELLIPSE
        POINTS 1 1 END
        FILLED FALSE
    END

    SYMBOL
    NAME 'gray'
    TYPE VECTOR
    Filled FALSE
    POINTS 0 0 0 0 -99 -99 1 1 END
    END

        OUTPUTFORMAT
                NAME jpeg
                DRIVER "AGG/jpeg"
                MIMETYPE "image/jpeg"
                IMAGEMODE RGB
                EXTENSION "jpg"
                FORMATOPTION "INTERLACE=OFF"
        END



# ---- START OF LAYER SECTION -----------------------------------------------
       
        LAYER
         GROUP "Limiti-Amministrativi"
         NAME "sfondo"
         STATUS ON
                 DATA "sfondo.tif"
                 TEMPLATE "templates/void.html"
                 PROJECTION
                        "init=epsg:4326"
                 END
         TYPE RASTER
                 MINSCALEDENOM 260000
         CLASS
            NAME "Sfondo"
            SIZE 3
            COLOR 255 255 255
            OUTLINECOLOR 153 51 51            
                END # end class
        END # end layer
 END # end mapfile    

Regards, carpel