Basil
I found your post very interesting. I have not tried to do any bench-
marking with simplekml, until I read your post. I tried to see how
many very simple points I could generate. By simple I mean just a
coordinate, no name, description, nothing. I did a couple of runs with
this code:
for i in range(100): # Vary value with each run
print i
for j in range(5000):
kml.newpoint(coords=[(i, j)])
kml.save("tests.kml",format=False)
but I was to impatient because each run takes about 5 minutes to
complete, so I estimate I can generate between 500,000 and 800,000
points (definitely 500,000 minimum). What you might find interesting
is the line kml.save("tests2.kml",format=False). By setting the format
to False I can get many more points because this bypasses the minidom
module. With format=True I could not even achieve 500,000 points. So,
if you do not care what the kml looks like when saved, just set format
to False.
Anyway, I would welcome any suggestions on how to improve the memory
management. I would also love to know what those "personally
implemented patches" are :)
Finally, I am very impressed with the samples you included. They may
be "very basic" points, but the balloons are very attractive, and I
loved the dots with the lines extended to the ground (guessing the
height of the line represents the amount of emissions?).
Regards
Kyle
On Feb 20, 9:34 pm, souper <
basilveer...@gmail.com> wrote:
> I've been using it since v0.1 and it's been fantastic. Most of my
> files are relatively simple (only placemarks, no lines/polys) and I
> have never used TimePrimitive, Model, gx:Track, and gx:MultiTrack.
> Worked through any issues that did crop up and as far I know they have
> all been fixed in the current release (I'm still using 0.7.3 with some
> personally implemented patches).
>
> The only issue I now have is that the kml object grows too large and
> memory errors occur during saving in the minidom module with 40,000 +
> placemarks, all with many attributes and long descriptions.
> Workaround could be to generate html descriptions and iframe to it
> from the kml description. Looking into it more before I report
> anything. Largest successful run was ~15000 placemarks which I then
> piped to Google's regionator for performance. I've been looking at
> building regionator support into simplekml but that's a 'maybe later'
> kind of thing.
>
> All of my data is sourced from CSV files which I have been iterating
> through and inserting into the kml object directly. I am in the
> process of developing some classes to make this more modular and
> extensible for other projects I will have in the future.
>
> I work for an airborne carcinogen research project. Here are some
> samples of what I have made:
http://dl.dropbox.com/u/13303135/airports_Benzene.kmzhttp://dl.dropbox.com/u/13303135/incinerators_Benzene.kmzhttp://dl.dropbox.com/u/13303135/naps_benz.kmzhttp://dl.dropbox.com/u/13303135/npri_air_Benzene.kmz