gltn / stdm

STDM is a free and open source pro-poor land recordation system based on QGIS, PostgreSQL and PostGIS.
http://stdm.gltn.net/
GNU General Public License v2.0
31 stars 29 forks source link

How to lock the produced map template on a specific scale? #348

Closed vutegha closed 3 years ago

vutegha commented 6 years ago

Hi @gkahiu .

I designed a template linked to a specific personalized view. Everything works well but the issue comes when I generate the map from the given template. I can set a scale to 1:1000 but the map comes out with something like 1:141319749.

In my specific case, the scale is predefined and it is standard. Note that I am using the master-stdm version downloaded few days ago.

Thoughts?

gkahiu commented 6 years ago

@wondie kindly assist. Might be similar with the Uganda context.

wondie commented 6 years ago

@vutegha this feature is not there in STDM master. However, there is an implementation of fixed scale on STDM customization to Nepal. If you are interested, you can get it from here.

gkahiu commented 6 years ago

@wondie , is there a specific code snippet for fixing the scale to help him narrow down?

wondie commented 6 years ago

Yes. Below are the links showing where it is implemented. https://github.com/gltn/stdm/blob/stdm_nepal/ui/composer/composer_spcolumn_styler.py#L164 https://github.com/gltn/stdm/blob/stdm_nepal/composer/spatial_fields_config.py#L128 https://github.com/gltn/stdm/blob/stdm_nepal/composer/document_generator.py#L393

vutegha commented 6 years ago

Thanks @wondie. I will try implement it. I will revert back to you if necessary.

wondie commented 6 years ago

@vutegha sounds cool.

wondie commented 6 years ago

Also please note that the UI file here is modified to received both fixed scale and zoom level.