Skip to main content
10000+ Posts
Question of the Week: Separating Straight from Curved

ThisΒ weekΒ IΒ lookedΒ atΒ thisΒ questionΒ onΒ theΒ community.Β "IΒ haveΒ aΒ 100Β ftΒ lineΒ thatΒ curvesΒ andΒ thenΒ turnsΒ backΒ intoΒ aΒ straightΒ line.Β HowΒ canΒ IΒ useΒ FMEΒ toΒ onlyΒ gatherΒ theΒ straightΒ lineΒ afterΒ theΒ curveΒ only.Β IΒ basicallyΒ wantΒ toΒ cutΒ outΒ theΒ curveΒ andΒ onlyΒ grabΒ theΒ lineΒ afterΒ theΒ curve."Β ThisΒ isn'tΒ tooΒ difficult,Β butΒ what'sΒ interestingΒ isΒ theΒ contrastΒ withΒ lastΒ week'sΒ question.Β LastΒ weekΒ (clickΒ theΒ linkΒ toΒ checkΒ itΒ out)Β IΒ tookΒ aΒ linearΒ featureΒ likeΒ this,Β createdΒ aΒ listΒ ofΒ itsΒ vertices,Β andΒ processedΒ thoseΒ numbersΒ directly.Β ThisΒ weekΒ IΒ couldΒ doΒ theΒ same,Β butΒ insteadΒ I'mΒ goingΒ withΒ aΒ spatialΒ approach.Β InΒ short,Β I'mΒ goingΒ toΒ divideΒ theΒ lineΒ intoΒ two-partΒ segments,Β calculateΒ eachΒ segment'sΒ angleΒ (bearingΒ orΒ azimuth),Β andΒ testΒ howΒ muchΒ eachΒ segmentΒ differsΒ fromΒ theΒ previousΒ one.Β PreparingΒ theΒ DataTheΒ firstΒ stepΒ isΒ toΒ prepareΒ ourΒ dataΒ byΒ choppingΒ itΒ intoΒ two-pointΒ lines.Β TheΒ alternativeΒ isΒ toΒ justΒ extractΒ theΒ coordinatesΒ andΒ workΒ onΒ themΒ (asΒ IΒ didΒ lastΒ week)Β butΒ thisΒ timeΒ it'sΒ justΒ thatΒ bitΒ easierΒ