{"comment":{"created_at":"2011-10-09T20:32:17Z","body":"[podolsir] Well... While minimizing the number operations like reprojections improves the performance and readability and is therefore worthwhile in its own right, is doesn't solve the underlying core problems that come with floating point numbers -- it only alleviates them in some cases.\r\n\r\nEnvelopes and coordinates and other floats come to mapnik from all kinds of sources, and they can be subject to any number of operations that can introduce rounding errors and are out of control of mapnik or even the mapnik caller. For example, the envelopes of tiles for the OSM map are computed on the fly from the single bounding box the user inputs. So problems like these will still occur rarely and unpredictably even if they don't anymore in this particular case.\r\n\r\nI still think that introducing a proper float comparison is the way to go. \r\n\r\nDon't get me wrong: your patch still improves the map processing - but it addresses a different aspect :) As to the patch itself, I looked at it for an half an hour now and checked whether it actually does the same thing as the old code, and I think it's good. One minor thing, though: the variables {{{lx0}}}, {{{ly0}}} and so on seem a little bit misnamed now, as the {{{l}}} stood for layer and you're now storing the ''map'' bbox in them. It is quite irritating when reading the new code, at least for me.","updated_at":"2011-10-09T20:32:17Z","url":"https://api.github.com/repos/artemp/trac2github/issues/comments/2339903","id":2339903,"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":403,"created_at":"2011-10-09T20:32:12Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"See attached python script to reproduce. Basically, I create a PointDatasource, add several points with longitude/latitude coordinates to it and attach it to a layer with appropriate projection setting ('+proj=latlon +datum=WGS84'). Then I try to render a map with this layer. Depending on the map projection setting, one or more points get lost.\r\n\r\nIn an ordinary mercator projection ('+proj=merc +datum=WGS84 +k=1.0 +units=m +over +no_defs'), reproducibly the southernmost point vanishes. In fact, I can work around the problem by setting an invisible 'dummy' point south of the area of interest.\r\n\r\nIn UTM, additionally the westernmost point disappears.\r\n\r\nOn the other hand, a map in \"Google\" spherical mercator projection displays all points. So does a simple latlon map where no reprojection is necessary.\r\n\r\nReading the same points from a shapefile works for all these output projections.","comments":10,"title":"Some points from PointDatasource get lost on reprojection","updated_at":"2011-10-09T20:32:19Z","url":"https://api.github.com/repos/artemp/trac2github/issues/403","id":1858626,"assignee":null,"milestone":{"number":13,"created_at":"2011-10-09T19:01:26Z","due_on":"1970-01-01T09:21:56Z","title":"Mapnik 2.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/trac2github/milestones/13","open_issues":1,"closed_issues":43,"description":"Upcoming Mapnik 2 release (first in series)\r\n\r\nMajor new features:\r\n\r\n  * Expressions support ( dynamic/data-driven symbolizers - #359, #70,#352)\r\n  * SVG Symbol support, including Gradients\r\n  * \"!MetaWriters\": Support for outputting GeoJSON of rendered features (see: MetaWriter)\r\n  * Python3 support (wiki:Python3k)\r\n  * Better raster scaling methods like lanczos, cubic, and higher quality bilinear (#656)\r\n  * New RasterColorizer for color ramping data rasters\r\n  * Support for \"interior\" placement of points and labels (aka point_on_surface) #709\r\n  * Performance improvements under high concurrent load (avoidance of proj4 locking)\r\n  * Addition of a 'mapnik-config' program to query mapnik settings\r\n  * Support for XInclude in stylesheets: #567 ([http://trac.mapnik.org/browser/trunk/tests/data/good_maps/xinclude examples])\r\n  * New plugins: Rasterlite, GEOS, templates/hello_world\r\n  * NUmerous improvements to alpha blending in raster support\r\n  * New usage of boost::spirit 2 for parsing (colors, filters, expressions)\r\n    * This means much 'slower' compiles but faster runtime code\r\n  * Addition of Jpeg reader for reading jpeg symbols and jpeg datasources (in raster.input)\r\n  * Advanced MarkersSymbolizer drawing options\r\n  * memory_datasource support in python (dynamic creation of features)\r\n  * Support for the clang++ compiler\r\n  * Fractional text halos using Freetype2 Stroker\r\n  * Ability to align pattern fills globally (#203)\r\n  * Vastly improved builds on Open Solaris\r\n  * Support for .dbf files over 2GB (#595)\r\n  * Support for triggering line breaks with '\\n' character (#584)\r\n  * Symbols are lazily cached instead of being read from filesystem many times\r\n  * Features are cached when used in more than one style consecutively (optional feature)\r\n  * Added ability to pass scale factor to renderer to scale symbols, fonts, line widths\r\n  * OGCServer removed from source tree, now at https://github.com/mapnik/OGCServer with many bugfixes: \r\n  * WKT parser\r\n\r\nFollowing features will be addressed in subsequent releases:\r\n \r\n  * Polygon hatch fills (#642)\r\n  * Map orientation\r\n  ","state":"open"},"closed_at":null,"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/trac2github/issues/403","labels":[{"name":"Core_Library","url":"https://api.github.com/repos/artemp/trac2github/labels/Core_Library","color":"FFFFFF"}],"state":"open"},"legacy":{"issue_id":1858626,"comment_id":2339903}}