Skip to main content
Question

Transform local coordinate system using feature's bounding box center as origin


alexlynch3450
Contributor
Forum|alt.badge.img+14

Hello All,

I apologize if I am not making much sense, as I am new to 3d modeling.

I am having trouble trying to think of solution. I want to take spatial-vector data and output to local coordinate system. The local coordinate system, ideally, would be constraint to min and max extents of: -1m, -1m, 0.5m & 1m, 1m, 0.5m.

Right now, I am getting values larger than min and max extent when using localcoordinatesystemsetter X CommonLocalReprojector. I am not sure what I can do to equalize each x-, y-values in order to scale appropriately. Nor find transformer that I can input area-extent as min/max extent constraint. I am sure there is a mathematical formula, but am lost.

 

For example,

point-1_Local = -7.5403653628193155, -5.638463266998554, 0.5

point-1_LocalConstraint ~= -0.4817, -0.504, 0.5

 

point-2_Local = 7.502099056082192, 5.551721092860062, 0.5

point-2_LocalConstraint ~= 0.8439, 0.828, 0.5

 

2 replies

jakemolnar
Forum|alt.badge.img

local_scale_example.fmw.zip

In case you want to have fine-grained control, here's a workspace that accumulates the 3D bounds of a dataset, moves features to the origin, scales each of the dimensions, and applies a final offset.

You could do this with a single 3DAffiner too, but this is easier to explain the steps.

This workspace is controlled by published parameters with defaults set to your specifications:

X_SCALE: 2 (the distance between -1 and 1)

Y_SCALE: 2 (the distance between -1 and 1)

Z_SCALE: 0 (the distance between 0.5 and 0.5)

X_OFFSET: 0 (features centered on x=0)

Y_OFFSET: 0 (features centered on y=0)

Z_OFFSET: 0.5 (features centered on z=0.5)

 


alexlynch3450
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • March 17, 2020
jakemolnar wrote:

local_scale_example.fmw.zip

In case you want to have fine-grained control, here's a workspace that accumulates the 3D bounds of a dataset, moves features to the origin, scales each of the dimensions, and applies a final offset.

You could do this with a single 3DAffiner too, but this is easier to explain the steps.

This workspace is controlled by published parameters with defaults set to your specifications:

X_SCALE: 2 (the distance between -1 and 1)

Y_SCALE: 2 (the distance between -1 and 1)

Z_SCALE: 0 (the distance between 0.5 and 0.5)

X_OFFSET: 0 (features centered on x=0)

Y_OFFSET: 0 (features centered on y=0)

Z_OFFSET: 0.5 (features centered on z=0.5)

 

YOU NAILED IT! Thank you very much!


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