{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Deviation","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":true,"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"deviation","__idx":0},"children":["Deviation"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"introduction","__idx":1},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/deviation/overview/deviation#intro"},"children":["#"]}," Introduction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This overview describes the software architecture for Deviation.JS. The basic classes and methods designed to facilitate the implementation of deviated wells are described below.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"The class diagram is as follows:"]},{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/deviationclassdiagram.caace1c0d28738c880ba9ccc013f2a68fabbb9d08c20d59e85adeb503d605d41.745cc621.png"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"trajectory2d","__idx":2},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/deviation/overview/deviation#Trajectory2d"},"children":["#"]}," Trajectory2d"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Class ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["geotoolkit/deviation/Trajectory2d"]}," is used to define trajectory of a well that is not exactly vertical, azimuthal turn exists over a segment or segments of the planned well path. Trajectory contains MD- (measured depth), X- and Y-coordinates along itself. The class stores 2D coordinates internally and works in 2D space."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There are two ways in the class to create a trajectory instance:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Directly with constructor accepting arrays of X-, Y- and MD-values."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Indirectly with \"createTrajectory\" static method accepting arrays of MD-, inclinations- and azimuth-values (latter one is not supported currently). Other parameters are: \"rightDeviation\" - inclination direction in the right handed coordinate system, \"start\" - start index, \"filter\" - redundant points filtering flag, \"approximate\" - approximation flag"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Please refer to the following diagram:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["(Xi,Yi) represents a point in the trajectory."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["trajectory C.S is essentially DeviatedCompositeNode - instance's parent model space."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["'w' stand for 'trackwidth'"]}]},{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/deviation-trajectory.03117212836df5b81fd5b01c39e88e03e62b1348302e09f1a0de1f45130aa9a8.745cc621.png"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"deviatedcompositenode","__idx":3},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/deviation/overview/deviation#DeviatedCompositeNode"},"children":["#"]}," DeviatedCompositeNode"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Class ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["geotoolkit/scene/DeviatedCompositeNode"]}," extends CarnacJS ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["geotoolkit/scene/CompositeNode"]}," to accept deviation parameters via \"setDeviation\"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The method's parameters are:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["'trajectory' a geotoolkit/deviation/Trajectory2d instance (the only mandatory parameter)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["'transformer' - a geotoolkit/deviation/Transformer2d-derived class instance (default: geotoolkit/deviation/PiecewiseTransformer instance - see below)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["'trackWidth' - deviated track width (across trajectory) (default: 100)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["'offset' - position of trajectory inside deviated track (bended strip) for any point along the trajectory (default: 0)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The deviation set is applied to all child nodes."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"transformer2d","__idx":4},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/deviation/overview/deviation#Transformer2d"},"children":["#"]}," Transformer2d"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Interface ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["geotoolkit/deviation/Transformer2d"]}," declares the only method \"create\" that returns an instance of geotoolkit/deviation/DeviatedTransformation-derived class."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["DeviationJS library provides two Transformer2d implementations that handle trajectory information in a different ways:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["geotoolkit/deviation/TVDTransformer - trajectory's measured depth values are equal to the trajectory's Y-values"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["geotoolkit/deviation/PiecewiseTransformer - trajectory's measured depth values are equal to original 2D-space's Y-values"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"deviatedtransformation","__idx":5},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/deviation/overview/deviation#DeviatedTransformation"},"children":["#"]}," DeviatedTransformation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["geotoolkit/deviation/DeviatedTransformation is an abstraction to represent nonaffine transformation from a linear 2D-space to a deviated space (and backwards when possible)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Its methods are as follows:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["transforming methods - for a point, a line and a polyline"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["scaling information - for a particular 2D-point as well as general scale statistics (min/max/mean x- and y-scales)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["deviated area bounding information"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["a point containment verification"]}]}]},"headings":[{"value":"Deviation","id":"deviation","depth":1},{"value":"Introduction","id":"introduction","depth":3},{"value":"Trajectory2d","id":"trajectory2d","depth":3},{"value":"DeviatedCompositeNode","id":"deviatedcompositenode","depth":3},{"value":"Transformer2d","id":"transformer2d","depth":3},{"value":"DeviatedTransformation","id":"deviatedtransformation","depth":3}],"frontmatter":{"title":"Deviation","seo":{"title":"Deviation"}},"lastModified":"2026-02-11T19:54:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/geotoolkit/programmers-guide/architecture-overview/deviation","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}