Plugin to generate map then export to image

Discussion of plugin development

Plugin to generate map then export to image

Postby BrianEdmond on Mon Nov 02, 2009 5:02 pm

I think this is a fairly simple plugin, but I wasn't sure even where to start. Here's what I want to do, basically:

Start with a base map (county boundary map).
Invoke plugin.

Code: Select all
Read in a PostGIS point layer table;
For each attribute in the table;
  Show points only for that attribute;
  Export image of base map with points;
Next attribute;


Sounds easy, right? I've done something similar with Avenue (the deprecated scripting language that ships with old versions of ArcView) but I really want to move away from ArcView if I can get this to work. It's my last step in moving a large project from the Microsoft world to an OSS world and that makes me happy. ;-)

Thanks for any help you can provide! I'm happy to submit my finished script to a repository if someone is interested in something like this.

B
BrianEdmond
Newbie
Newbie
 
Posts: 7
Joined: Mon Nov 02, 2009 4:46 pm
Location: Missouri, USA

Re: Plugin to generate map then export to image

Postby BrianEdmond on Thu Nov 12, 2009 2:20 pm

If anyone is following along, I'm well on my way to developing this as a plugin. It won't be generic enough to put in a plugin repository, but I am happy to share my code once it's completed.

B
BrianEdmond
Newbie
Newbie
 
Posts: 7
Joined: Mon Nov 02, 2009 4:46 pm
Location: Missouri, USA

Re: Plugin to generate map then export to image

Postby GuZzO on Thu Nov 12, 2009 4:08 pm

I think i am doing a similar work....
I try to automatise an atlas map generator, for every species in my database, i would like to generate a repartition map.
Is it the same thing?
GuZzO
Expert
Expert
 
Posts: 90
Joined: Fri Jun 05, 2009 12:44 pm
Location: Bailleul - 59

Re: Plugin to generate map then export to image

Postby BrianEdmond on Thu Nov 12, 2009 4:17 pm

It sounds similar, but I'm not sure what a repartition map is, exactly.

In my case, I have a set of distribution locality maps that do not change very often (basically, once per year). I want to display the maps on a web page as plain images. Thus, I plan to export them as a series of PNG images.

B
BrianEdmond
Newbie
Newbie
 
Posts: 7
Joined: Mon Nov 02, 2009 4:46 pm
Location: Missouri, USA

Re: Plugin to generate map then export to image

Postby BrianEdmond on Fri Dec 04, 2009 9:49 pm

If anyone is following this thread, I was successful! I'm very happy with the results I obtained and the script is surprisingly simple.

The script starts with a completely blank canvas, presents some options to the user, loads some PostGIS layers, styles them with predefined QML files, and loops through a set of attributes (in my case, species) and outputs a map for each one in PNG format.

I'm happy to share what I've created if anyone is interested. It's probably too specific to make a repository plugin, but it will give anyone who's interested a good start.

Cheers,
B
BrianEdmond
Newbie
Newbie
 
Posts: 7
Joined: Mon Nov 02, 2009 4:46 pm
Location: Missouri, USA

Re: Plugin to generate map then export to image

Postby GuZzO on Fri Dec 04, 2009 11:29 pm

i don't have enough time to continue my project but i would please to try yours!
Available at any time! PM me.

Guilluame
GuZzO
Expert
Expert
 
Posts: 90
Joined: Fri Jun 05, 2009 12:44 pm
Location: Bailleul - 59


Return to Plugins

Who is online

Users browsing this forum: No registered users and 1 guest