[Qgis-developer] Re: my first python plugin for qgis

Larry Shaffer larrys at dakotacarto.com
Mon Jan 30 20:58:18 EST 2012


Hi Stefan,

On Mon, Jan 30, 2012 at 5:17 PM, SBL <Stefan.Blumentrath at nina.no> wrote:
> Hi Larry
>
> Good to hear, that it could be helpful for someone (when working properly)!
> Please feel free to repurpose the code! That`s the idea of open source,
> is`nt it?

Thanks. Just thought I'd ask, first.


> Regarding your problems running the plugin:
> In some cases, the boarder of the mapComposer is not rendered in black
> (which stopps the while loops). This can happen, when there are no dark
> pixels in the map closed to the border.
> Then the while loops can run into infinitive-looping.

Yes, I'm seeing something similar (on Mac 10.6.8, Python 2.6, Qt
4.7.4), but I also never get any output. The plugin just skips ahead
as if the TIFF was created, when it hasn't been, if QGIS doesn't spin
up and freeze with high cpu usage instead. Looking forward to testing
out your improvements, as your plugin will be very helpful for having
custom maps in the field, but built and maintained in QGIS.


> Regarding your ideas for input parameters:
> I am not sure if your ideas are related to the GarminCustomMap-plugin or
> related to a new high-resolution "tiff"-export.

Sorry about the confusion. Those ideas were part of the GeoTIFF export
plugin. Got carried away while writing the email. I did find much of
your Composer code in the PyQGIS Cookbook, but liked your approach for
trimming the map before saving.

I've put together most of the interface of my suggested plugin [1]. No
actual work being done yet, and I'm not 100% sure I've got the
interface calculations right. It'll be a mini-frontend to leveraging
Composer to produce a flat, georeferenced TIFF of one's canvas, within
a given area of interest and optional alpha masking. Intending to use
it for producing output to bring into MAPublisher in Illustrator.

I wonder why Composer doesn't already have georeferenced TIFF export
functionality? Or, offer any of gdal's raster formats, for that
matter? (Apart from someone not having the time to craft the C
programming yet.)

Thanks for helping me get the idea for the plugin.

[1] http://dl.dropbox.com/u/4058089/qgis/canvas2geotiff.png
     http://dl.dropbox.com/u/4058089/qgis/canvas2geotiff.tgz

Best regards,

Larry Shaffer
Dakota Cartography
Black Hills, South Dakota


More information about the Qgis-developer mailing list