Skip to main content
Question

Shrink / fit an object to another

  • December 6, 2013
  • 6 replies
  • 19 views

fmelizard
Safer
Forum|alt.badge.img+19
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

 

6 replies

david_r
Celebrity
  • December 6, 2013
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

fmelizard
Safer
Forum|alt.badge.img+19
  • Author
  • Safer
  • December 6, 2013
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

 

 


fmelizard
Safer
Forum|alt.badge.img+19
  • Author
  • Safer
  • December 6, 2013
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?

takashi
Evangelist
  • December 6, 2013
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

takashi
Evangelist
  • December 6, 2013
typo... orz

 

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

fmelizard
Safer
Forum|alt.badge.img+19
  • Author
  • Safer
  • December 7, 2013
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

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