{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["tabs","tab"]},"type":"markdown"},"seo":{"title":"Installation","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":"installation","__idx":0},"children":["Installation"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"installation-1","__idx":1},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gettingStarted#installation"},"children":["#"]}," Installation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Geotoolkit provides libraries to be able to leverage ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import"},"children":["ES6 import syntax"]}," and are located in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bin"]}," folder. This folder includes libraries as *.tgz files to be ready to install with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["npm"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["node_modules"]}," of your application."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["It is recommended to use tools such as ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://rollupjs.org"},"children":["rollup.js"]}," or ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://webpack.js.org/"},"children":["Webpack"]},", which allow bundling up all of your dependencies automatically and apply ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/web/fundamentals/performance/optimizing-javascript/tree-shaking/"},"children":["tree shaking"]}," of your code."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"import { Group } from '@int/geotoolkit/scene/Group';\nconst group = new Group();\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"using-geotoolkit-with-local-tgz-files","__idx":2},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gettingStarted#npm"},"children":["#"]}," Using GeoToolkit with local .tgz files"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you use .tgz files you can install GeoToolkit in node_modules with npm. The step below shows how to do it:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Modify the package.json to add the GeoToolkit path to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dependencies"]}," and run npm install."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"{\n    // ...\n    \"dependencies\": {\n        \"@int/impl\": \"file:./GeoToolkit.JS/bin/int-impl-{version}.tgz\",\n        \"@int/geotoolkit\": \"file:./GeoToolkit.JS/bin/geotoolkit-{version}.tgz\",\n        \"@int/geotoolkit3d\": \"file:./GeoToolkit.JS/bin/int-geotoolkit3d-{version}.tgz\"\n    }\n}\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Usage of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@int/geotoolkit3d"]}," classes require adding ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["three.js"]}," to the devDependencies, as detailed ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/carnac3d/overview/carnac3d#Requirements"},"children":["in this section"]}," ."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now you are ready to use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@int/geotoolkit"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@int/geotoolkit3d``classes"]}," classes in your TypeScript or JavaScript code."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"using-rollup-without-npm","__idx":3},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gettingStarted#rollup"},"children":["#"]}," Using Rollup without npm"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you have local installation of GeoToolkit you can create an alias. The step below shows how to do it:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Modify package.json add ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rollup"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rollup-plugin-import-alias"]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"{\n    \"devDependencies\": {\n        \"rollup-plugin-import-alias\": \"^1.0.6\",\n        \"rollup\": \"^1.10.0\"\n    }\n}\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create rollup.config.js and add ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["importAlias"]}," to folder with your geotoolkit modules."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"import path from 'path';\nimport importAlias from 'rollup-plugin-import-alias';\n\nexport default ({\n    plugins: [\n        importAlias({\n            Paths: {\n                '@int': path.resolve(__dirname, 'geotoolkit modules path')\n            }\n        })\n    ]\n});\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"using-webpack-without-npm","__idx":4},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gettingStarted#webpack"},"children":["#"]}," Using Webpack without npm"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you have local installation of GeoToolkit you can create an alias to GeoToolkit.JS modules. The step below shows how to do it:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create webpack.config.js and add ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["alias"]}," to folder with your geotoolkit modules."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"const path = __require_for_vite_Zhmx5e.default || __require_for_vite_Zhmx5e;\n\nmodule.exports = {\n    resolve: {\n        alias: {\n            '@int': path.resolve(__dirname, 'geotoolkit modules path')\n        }\n    }\n};\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"using-nodejs","__idx":5},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gettingStarted#NodeJS"},"children":["#"]}," Using NodeJS"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To support all features in NodeJS environment geotoolkit requires some additional libraries:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/jsdom/jsdom"},"children":["jsdom"]}]}," - implementation of DOM and HTML",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/Automattic/node-canvas"},"children":["Node canvas"]}]}," - Canvas implementation",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/xmldom/xmldom"},"children":["xmldom"]}]}," - implementation of DOMParser and XMLSerializer"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add them to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["package.json"]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"\"dependencies\": {\n    // ...\n    \"@xmldom/xmldom\": \"^0.8.1\",\n    \"jsdom\": \"^26.1.0\",\n    \"canvas\": \"^3.0.0\"\n    ...\n}\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The step below shows how to initialize these libraries for NodeJS:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"import '@int/geotoolkit/environment'\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"using-jest","__idx":6},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gettingStarted#Jest"},"children":["#"]}," Using Jest"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There are some known problems user can face using ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://jestjs.io/"},"children":["Jest"]}," test system:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["1. Need extra libraries like ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["canvas"]}," and ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["jsdom"]}," (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gettingStarted#NodeJS"},"children":["NodeJS"]}," section)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["2. Jsdom needs polifill for TextEncoder and TextDecoder, so add it to setup"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"import { TextEncoder, TextDecoder } from 'util';\n\nObject.assign(global, { TextDecoder, TextEncoder });\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["3. If Jest throws error like 'unexpected token' and points on an export keyword - follow Jest's advices: set transformer (e.g. ts-jest) and filter for it"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":" \"jest\": {\n    \"transformIgnorePatterns\": [\n      \"node_modules/(?!(@int))/\"\n    ]\n  },\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["4. To use setup file with TextEncoder workaround and toolkit's initializing for Node from ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gettingStarted#NodeJS"},"children":["NodeJS"]}," section, use dynamic import. Sample CRA setupTests.ts:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"import '@testing-library/jest-dom';\n\nimport fetchMock from \"jest-fetch-mock\";\nimport '@testing-library/jest-dom/extend-expect'\nimport { TextEncoder, TextDecoder } from 'util';\nimport 'jest-canvas-mock';\n\nObject.assign(global, { TextDecoder, TextEncoder });\nfetchMock.enableMocks();\n\nimport('@int/geotoolkit/environment');\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"using-npm-or-yarn","__idx":7},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gettingStarted#yarn"},"children":["#"]}," Using npm or yarn"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["GeoToolkit.JS can be used from npm repository ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["npm.int.com"]},". Get username and password from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["support@int.com"]}," and use it to register with npm"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NPM"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["How to set up @int registry:"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Log in with your credentials to @int scope"]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"npm login --registry https://npm.int.com --scope=@int\nnpm set registry https://npm.int.com --scope=@int\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Make sure that only @int scope is enabled for npm.int.com"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Edit .npmrc file of your project:"]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"registry=https://registry.npmjs.org/\n@int:registry=https://npm.int.com/\n//npm.int.com/:_authToken=\"WHATEVER_TOKEN_GENERATED_BY_NPM\"\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YARN"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Log in to the server using NPM steps described above (NPM section)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open or create .yarnrc file and modify it in the following way:"]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"always-auth=true\n@int:registry=https://npm.int.com/\n//npm.int.com/:_authToken=\"WHATEVER_TOKEN_GENERATED_BY_NPM\"\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Modify your project ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["package.json"]}," and dependencies section and add ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@int"]}," libraries"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"\"dependencies\": {\n    // ...\n    \"@int/impl\": \"{version}\",\n    \"@int/geotoolkit\": \"{version}\",\n    \"@int/geotoolkit3d\": \"{version}\",\n    // ...\n}\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["npm command to find available versions"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"npm view @int/geotoolkit versions\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"using-non-strict-dts-files","__idx":8},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gettingStarted#dts"},"children":["#"]}," Using non-strict d.ts files"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Constructors and method setProperties of each class support object in different format, mainly it is lowercase and camelCase. GeoToolkit.JS before version 4.0 was provided with d.ts files which have addition ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["| any"]},". It allows user to call these methods with any case (lower or camel). But because of this the programmer was forced to write code blindly, almost without prompts. Started from 4.0 all public API has been reviewed: we tried to avoid ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["any"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Function"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["object"]}," in public API. So when upgrading to 4.0, developers can get a lot of type errors. To make the update smoother we include 'non-strict' version of d.ts files."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To use this version add these lines to 'path' section of your tsconfig.json:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"main","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"\n// ...\n\"@int/geotoolkit/*\": [\"node_modules/@int/types/geotoolkit/*\"],\n\"@int/geotoolkit\": [\"node_modules/@int/types/geotoolkit\"],\n\"@int/geotoolkit3d/*\": [\"node_modules/@int/types/geotoolkit3d/*\"],\n\"@int/geotoolkit3d\": [\"node_modules/@int/types/geotoolkit3d\"]\n// ...\n\n","lang":"ts"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"references","__idx":9},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gettingStarted#References"},"children":["#"]}," References"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See also ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gettingStarted#/doc/index.html"},"children":["GeoToolkit API Reference"]}]}]}]},"headings":[{"value":"Installation","id":"installation","depth":1},{"value":"Installation","id":"installation-1","depth":3},{"value":"Using GeoToolkit with local .tgz files","id":"using-geotoolkit-with-local-tgz-files","depth":3},{"value":"Using Rollup without npm","id":"using-rollup-without-npm","depth":3},{"value":"Using Webpack without npm","id":"using-webpack-without-npm","depth":3},{"value":"Using NodeJS","id":"using-nodejs","depth":3},{"value":"Using Jest","id":"using-jest","depth":3},{"value":"Using npm or yarn","id":"using-npm-or-yarn","depth":3},{"value":"Using non-strict d.ts files","id":"using-non-strict-dts-files","depth":3},{"value":"References","id":"references","depth":3}],"frontmatter":{"title":"Installation","seo":{"title":"Installation"}},"lastModified":"2026-02-11T19:54:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/geotoolkit/getting-started/getting-started","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}