{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Class: DataSeriesUtil","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":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/readme"},"children":["API"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit"},"children":["geotoolkit"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit.data"},"children":["data"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit.data.dataseriesutil"},"children":["DataSeriesUtil"]}," / DataSeriesUtil"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"class-dataseriesutil","__idx":0},"children":["Class: DataSeriesUtil"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit.data"},"children":["data"]},".",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit.data.dataseriesutil"},"children":["DataSeriesUtil"]},".DataSeriesUtil"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Provides a set of methods to operate with ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.data.dataseries.dataseries"},"children":["DataSeries"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"table-of-contents","__idx":1},"children":["Table of contents"]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Constructors"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.data.dataseriesutil.dataseriesutil#new-dataseriesutil"},"children":["new DataSeriesUtil()"]}]}]}]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Methods"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.data.dataseriesutil.dataseriesutil#mergevalues"},"children":["mergeValues"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.data.dataseriesutil.dataseriesutil#trimvalues"},"children":["trimValues"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"contents","__idx":2},"children":["Contents"]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Constructors"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"new-dataseriesutil","__idx":3},"children":["new DataSeriesUtil()"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["new DataSeriesUtil"]},"()"]}]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Methods"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"mergevalues","__idx":4},"children":["mergeValues"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Static"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["mergeValues"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["src"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dst"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Merge data series from source to destination"," ","This function works ONLY if the existing data is ASC ordered."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"Depth       Value\n50           0\n100          1\n200          2\n300          3\n\nmergeValues: [0,100,150,500], [-1,-100,-150,-500]\n\n----     Depth       Value\n===>       0           -1\n----      50            0\n===>      100         -100\n===>      150         -150\n----      200           2\n----      300           3\n===>      500         -500\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Throws"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["if src.index or dst.index is not ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.data.numericaldataseries.numericaldataseries"},"children":["NumericalDataSeries"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters","__idx":5},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Name"},"children":["Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"Description"},"children":["Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["src"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit.data.dataseriesutil.dataseriesutil#source"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Source"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["object to represent source data"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dst"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit.data.dataseriesutil.dataseriesutil#destination"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Destination"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["object to represent destination data"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns","__idx":6},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"trimvalues","__idx":7},"children":["trimValues"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Static"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["trimValues"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["indexSeries"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["startIndexValue"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["endIndexValue"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["arrayOfSeries"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["datatable?"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Remove values from start to end value of the index series and corresponded indices of the other series."," ","All series must have the same size."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Throws"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["if indexSeries is not ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.data.numericaldataseries.numericaldataseries"},"children":["NumericalDataSeries"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-1","__idx":8},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Name"},"children":["Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"Description"},"children":["Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["indexSeries"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.data.numericaldataseries.numericaldataseries"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NumericalDataSeries"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["series to represent index data"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["startIndexValue"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["start value of the index series where to start trim"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["endIndexValue"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["end value of the index series where to end trim"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["arrayOfSeries"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.data.dataseries.dataseries"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DataSeries"]}]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["any"]},">[]"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array of data series"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["datatable"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.data.datatable.datatable"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DataTable"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["optional data table as a host of destination series"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-1","__idx":9},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]}]}]},"headings":[{"value":"Class: DataSeriesUtil","id":"class-dataseriesutil","depth":1},{"value":"Table of contents","id":"table-of-contents","depth":2},{"value":"Contents","id":"contents","depth":2},{"value":"new DataSeriesUtil()","id":"new-dataseriesutil","depth":4},{"value":"mergeValues","id":"mergevalues","depth":4},{"value":"Parameters","id":"parameters","depth":4},{"value":"Returns","id":"returns","depth":4},{"value":"trimValues","id":"trimvalues","depth":4},{"value":"Parameters","id":"parameters-1","depth":4},{"value":"Returns","id":"returns-1","depth":4}],"frontmatter":{"seo":{"title":"Class: DataSeriesUtil"}},"lastModified":"2026-02-11T19:54:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/geotoolkit/apis/classes/geotoolkit.data.dataseriesutil.dataseriesutil","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}