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.


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


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 “”

'Author: Ianko Tchoukanski
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

looks promising but it is not working

Thank you and greetings Peter