Hi,
I want to cut a raster with shp file, and the result raster will have the extent of the clipper's instead of the clippee's. (consider null or nodata as filled up)
Hi,
I want to cut a raster with shp file, and the result raster will have the extent of the clipper's instead of the clippee's. (consider null or nodata as filled up)
Not sure I fully understand, but is it perhaps the RasterTiler that you are looking for?
Not sure I fully understand, but is it perhaps the RasterTiler that you are looking for?
When I clip a raster with shp polygon, I want the raster will take the polygon extend if there are places the raster it was not covered, then the result can be filled up with 0.
If you can understand me better now.
The Clipper transformer should be able to do that. Shape as Clipper, raster as Clippee, output from Inside (or in older versions Clipped_Inside.
Make sure both data sets are in the same coordinate system.
Use the clipper, make sure Preserve Clippee Extents is set to No. You can explicitly set the NoData value before hand by using the RasterBandNoDataSetter, if you don't it defaults to 0
Does this screenshot illustrate your requirement?
Two green checkerboards are original rasters, and red squares represent the extents of resulting rasters i.e. clippers' extents.
Does this screenshot illustrate your requirement?
Two green checkerboards are original rasters, and red squares represent the extents of resulting rasters i.e. clippers' extents.
Assuming that the clippers (tiles) have column index and row index which can be used to identify each tile.
I have similar problem.
I want to clip a raster (MDT=1 band) -generated from 2 asc files (no problem)- to many tif tiles following exact coordinates extracted from a shapefile. If tiles are smaller than the extend of shape, they should be filled with any value but the tfw of tiles should be exactly the same the coordinate of the clipper (shape).
When I appy Clipper tranformer, the coordinates are not exactly the same of the shape. When I add also Mapnik Rasterizer, the results are tiles on coordinates ok following the shape, but they are RGB type and no data values in all the tiles (empty tiles). In attachment the model. thanks
mosaico.jpg
mosaic-clip.fmw
Hello,
I have a similar problem but I havent solved it yet.
I have a raster 1 band extracted from asc files (no problem). I want to tile it in different tiles following coordinates extended of a shapefile. If the tiles dont cover the shape extend they should be filled with any value but the coordinates should be the same than the shapefile (clipper).
If I apply only Clipper tranformer the tiles are ok but the coordinates extend dont follow the shape extend because the tiles are smaller and dont fill the no data.
If I also add Mapnik rasterizer the coordinates of tiles are ok but the tiles are RGB and empty.
Many thanks!
mosaico.jpg
Hello,
I have a similar problem but I havent solved it yet.
I have a raster 1 band extracted from asc files (no problem). I want to tile it in different tiles following coordinates extended of a shapefile. If the tiles dont cover the shape extend they should be filled with any value but the coordinates should be the same than the shapefile (clipper).
If I apply only Clipper tranformer the tiles are ok but the coordinates extend dont follow the shape extend because the tiles are smaller and dont fill the no data.
If I also add Mapnik rasterizer the coordinates of tiles are ok but the tiles are RGB and empty.
Many thanks!
mosaico.jpg
clip-raster-demo.fmwt (FME 2018.0.1.1)
Hello,
I have a similar problem but I havent solved it yet.
I have a raster 1 band extracted from asc files (no problem). I want to tile it in different tiles following coordinates extended of a shapefile. If the tiles dont cover the shape extend they should be filled with any value but the coordinates should be the same than the shapefile (clipper).
If I apply only Clipper tranformer the tiles are ok but the coordinates extend dont follow the shape extend because the tiles are smaller and dont fill the no data.
If I also add Mapnik rasterizer the coordinates of tiles are ok but the tiles are RGB and empty.
Many thanks!
mosaico.jpg
clip-raster-demo.fmwt (FME 2018.0.1.1)
data.zip
clip-raster-demo.fmwt (FME 2018.0.1.1)
Then, remove the RasterBandNodataSetter from the workflow.
clip-raster-demo.fmwt (FME 2018.0.1.1)
Also make sure to have the same value for the Group By attritube on both raster and clipper(s) if you use the clipper in Group By mode.
I believe my raster clip tutorial answers this exact question: https://youtu.be/K6F4jAozlVs