Skip to main content

Hi

 

using the Mapnikrasterizer and trying to zoom to a particular set of features (or area) befor creating an image with the input datasets.

 

 

For example (and keeping it very basic for now), suppose two datasets are being fed into the Mapnikrasterizer:

 

Dataset1 covers an entire State/County...whatever jurisdiction.

 

Dataset2 is a polygon and only partly covers part of the jurisdiction.

 

 

WITHOUT CLIPPING the data from Dataset1, can Dataset2 be used to manage the extent of the contents such the the final image produced by Mapnikrazterizer is limited to the extents (or thereabouts) of Dataset2?

 

 

If tried using the BoundingBoxAccumulator, BoundsExtractor, Bounding Boxreplacer and 2D Box Replacer to mange the extent but they don't appear to have any affect.

 

 

Grateful for any feeback

CC

Hello,

 

 

I think all the data that enters the transformer needs to be clipped in this case for the 'use input data ground extents' to work. Ive found though, that another option is to clip the output raster.

 

 

In both cases I would use a boundingboxaccumulator with a scaler to make it slightly larger so it doesnt look odd.

 

 

Owen

I have had a similar issue using the "specify ground extents", even with the ground extents of a sub set area of the dataset Mapnik renders the whole dataset. Clipping data adds time to the processing and I would rather be able to render out a sub set area of interest similar to how Mapnik in code works.

Any one know if this is a bug?


Hello,

 

 

I think all the data that enters the transformer needs to be clipped in this case for the 'use input data ground extents' to work. Ive found though, that another option is to clip the output raster.

 

 

In both cases I would use a boundingboxaccumulator with a scaler to make it slightly larger so it doesnt look odd.

 

 

Owen
I actually think this is a bug, as the mapnik code will allow for controlling the extents of the map without clipping the data. Also some times it works sometimes it doesnt, it appears from my experiments that its either to do with the number of datasets being used or the type of renderer, need to experiment more and get back to Safe on it.

 

 


I actually think this is a bug, as the mapnik code will allow for controlling the extents of the map without clipping the data. Also some times it works sometimes it doesnt, it appears from my experiments that its either to do with the number of datasets being used or the type of renderer, need to experiment more and get back to Safe on it.

 

 

I've observed similar, with simple examples I can get the raster extents to match those in the specify ground extents options, but once there are more inputs into the raster it appears they are ignored.

 


I actually think this is a bug, as the mapnik code will allow for controlling the extents of the map without clipping the data. Also some times it works sometimes it doesnt, it appears from my experiments that its either to do with the number of datasets being used or the type of renderer, need to experiment more and get back to Safe on it.

 

 

@markoI have a feeling it is related to the order that the features enter the transformer. If the extents are only defined by one input out of many then depending on when that input enters the transformer determines whether the extents are actually used. Which is why the results don't seem consistent

 


Reply