Skip to main content
Question

Basic clipping rasters from vectors


Hello,

I was wondering if anyone could help me with this clipping operation? I am trying to clip a jp2 raster image from a county border(vector image). I created a buffer around the county border and used that as the clipper and used the jp2 as the clippee. I'm not really sure how to use the inside/outside part but I had the outside sent to the final writer output which I have as a png here. I did the same thing with a jp2 and it did not clip the image correctly. Any idea what I could be doing wrong here? I have attached my model. Thanks!

12 replies

erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • February 9, 2016

If you want the part of the JP2 inside the country border you need the INSIDE port connected to the writer.


  • Author
  • February 9, 2016

Thanks @erik_jan! I had tried that before but it keeps not processing when I have the inside set because it gives me this error when ran.

Clipper_SolidClipperFilter(TestFactory): Tested 1 input feature(s) -- 0 feature(s) passed and 1 feature(s) failed

Any idea what could cause this?

Thanks!!!


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • February 9, 2016

Are both datasets (country border line and JP2 raster) in the same coordinate system?

If not, you need to reproject one (or both) to get them in the same coordinate system.

You can use the Reprojector transformer to do that.

To check the coordinate system information you can load both datasets in the Data Inspector tool.


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • February 9, 2016

A good explanation of using the Clipper on raster data is found here:

raster_clipping


  • Author
  • February 9, 2016
clipping2.fmw@erik_jan

Thanks for all this information, I greatly appreciate your help! This is what I was looking for earlier. I reprojected both datasets and used the inside and it ran however still not getting the output I would like with it clipped. Any idea if changing the parameters would make a difference? Like changing the clipper type maybe? I have attached what I have right now. Any help is appreciated!!


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • February 9, 2016
diggs12 wrote:
clipping2.fmw@erik_jan

Thanks for all this information, I greatly appreciate your help! This is what I was looking for earlier. I reprojected both datasets and used the inside and it ran however still not getting the output I would like with it clipped. Any idea if changing the parameters would make a difference? Like changing the clipper type maybe? I have attached what I have right now. Any help is appreciated!!

I can not yet download the fmw. I am asking Safe for help on that and will try to answer as soon as possible.


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • February 9, 2016
diggs12 wrote:
clipping2.fmw@erik_jan

Thanks for all this information, I greatly appreciate your help! This is what I was looking for earlier. I reprojected both datasets and used the inside and it ran however still not getting the output I would like with it clipped. Any idea if changing the parameters would make a difference? Like changing the clipper type maybe? I have attached what I have right now. Any help is appreciated!!

Could you send me the fmw at Erik.Bodewitz@Spatilabiz.com


takashi
Influencer
  • February 9, 2016

I cannot find any wrong thing in your workspace. If you inspect the Clipper polygons and the raster with FME Data Inspector, do they overlap definitely?


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • February 9, 2016
takashi wrote:

I cannot find any wrong thing in your workspace. If you inspect the Clipper polygons and the raster with FME Data Inspector, do they overlap definitely?

@takashi How did you manage to see the workspace? I can not download the fmw!


takashi
Influencer
  • February 9, 2016
erik_jan wrote:

@takashi How did you manage to see the workspace? I can not download the fmw!

@erik_jan, try Right-click > Save As. I'm using Chrome.


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • February 9, 2016
takashi wrote:

@erik_jan, try Right-click > Save As. I'm using Chrome.

After installing Chrome I can see the file. Seems to be a MS Edge issue.


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • February 10, 2016

@diggs12 As I replied in the mail, I think it is the GeometricBufferer. Could you replace that with a Bufferer transformer?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings