Skip to main content

In the MapnikRasterizer settings, in the Raster Properties section, it is necessary to specify the number of columns and rows of the output raster. 

 

When I enter this information manually, there is no problem.

 

When I want these parameters to be filled in dynamically, i.e. using the number of columns and rows of the input raster (using a RasterPropertyExtractor beforehand to access the attributes), I get this error message:

"MapnikRasterizer_2 (MapnikFactory): No values were specified for either NUM_ROWS and NUM_COLUMNS, or SPACING. One or the other must be specified

MapnikRasterizer_2 (MapnikFactory): A fatal error has occurred. Check the logfile above for details

AttributeManager_OUTPUT_-1_84_Player (RecorderFactory): A fatal error has occurred. Check the logfile above for details

A fatal error has occurred. Check the logfile above for details".

 

The number of columns and rows in the input raster are 32 bit unsigned integer. When I converted it to 64 bit integer via the Attribute Manager and the arithmetic calculator, it doesn't change anything, I still get the same error message.

 

However, if I create user parameters by manually entering the number of columns and rows in them. And then I assign these user parameters to the raster via AttributeManager (the parameters are in 64 bit integer). And finally, I assign these new attributes in a "dynamic" way as parameter values for the number of columns and rows of the raster in the output that WORKS.

 

In the end, I still find myself manually modifying the number of columns and rows of the output raster each time the input raster is modified.

 

Do you have an explanation/solution?

 

Thank you.

 

 

https://community.safe.com/s/question/0D54Q000080hIjKSAU/mapnikrasterizer-cell-spacing-from-attribute

 

A FeatureMerger should be used, which allows the number of columns and rows in the raster to be added to the feature set (used as input to MapnikRasterizer).


https://community.safe.com/s/question/0D54Q000080hIjKSAU/mapnikrasterizer-cell-spacing-from-attribute

 

A FeatureMerger should be used, which allows the number of columns and rows in the raster to be added to the feature set (used as input to MapnikRasterizer).

@bdel​ Were you able to successfully add the rows and columns dynamically by using the FeatureMerger?


@bdel​ Were you able to successfully add the rows and columns dynamically by using the FeatureMerger?

Yes @daraghatsafe​ that way it worked !

So as an input to MapnikRasterizer, I had :

  • One feature in raster format (with the number of columns and rows)
  • Multiple features in a vector format

Beforehand, I used a FeatureMerger to add to all features in a vector format the attributes number of columns and rows of my input raster.


@bdel​ Were you able to successfully add the rows and columns dynamically by using the FeatureMerger?

Hi @bdel​ that is great to hear glad that you were able to solve the problem.


Reply