Question

How can you show an attribute of a vector file in GeoTIFF? (For ex- if I have to show the road name in the GeoTIFF file How can I show it)


I have a shapefile of the road and I want to convert it into GeoTIFF But I want the GeoTIFF should show the road name


11 replies

Userlevel 5
Badge +25

You can try using an Labeller, FeatureColorSetter and then a VectorOnRasterOverlayer.

I have tried the labeler And I got the result I need but I need to create a new GeoTIFF file from the labeler result. and in the writer part it is occurring error

Userlevel 5
Badge +25

I have tried the labeler And I got the result I need but I need to create a new GeoTIFF file from the labeler result. and in the writer part it is occurring error

The original TIFF goes in the VectorOnRasterOverlayer as well, you should only get a single output raster.

@Hans van der Maarel​ Actually I have only a shapefile of the road with its attribute. So I am trying to convert the road names which I got from the labeler into GeoTIFF format.

Note- A GeoTIFF file which will show only the road name

 

Userlevel 5
Badge +25

@Hans van der Maarel​ Actually I have only a shapefile of the road with its attribute. So I am trying to convert the road names which I got from the labeler into GeoTIFF format.

Note- A GeoTIFF file which will show only the road name

 

Aha. In that case I think the ImageRasterizer is probably the easiest one to use. So Labeller -> FeatureColorSetter -> ImageRasterizer.

Aha. In that case I think the ImageRasterizer is probably the easiest one to use. So Labeller -> FeatureColorSetter -> ImageRasterizer.

Capture2I have used it already but the result is not coming what I am expecting 😑

Userlevel 5
Badge +25

Aha. In that case I think the ImageRasterizer is probably the easiest one to use. So Labeller -> FeatureColorSetter -> ImageRasterizer.

The number of rows/columns for your output raster refers to the # of pixels (so you're making a 2-by-2 pixel raster here), try increasing that.

Aha. In that case I think the ImageRasterizer is probably the easiest one to use. So Labeller -> FeatureColorSetter -> ImageRasterizer.

Capture3I have changed pixel size but the name is not coming. Do I need to add any other transformer?

 

Userlevel 5
Badge +25

Aha. In that case I think the ImageRasterizer is probably the easiest one to use. So Labeller -> FeatureColorSetter -> ImageRasterizer.

No, this is improvement. Check the result in Photoshop or something, the Visual Preview window can sometimes render rasters a bit funny depending on the zoom level.

Aha. In that case I think the ImageRasterizer is probably the easiest one to use. So Labeller -> FeatureColorSetter -> ImageRasterizer.

@Hans van der Maarel​ I have tried to render the raster but the result is not coming

 

Userlevel 5
Badge +25

Aha. In that case I think the ImageRasterizer is probably the easiest one to use. So Labeller -> FeatureColorSetter -> ImageRasterizer.

I think I've found it. You need to add a TextStroker before the FeatureColorSetter. You'll also need to experiment a bit with the size options you specify in the Labeller and TextStroker in combination with the pixel sizes in the ImageRasterizer.

Reply