Select to view content in your preferred language

change lenght rectangle

1621
10
10-19-2016 02:47 PM
MaximeGuillois
Deactivated User

Hi,

I've rectangle and I want them to have a new lenght. the lenght is in the attribut table. is it possible ?

For exemple the actual lenght is 120cm and I want them to be 150cm.

0 Kudos
10 Replies
DanPatterson_Retired
MVP Emeritus

It would be quicker to do the fix in an edit session than to provide a script solution

0 Kudos
MaximeGuillois
Deactivated User

I didn't explain well, sorry.

I have drone data: DEM and orthomosaic. I'm working on a way to make stratigraphic column thanks ti this data.

So I have a shape (rectangle) divided according to geological layers. I've then calculated the length of each rectangle to have the thickness of the layer. But this thickness is nt the real one so with trigonmetry and with slope I have calculated the real thickness of each layers.for example a layer of 120 cm is in reality 150cm thick.

In order to visualize the stratigraphic colum I want to have rectangle with the length of the real thickness.

0 Kudos
DanPatterson_Retired
MVP Emeritus

well you still can't stretch it, but you can calculate its area or length by applying geometry... so I am not sure what you need... to make it physically bigger or to recalculate the appropriate lengths given geometry

0 Kudos
MaximeGuillois
Deactivated User

to make it bigger. actually it's 120cm I've calculated it should be 150cm. how to make it 150cm length.

0 Kudos
DanPatterson_Retired
MVP Emeritus

There is no too that will make a rectangle longer on one axis other than editing the geometry manually or constructing the geometry from a set of points

0 Kudos
DarrenWiens2
MVP Honored Contributor

Can you provide a simple image of what you have and what you want?

0 Kudos
MaximeGuillois
Deactivated User

Here the table,

0 Kudos
DanPatterson_Retired
MVP Emeritus

Is the ratio of real thickness to thickness the same? What results do you get for those since there is no point in stretching a polygon unless it is so?  And in your case you would only need to calculate the new end of a line in a cumulative manner then use a buffer each segment using a square-end buffer once you have those

ADDENDUM

 using numpy to expedite the process and looking at your first four... there is no obvious discernal communality between observed and measured.

a
array([1103,  897,  232,  238])
>>> b
array([1492, 1267,  386,  330])
>>> a/b
array([ 0.739,  0.708,  0.601,  0.721])
>>> b/a
array([ 1.353,  1.412,  1.664,  1.387])
>>> a-b
array([-389, -370, -154,  -92])
>>> (a-b)/a
array([-0.353, -0.412, -0.664, -0.387])
0 Kudos
MaximeGuillois
Deactivated User

Thank for your help:

1- The ratio in not the same, it's calculated according to the slope mean for each layer. cf last picture

Thanks to trigonometry i can guess the real thickness according to the slope. 

0 Kudos