-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm using django and basemap to render tiles i can use to make an
overlay on google maps. I'm using this to generate a topology of an open
mesh network (freifunk) here in leipzig :)
On my local developing machine this works very nice and due heavy
caching of database lookups it doesn't seem slow. My problem is, that
the production machine isn't that fast and has to little memory :(

Now I'm thinking of a better algorithm to generate the tiles. Currently
they are generated on demand and then saved to disc for later usage. But
the topology is fetched every 10 minutes, so the disc files timeout
relative fast.

my current algorithm looks like this:

fetch all node positions and cache them through pickle.
These are rendered as small blue dots on the map (Yes, here I can
optimize to only call plot when the node is in boundries of the tile.

then all connections for the last topo are fetched and cached.
Now there is a problem, I have to plot all connections into the plot,
because it's not easy to say which lines are actually in the tile. I
haven't looked deep into matplotlib to know how optimized it already
ignores plots which are out of bound.

Now I'm asking my self: is it possible to make a basemap instance with
some lat/lng borders, plot all stuff in it, and then move the borders to
get a new tile which is next to the last one ? Would such a algorithm be
faster then the current one ?

If not, there is also the posibility to create one large image at
largest zoomlevel for the most used region and then cut and scale the
image until all tiles are generated.

You can find the sourcecode at:
http://ff-firmware.quamquam.org/trac/browser/ffsomething/trunk/apps/uptime/topoimg.py
mktopo() is acutally doing the work :)

kindly regards
  Daniel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: GnuPT 2.7.2
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE24sHy/mkIQp7AD0RApIIAJ9rixzc9B84H/rvkZi5WZHeNmLb0QCgnrzx
De40WjI3L2E4/rdOlorGO1M=
=6Fq9
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to