{"comment":{"created_at":"2011-10-11T15:58:40Z","body":"[randomjunk] sorry, can't attach patch properly...\r\n{{{\r\nTrac Error\r\n\r\nexpected integer, got u'1048576 # 1MB'\r\n}}}\r\n\r\npatch is:\r\n{{{\r\nIndex: include/mapnik/feature_style_processor.hpp\r\n===================================================================\r\n--- include/mapnik/feature_style_processor.hpp\t(revision 729)\r\n+++ include/mapnik/feature_style_processor.hpp\t(working copy)\r\n@@ -123,6 +123,12 @@\r\n                // back project layers extent into main map projection\r\n                prj_trans.backward(lx0,ly0,lz0);\r\n                prj_trans.backward(lx1,ly1,lz1);\r\n+\r\n+               // if no intersection then nothing to do for layer\r\n+               if ( lx0 > ext.maxx() || lx1 < ext.minx() || ly0 > ext.maxy() || ly1 < ext.miny() ) {\r\n+                  return;\r\n+               }\r\n+\r\n                // clip query bbox\r\n                lx0 = std::max(ext.minx(),lx0);\r\n                ly0 = std::max(ext.miny(),ly0);\r\nIndex: src/envelope.cpp\r\n===================================================================\r\n--- src/envelope.cpp\t(revision 729)\r\n+++ src/envelope.cpp\t(working copy)\r\n@@ -239,14 +239,17 @@\r\n #endif\r\n     Envelope<T> Envelope<T>::intersect(const EnvelopeType& other) const\r\n     {\r\n+        if (intersects(other)) {\r\n+            T x0=std::max(minx_,other.minx_);\r\n+            T y0=std::max(miny_,other.miny_);\r\n \r\n-        T x0=std::max(minx_,other.minx_);\r\n-        T y0=std::max(miny_,other.miny_);\r\n+            T x1=std::min(maxx_,other.maxx_);\r\n+            T y1=std::min(maxy_,other.maxy_);\r\n \r\n-        T x1=std::min(maxx_,other.maxx_);\r\n-        T y1=std::min(maxy_,other.maxy_);\r\n-\r\n-        return Envelope<T>(x0,y0,x1,y1);\r\n+            return Envelope<T>(x0,y0,x1,y1);\r\n+        } else {\r\n+            return Envelope<T>();\r\n+        }\r\n     }\r\n \r\n     template <typename T>\r\n}}}","updated_at":"2011-10-11T15:58:40Z","url":"https://api.github.com/repos/artemp/mapnik/issues/comments/2365416","id":2365416,"user":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"}},"action":"created","issue":{"number":127,"created_at":"2011-10-11T15:58:39Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"When Mapnik is processing layers, it tries to clip the map bbox to the\r\nlayer extent... unfortunately it doesn't test for intersection first,\r\nso the \"clipped\" bbox is completely bogus. The layer is then asked for\r\nfeatures for this bbox, and if you have a lot of small raster layers\r\nthen this has a big performance impact.\r\n\r\nI've attached a patch that fixes this, and also returns something\r\nslightly more sensible from Envelope.intersects in the same situation.","comments":3,"title":"BBox clipping fails when there's no intersection","updated_at":"2011-10-11T15:58:42Z","url":"https://api.github.com/repos/artemp/mapnik/issues/127","id":1877137,"assignee":null,"milestone":{"number":6,"created_at":"2011-10-11T15:50:21Z","due_on":"1970-01-01T09:20:38Z","title":"0.6.0","creator":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"},"url":"https://api.github.com/repos/artemp/mapnik/milestones/6","open_issues":1,"closed_issues":38,"description":"=== Summary ===\r\n\r\nThis release offers a great advancement in usability and features such as several new plugins, advanced symbolization, and ICU unicode support.\r\n\r\nOver 140 tickets were closed against this milestone, and builds across both linux, mac and windows should be working better than ever.\r\n\r\nWe also now have a fresh set of [http://svn.mapnik.org/trunk/docs/api_docs/python/index.html Python API Docs (Epydocs)].\r\n\r\nEnjoy,\r\n\r\nDane\r\n\r\n\r\n=== Highlights ===\r\n\r\n * New ICU unicode support via Artem's genius\r\n\r\n * [http://trac.mapnik.org/wiki/MapnikRenderers#Cairographics Cairo] rendering backend - thanks Tom!\r\n\r\n * XML [http://svn.mapnik.org/trunk/docs/api_docs/python/mapnik-module.html#load_map_from_string from a string] - wicked nice Jonb\r\n \r\n * Support for [http://trac.mapnik.org/wiki/RasterSymbolizer raster composing modes] targeted at hillshading - Nice Marcin!\r\n\r\n * Tons of [PluginArchitecture new plugins] - OSM (nick), Oracle, OGR, SQlite (kunitoki)\r\n\r\n * Big improvements to [UsingScons SCons] - experience it for yourself and build it :) (Thanks jbronn for the boost help)\r\n\r\n * In memory [http://trac.mapnik.org/ticket/192 PointDatasource ] for dynamically drawing geometries - lwu rocks!\r\n\r\n * Love for the OgcServer - thanks xcacou, tmcw, and theo - it works with OSM xml, WMS 1.3.0, and a whole lot more.\r\n\r\n * We've got FontSet support (fallback fonts) from Beau- nice stuff\r\n \r\n * [http://trac.mapnik.org/ticket/117 ProjTransform] exposed by Artem in python. Now you can transform bbox's between projected systems.\r\n\r\n * Mapnik is faster (#156) with projections and PostGIS (#139,#140,#141) thanks to the genius of Rcoup\r\n\r\n * Map buffers to avoid cut labels - thanks Artem!\r\n\r\n * Transparent Point Symbolizers - good stuff Brian!\r\n\r\nFor a full list of major changes see the 0.6.0 Changelog wiki:Release0.6.0\r\n\r\n","state":"open"},"closed_at":"2011-10-11T15:58:42Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"},"html_url":"https://github.com/artemp/mapnik/issues/127","labels":[{"name":"Core_Library","url":"https://api.github.com/repos/artemp/mapnik/labels/Core_Library","color":"FFFFFF"}],"state":"closed"},"legacy":{"issue_id":1877137,"comment_id":2365416}}