[Qgis-developer] Implementing project scales list

kimaidou kimaidou at gmail.com
Mon Jul 16 02:33:26 PDT 2012


Hi,

Thanks Alexander for developping the idea underneath my patch. Allowing the
user to define the default Qgis scale lists is the right way to go. And we
will be able to have a "scale list repository", as python snippets codes.

I have another related idea. It could be good to have a project option to
force the canvas to always stick to the given scales list. Anytime the user
zoom (in / out / to extent , etc.), Qgis will go the closer corresponding
scale. For example, if a zoom should bring me to 1/2656, and I have defined
this scales list : 1000, 2500, 5000, 10000, Qgis will automatically zoom
1/2500 instead.
Of course we should not refresh the canvas twice, one for 2656 and then one
for 2500.

Michael


2012/7/16 Marco Hugentobler <marco.hugentobler at sourcepole.ch>

> Hi Alexander
>
> Ok, that sounds reasonable to me (new class in core directory). In that
> case, the new class has a similar role for scales as QgsTolerance has for
> snap distances.
>
>  P.S. we can move this discussion do the developers list if necessary.
>>
>
> done.
>
> Thanks,
> Marco
>
>
>
> Am 16.07.2012 10:28, schrieb Alexander Bruy:
>
>> Hi Marco.
>>
>> 2012/7/16 Marco Hugentobler <marco.hugentobler at sourcepole.**ch<marco.hugentobler at sourcepole.ch>
>> >:
>>
>>> I'm working on feature #5561 "Project scale list" [0] and already
>>>> implement almost all desired functionality.
>>>>
>>> Is the implementation similar to the patch which currently is attached to
>>> the ticket?
>>>
>> It uses same idea but with a little different implementation. First I
>> implement
>> ability to change global scale list from QGIS settings so user can enter
>> preferred scales and always use them in all project. The second step is a
>> project level scale list, which can override global settings.
>>
>> I just push this branch to my fork on GitHub here:
>> https://github.com/alexbruy/**Quantum-GIS/tree/project_scale<https://github.com/alexbruy/Quantum-GIS/tree/project_scale>
>>
>>  Is it ok to create such class and where is better to place it? I think,
>>>> it should go to core subdirectory
>>>>
>>> Could you explain the functionality of the scale manager class? If it is
>>> just QgsProject::instance()->**readListEntry() / writeEntry(), it might
>>> be
>>> overkill to create a new class (but I guess there is more, I just did not
>>> follow the ticket too closely).
>>>
>> I already use QgsProject::instance()->**readListEntry() / writeEntry()
>> to read
>> and write scale list defined per-project. But I also want to provide for
>> users
>> easy method to save scale list, move it to another PC (like connection
>> settings or shortcuts) and then load this list as global or project.
>>
>> So this class will create separate XML (or even plain text) file from
>> global/project
>> scale list or populate global/project scale list from existing file.
>>
>> P.S. we can move this discussion do the developers list if necessary.
>>
>> Thanks for your time
>>
>
>
> --
> Dr. Marco Hugentobler
> Sourcepole -  Linux & Open Source Solutions
> Weberstrasse 5, CH-8004 Zürich, Switzerland
> marco.hugentobler at sourcepole.**ch <marco.hugentobler at sourcepole.ch>
> http://www.sourcepole.ch
> Technical Advisor QGIS Project Steering Committee
>
> ______________________________**_________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/qgis-**developer<http://lists.osgeo.org/mailman/listinfo/qgis-developer>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20120716/11d19e13/attachment.html>


More information about the Qgis-developer mailing list