[MapProxy] ZeroDivisionError in mapproxy-seed

Bjoern Platzen bjoern.platzen at almoconsult.de
Wed Mar 16 11:04:22 EDT 2011


Oliver Tonnhofer schrieb:
> On 16.03.2011, at 14:31, Bjoern Platzen wrote:
> 
>> Hello Oliver,
>>
>> thanks for your reply.
>>
>> I changed the definition for the grid, so that it uses EPSG:31466. Now the meter-based min_res and max_res should fit.
>>
>> New Grids-definition:
>> grids:
>>  global_geodetic_sqrt2:
>>    srs: 'EPSG:31466'
>>    res_factor: 'sqrt2'
>>    min_res: 6000000
>>    max_res: 2000
>>    bbox: [2064052.224579244,4915664.3518403955,4181319.125883109,6140458.009400783]
>>    bbox_srs: 'EPSG:31466'
>>
>> But I still get the ZeroDivisionError:
> 
> Your extent is 2mio meters wide and your min resolution is 6mio m/px. So the extent is less than a pixel and the grid size for that level then gets rounded to 0. I modified the calculation, so that the grid size is at least 1 x 1, to prevent the division errors.


Thanks a lot, I didn't see that... Seems, if my calculation of the scale 
is somewhat defective. I simply copied the bbox and the scale from 
another tool. Copying just don't seem to be a good idea nowadays... ;-)

Will the code you modified be avaliable in the nightly builds?

Best Regards,

Bjoern

> 
> Regards,
> Oliver
> 

-- 
Almo Consult GmbH
Weiern 171
D-52078 Aachen

tel. +49/241/90075-226
fax  +49/241/90075-20
mail bjoern.platzen at almoconsult.de

www.almo-ac.de
www.almoconsult.de

Registergericht: Aachen
Handelsregisternummer: HRB 13621

Geschäftsführung: Dipl.-Math. Nicole Kirschfink


More information about the MapProxy mailing list