Skip to main content
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)

  • February 25, 2022
  • 11 replies
  • 22 views

ladisrikanta123
Participant
Forum|alt.badge.img

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

redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3700 replies
  • February 25, 2022

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


ladisrikanta123
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • 27 replies
  • February 28, 2022

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


redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3700 replies
  • February 28, 2022

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.


ladisrikanta123
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • 27 replies
  • February 28, 2022

@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

 


redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3700 replies
  • February 28, 2022

@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.


ladisrikanta123
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • 27 replies
  • February 28, 2022

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 😑


redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3700 replies
  • February 28, 2022

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.


ladisrikanta123
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • 27 replies
  • February 28, 2022

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?

 


redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3700 replies
  • February 28, 2022

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.


ladisrikanta123
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • 27 replies
  • March 2, 2022

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

 


redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3700 replies
  • March 2, 2022

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.