Skip to main content
Hi There,

 

 

I have a set of lines I want to 'fit'/shrink into another object's bounding box.

 

Both features have the same LL coord.

 

I have tried the RubberSheeter and AffineWarper, but the result is just rotated.

 

 

Any help would be appreciated.

 

 

Itay

 

Hi Itay,

 

 

I would try to calculate the difference in size ratios between the BBox and bounding box of the lines you want inside, then send the lines to the Scaler.

 

 

Could that work?

 

 

David
Hi David,

 

 

Yes it should, well  according to the docs it should, but when applying it I get a shift of the objects and not smaller objects.

 

 This is because the objects are not near the 0,0 point of the coordsys (again as stated in the documentation).

 

 

Do you know of any other way to "shrink" objects?

 

 

Itay

 

 


The AffineWraper is the right tool for this, unfortunately some of the features fail with an error message about the transformer  missing the minimal 4 control features needed. Any ideas on how to check and make sure all mecessary  inputs are available?
Hi Itay,   As David mentioned, I also think the Scaler can do that. But it will be necessary to move the coordinate system, so that the origin matches with left-bottom of the bounding box.   In other words, offset the target geometry before / after scaling. offset (-xmin, -ymin) --> scale --> offset (+xmin, +ymin).

 

(-xmin, -ymin) is left-bottom of the bounding box.

 

How's this?   Takashi
typo... orz

 

(xmin, ymin) is left-bottom of the bounding box
Hi Takashi,

 

 

Thanks for the explanation on how to use the scaler.

 

I have now the AffineWraper working and all of my features are being processed.

 

 

With a little help from FMEpedia (PDFTextMapper).

 

 

Itay

Reply