AnsweredAssumed Answered

rotate by field

Question asked by peterverst on Mar 6, 2015

Good day

I have a road layer and a point layer representing villages. The points need to become villages.

roadandcity.JPG

with same tools (buffer, random points tool, etc) I have this so far:

stad2.JPG

Looks about right but..

-is it possible to have same random on the square width and length?

-is it possible to have the houses align to the roads?

          So far i was looking at script by ET geo wizards “polygon_rotate_byFieldValues.cal”

'=========================
'polygon_rotate_byFieldValues.cal
'Author: Ianko Tchoukanski
'http://www.ian-ko.com
'=========================
Dim pPolygon As IPolygon
dim pArea As IArea
Dim pOrigin As IPoint
Dim dAngle As Double
Dim pTransform As ITransform2D
Dim Pi as Double
Dim sAngleField
'=======================
'adjust the value below
sAngleField = [Angle]
'=======================
Pi = 4 * Atn(1)
If (Not IsNull([Shape])) Then
  Set pPolygon = [Shape]
  dAngle = sAngleField*Pi/180
  If (Not pPolygon.IsEmpty) Then
    Set pArea = pPolygon
    Set pOrigin = pArea.Centroid
    Set pTransform = pPolygon
    pTransform.Rotate pOrigin, dAngle
  End If
End If
__esri_field_calculator_splitter__
pPolygon

looks promising but it is not working

Thank you and greetings Peter

Outcomes