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

SBL Stefan.Blumentrath at nina.no
Mon Jan 30 19:17:45 EST 2012


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?

Regarding the repository:
I simply did not manage to define the "Public ssh key" properly. So I was
not able to upload my code from my local git repository...
Can you help me here? The description on the plugin-webside is not very
detailed on exactly that point (SSH key)... 

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.
I am planing to prevent the while loops from that by
a) stopping the loop if darkness in the map-pixels decreases (sequence
starting from the lower and right 
border).
b) stopping the loop last pixel (in row / column) is reached, and giving an
error message in that case.

The new code for the while loops looks like this (I will update the plugin
next week (I am on a work trip and have no access to my private maschine,
where I have my local repository)):


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.
For ideas 1), 2), and 5) I do not really have an idea how they could be
applied on a GarminCustomMap (since the Garmin units are rather restrictive
in these matters (but probably not all of them?))...

1) Output parameters (file format, dpi, scale, pixel area, rotation, etc),
some need to be Composer-specific.

2) Area of interest, referenced from a map layer, or entered extents. Would
set the map item's viewport extent. Page size can be interpreted from that,
scale and dpi.

3) QGIS Project CRS (and maybe a particular layer's nodata or alpha channel
settings) can be embedded in output using GDAL.
QGIS Project CRS is used as input to gdalwarp if necessary for producing
WGS84 output (although working in WGS84 results in "better"
GarminCustomMaps)

4) Optionally reproject the output.
See 3)

5) Optionally create overviews or TMS tiles. gdaladdo and gdal2tiles,
tilecache, or mapproxy could be leveraged for this.

Cheers
Stefan


--
View this message in context: http://osgeo-org.1560.n6.nabble.com/my-first-python-plugin-for-qgis-tp4337466p4352246.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list