Hello,

I confirm, this works fine !

That's great !

As I don't use many values for my buffer, I will use this modified plugin
until 0.8.0 release.

In the worst case I can always use my 0.6.1 or modify the extra margin but I
don't think I'll need it.

Many thanks again !

Nicolas.


Dane Springmeyer wrote:
> 
> Nicolas,
> 
> I've created a ticket for this bug here: http://trac.mapnik.org/ticket/502
> 
> I certainly do agree vectors maps may require a map buffer, so  
> supporting it without introducing problems in the GDAL plugin is  
> important.
> 
> I would use your self-compiled 0.7.0 system and experiment with  
> placing an extra margin of pixels tolerance in the GDAL plugin code.  
> Something like the below was a quick test on my end that worked with  
> buffer_size=256 to side step the problem. We need to pass this  
> information dynamically (scale + buffer_size will be required ) but  
> the below should help in the meantime:
> 
> 
> Index: plugins/input/gdal/gdal_featureset.cpp
> ===================================================================
> --- plugins/input/gdal/gdal_featureset.cpp      (revision 1588)
> +++ plugins/input/gdal/gdal_featureset.cpp      (working copy)
> @@ -133,8 +133,8 @@
> 
>      if (width > 0 && height > 0)
>      {
> -      int im_width = int(q.resolution() * intersect.width() + 0.5);
> -      int im_height = int(q.resolution() * intersect.height() + 0.5);
> +      int im_width = int(q.resolution() * intersect.width() + 0.5 *  
> 1024);
> +      int im_height = int(q.resolution() * intersect.height() + 0.5 *  
> 1024);
> 
>         // case where we need to avoid upsampling so that the
>         // image can be later scaled within raster_symbolizer
> 
> 
> On Jan 26, 2010, at 1:07 AM, Nicolas Gillet wrote:
> 
>>
>> Hello Dane,
>>
>> Thank you for leading this search.
>>
>>> If you take away the map buffer_size your image should render
>>> correctly. Can you confirm this?
>>
>> Yes this solves the bug ! Great !
>>
>>> I cannot imagine any reason you need
>>> to use a buffer_size >0 for rendering raster images - can you remove
>>> this parameter or let me know why you are using it?
>>
>> I had hard-coded it long ago and forgot to move it to the XML since  
>> then.
>> I will of course change this ugly way to do.
>>
>> By the way, a buffer could be used in case you render tiles from a  
>> raster
>> background and add some more shape features above it like point of  
>> interest.
>> In that case, to avoid cut labels you might need to set a buffer.
>>
>>> So, your options to workaround this issue, for now, are to set the
>>> buffer_size = 0 or use the raster input plugin.
>>
>> Yes, I think that I will either use the 0.6.1 gad plugin or make a  
>> "smart"
>> system using either raster or gdal plugin depending on buffer_size  
>> value.
>>
>> Thank you again for this big help, I guess it has been tricky to  
>> find the
>> cause of the bug.
>>
>> Nicolas.
>> -- 
>> View this message in context:
>> http://old.nabble.com/Bug-in-gdal-plugin-in-0.7.0-tp27274892p27319674.html
>> Sent from the Mapnik - Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Mapnik-users mailing list
>> [email protected]
>> https://lists.berlios.de/mailman/listinfo/mapnik-users
> 
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Bug-in-gdal-plugin-in-0.7.0-tp27274892p27335606.html
Sent from the Mapnik - Users mailing list archive at Nabble.com.

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to