The last week was pretty full of Marble for me, and my main two targets were to implement the last (and best Image may be NSFW.
Clik here to view. ) version of Douglas-Peucker filtering and to solve the Antarctica bug.
Douglas-Peucker works as expected, so the creation of the cache happens only once, right after opening the .KML file and lasts somewhere around 3 seconds for that Appalachian Trail line string. Zooming in, moving around the map and all these frequent operations take less than 4ms for detail levels <= 12. After 12, the times increase a little, but they are still better than for the non-filtered version.
Now, about the Antarctica bug: it was by far the hardest task I had to do for Marble until now, because, as the name says, it was a bug fix. And you never know what to expect from bug fixes. The problem was this: in the Spherical Projection, a linestring that contained Antarctica ( the most important properties of this linestring are that it is closed, that it contains the pole and that it intersects the dateline ) was rendered properly, but in the Cylindrical Projections it looked like this ( obviously wrong ):
Image may be NSFW.
Clik here to view.
The thing I was suggested to try was to find the southernmost dateline crossing of the linestring, and insert between those two points two another points, (-180, -90) and (180, 90), which should create the link and close the polygon properly. After adding the necessary features to the GeoDataLineString and inserting the points in AbstractProjection::crossDateLine, I had to try different ways for more than 4 days, because Antarctica didn’t seem to want to work. After noticing that those wrongly drawn points were actually not random, but points translated 360 degrees to the left / right from their correct position, I played a bit with the normalizations and managed to make the map look right:
Image may be NSFW.
Clik here to view.
As I am getting to the heart of my project, I received a bonus today, after trying to load the first SHP files:
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
They work and it looks like Antarctica is rendered properly!!! Yuppy! Image may be NSFW.
Clik here to view.
[Later Edit]: Last night, SHP rendering didn’t work with linestring filtering, but now it does Image may be NSFW.
Clik here to view. A toast for a faster Marble! Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Clik here to view.
