{"id":6129,"date":"2023-01-01T13:31:38","date_gmt":"2023-01-01T10:01:38","guid":{"rendered":"https:\/\/en.geobox.ir\/developers\/?post_type=docs&#038;p=6129"},"modified":"2023-01-26T13:44:34","modified_gmt":"2023-01-26T10:14:34","slug":"working-with-rasterlayer","status":"publish","type":"docs","link":"https:\/\/en.geobox.ir\/developers\/docs\/raster\/working-with-rasterlayer\/","title":{"rendered":"Raster datasets"},"content":{"rendered":"<h2>Methods:<\/h2>\n<h3>getRaster(raster_uuid)<\/h3>\n<p>Returns the desired existing raster layer. This function is an asynchronous function.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>raster_uuid is the available raster layer uuid.<\/p>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p><a href=\"https:\/\/www.geobox.ir\">Raster layer<\/a>: Returns itself to allow for method chaining.<\/p>\n<p><strong>Example:<\/strong><code><\/code><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const rasterLayer = await Server.getRaster('4f9f3e4b-4dc1-469b-83ab-00ae00f02581');<\/pre>\n<h3>getRastersByIds(options)<\/h3>\n<p>Returns the desired existing raster layers. This function is an asynchronous function.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>options (Object)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5238%; height: 316px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; height: 26px; width: 22.9905%;\">Name<\/th>\n<th style=\"text-align: left; height: 26px; width: 103.063%;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.9905%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.ids<\/div>\n<div>Number | Array<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.063%; text-align: left;\">Ids of raster layers. If you want a single raster layer, insert id as a string.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.9905%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.user_id<\/div>\n<div>Number?<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.063%; text-align: left;\">If the admin wants to fetch raster layers of a certain user, this parameter determines which user is the target user.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p class=\"unprose txt-m mb3 anchor mt12\">Array: Returns an array of <a href=\"https:\/\/www.geobox.ir\">raster layers<\/a>.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const rasterLayers = await Server.getRastersByIds({\r\n   'ids': [25,125],\r\n   'user_id' :0\r\n});<\/pre>\n<h3>getRasterByName(name, user_id)<\/h3>\n<p>Returns the desired existing raster layer. This function is an asynchronous function.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>name is the available raster layer name.<\/p>\n<p>user_id is the id of the user that raster layer belongs to.<\/p>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p class=\"unprose txt-m mb3 anchor mt12\"><a href=\"https:\/\/www.geobox.ir\">Raster layer<\/a>: Returns itself to allow for method chaining.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const rasterLayer = await Server.getRasterByName('city',2);<\/pre>\n<h3>getRasters(options)<\/h3>\n<p>Returns the desired existing raster layers. This function is an asynchronous function.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>options (Object)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5964%; height: 493px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; height: 48px; width: 22.8381%;\">Name<\/th>\n<th style=\"text-align: left; height: 48px; width: 102.491%;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">f<\/span><\/div>\n<div>String<\/div>\n<div>defult: &#8216;json&#8217;<\/div>\n<\/td>\n<td style=\"height: 26px; width: 102.491%; text-align: left;\">Output format. Choices are: \u2018json\u2019 | \u2018html\u2019<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">q<\/span><\/div>\n<div>String?<\/div>\n<\/td>\n<td style=\"height: 26px; width: 102.491%; text-align: left;\">Query filter based on <a href=\"https:\/\/portal.ogc.org\/files\/96288\" rel=\"noopener noreferrer\">OGC CQL standard<\/a>.<br \/>\ne.g. &#8220;field1 LIKE &#8216;%GIS%&#8217; AND created_at &gt; &#8216;2021-01-01&#8242;&#8221;<\/td>\n<\/tr>\n<tr style=\"height: 79px;\">\n<td style=\"height: 79px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">search<\/span><\/div>\n<div>String?<\/div>\n<\/div>\n<\/td>\n<td style=\"height: 79px; width: 102.491%; text-align: left;\">Search term for keyword-based searching among search_fields or all textual fields if search_fields does not have value.<br \/>\nNOTE: if q param is defined this param will be ignored.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.search_fields<\/div>\n<div>String?<\/div>\n<\/td>\n<td style=\"height: 26px; width: 102.491%; text-align: left;\">Comma separated list of fields for searching<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">order_by<\/span><\/div>\n<div>String?<\/div>\n<\/td>\n<td style=\"height: 26px; width: 102.491%; text-align: left;\">Comma seperated list of fields for sorting results [field1 A|D, field2 A|D, \u2026]. e.g. name A, type D<br \/>\nNOTE: &#8220;A&#8221; denotes ascending order and &#8220;D&#8221; denotes descending order.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">skip<\/span><\/div>\n<div>\n<div>Number?<\/div>\n<div>Default: 0<\/div>\n<\/div>\n<\/td>\n<td style=\"height: 26px; width: 102.491%; text-align: left;\">Number of skipped vector layer views.<\/td>\n<\/tr>\n<tr style=\"height: 79px;\">\n<td style=\"height: 79px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">limit<\/span><\/div>\n<div>\n<div>Number?<\/div>\n<div>Default:10<\/div>\n<\/div>\n<\/div>\n<\/td>\n<td style=\"height: 79px; width: 102.491%; text-align: left;\">Maximum number for result vector layer views..<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">user_id<\/span><\/div>\n<div>Number?<\/div>\n<\/td>\n<td style=\"height: 53px; width: 102.491%; text-align: left;\">If the admin wants to fetch vector layer views of a certain user, this parameter determines which user is the target user.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">shared<\/span><\/div>\n<div>Bolean<\/div>\n<div>default: false<\/div>\n<\/td>\n<td style=\"height: 26px; width: 102.491%; text-align: left;\">If true, returns only the vector layer views that are shared.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">page<\/span><\/div>\n<div>Number?<\/div>\n<div>Default:1<\/div>\n<\/td>\n<td style=\"height: 26px; width: 102.491%; text-align: left;\">The minimum number of pages is 1.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">page_size<\/span><\/div>\n<div>\n<div>Number?<\/div>\n<div>Default:10<\/div>\n<\/div>\n<\/td>\n<td style=\"height: 26px; width: 102.491%; text-align: left;\">The minimum number of maps on each page is 1.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>Array: Returns an array of raster layers.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const rasterLayers = await Server.getRasters({q:`name = 'string'`,user_id :0});<\/pre>\n<h3>getRasterInfo(raster_uuid)<\/h3>\n<p>Returns the desired existing raster layer information. This information includes extent and color bands of the raster layer.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>raster_uuid is the available raster layer uuid.<\/p>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>Object: Returns an object that contains raster layer information.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const rasterLayerInfo = await Server.getRasterInfo('4f9f3e4b-4dc1-469b-83ab-00ae00f02581');<\/pre>\n<h3>getRasterPoint(raster_uuid, latitude, longitude)<\/h3>\n<p>Returns the desired existing raster layer information in a point (in a pixel).<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>raster_uuid is the available raster layer uuid.<\/p>\n<p>latitude and longitude are geographic coordinates of the point.<\/p>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>Array: Returns an array that contains pixel information.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const pixelInfo = await Server.getRasterPoint('4f9f3e4b-4dc1-469b-83ab-00ae00f02581', 45, 32);<\/pre>\n<h3>getRasterSettings(raster_uuid)<\/h3>\n<p>Returns the raster layer settings.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>raster_uuid is the available raster layer uuid.<\/p>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>Object: Returns an object that contains raster layer settings.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const rasterLayerSettings = await Server.getRasterSettings('4f9f3e4b-4dc1-469b-83ab-00ae00f02581');<\/pre>\n<h3>setRasterSettings(raster_uuid, options )<\/h3>\n<p>Updates the raster layer settings.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>raster_uuid is the available raster layer uuid.<\/p>\n<p>options (Object)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5238%; height: 108px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; height: 32px; width: 22.9905%;\">Name<\/th>\n<th style=\"text-align: left; height: 32px; width: 103.063%;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.9905%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.visual_settings<\/div>\n<div>Object<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.063%; text-align: left;\">An object contains visualization settings. See <a href=\"https:\/\/www.geobox.ir\/doc\/v1\/%d8%af%d8%a7%d8%af%d9%87%d9%87%d8%a7%db%8c-%d8%b1%d8%b3%d8%aa%d8%b1%db%8c\/%d8%a8%d8%b5%d8%b1%db%8c%d8%b3%d8%a7%d8%b2%db%8c-%d8%af%d8%a7%d8%af%d9%87-%d8%b1%d8%b3%d8%aa%d8%b1%db%8c\/\">raster visualization<\/a>\u00a0for more guidance. e.g.:<\/p>\n<pre>{\r\n      'nodata': null,\r\n      'indexes': [1],\r\n      'rescale': [[0,255]],\r\n      'colormap_name': null,\r\n      'colormap': null,\r\n      'color_formula': null,\r\n      'expression': null,\r\n      'exaggeration': 10\r\n}<\/pre>\n<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 50px; width: 22.9905%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.tile_settings<\/div>\n<div>Object<\/div>\n<\/td>\n<td style=\"height: 50px; width: 103.063%; text-align: left;\">An object contains tiles settings. See <a href=\"https:\/\/www.geobox.ir\/doc\/v1\/%d8%af%d8%a7%d8%af%d9%87%d9%87%d8%a7%db%8c-%d8%b1%d8%b3%d8%aa%d8%b1%db%8c\/%d8%a8%d8%b5%d8%b1%db%8c%d8%b3%d8%a7%d8%b2%db%8c-%d8%af%d8%a7%d8%af%d9%87-%d8%b1%d8%b3%d8%aa%d8%b1%db%8c\/\">raster visualization<\/a>\u00a0for more guidance. e.g.:<\/p>\n<pre>{\r\n      'min_zoom': 0,\r\n      'max_zoom': 22,\r\n      'use_cache': true,\r\n      'cache_until_zoom': 17\r\n}<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>Object: Returns an object that contains raster layer settings.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const rasterLayerSettings = await Server.setRasterSettings('4f9f3e4b-4dc1-469b-83ab-00ae00f02581',{\r\n   'visual_settings': {\r\n      'nodata': null,\r\n      'indexes': [1],\r\n      'rescale': [[0,255]],\r\n      'colormap_name': null,\r\n      'colormap': null,\r\n      'color_formula': null,\r\n      'expression': null,\r\n      'exaggeration': 10\r\n   },\r\n   'tile_settings': {\r\n      'min_zoom': 0,\r\n      'max_zoom': 22,\r\n      'use_cache': true,\r\n      'cache_until_zoom': 17\r\n   }\r\n});<\/pre>\n<h3>getRasterStatistics(raster_uuid)<\/h3>\n<p>Returns the statistical information of the raster layer.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>raster_uuid is the available raster layer uuid.<\/p>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>Object: Returns an object that contains raster layer statistics information.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const rasterLayerStatistics = await Server.getRasterStatistics('4f9f3e4b-4dc1-469b-83ab-00ae00f02581');<\/pre>\n<h3>getRasterTilejson(raster_uuid)<\/h3>\n<p>Returns raster layer tile information such as tile access address.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>raster_uuid is the available raster layer uuid.<\/p>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>Object: Returns an object that contains information of raster layer tiles.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const rasterLayerTilejson = await Server.getRasterTilejson('4f9f3e4b-4dc1-469b-83ab-00ae00f02581');<\/pre>\n<h3>updateRaster(raster_uuid, options )<\/h3>\n<p>Updates the existing raster layer.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>raster_uuid is the available raster layer uuid.<\/p>\n<p>options (Object)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5238%; height: 316px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; height: 26px; width: 22.9905%;\">Name<\/th>\n<th style=\"text-align: left; height: 26px; width: 103.063%;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.9905%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.name<\/div>\n<div>String<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.063%; text-align: left;\">Name of raster layer.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.9905%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.display_name<\/div>\n<div>String?<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.063%; text-align: left;\">Display name of raster layer. This parameter is helpful in identifying raster layer easily.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.9905%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.description<code class=\"language-json\"><\/code><\/div>\n<div>String?<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.063%; text-align: left;\">Description of raster layer.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p class=\"unprose txt-m mb3 anchor mt12\"><a href=\"https:\/\/www.geobox.ir\">Raster layer<\/a>: Returns itself to allow for method chaining.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const rasterLayer = await Server.updateRaster('4f9f3e4b-4dc1-469b-83ab-00ae00f02581',{\r\n   'name': 'string',\r\n   'display_name': 'string',\r\n   'description': 'string'\r\n});<\/pre>\n<h3>deleteRaster(raster_uuid)<\/h3>\n<p>Deletes the existing raster layer.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>raster_uuid is the available raster layer uuid.<\/p>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>String: Returns a message that shows deleting was successful or not. Null message means deleting was successful.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const result = await Server.deleteRaster('4f9f3e4b-4dc1-469b-83ab-00ae00f02581');<\/pre>\n<h3>seedCacheRaster(raster_uuid, options)<\/h3>\n<p>Generates and stores tiles for the existing raster layer. See <a href=\"https:\/\/www.geobox.ir\/doc\/v1\/%d8%af%d8%a7%d8%af%d9%87%d9%87%d8%a7%db%8c-%d8%b1%d8%b3%d8%aa%d8%b1%db%8c\/%d9%85%d8%af%db%8c%d8%b1%db%8c%d8%aa-%d9%84%d8%a7%db%8c%d9%87%d9%87%d8%a7%db%8c-%d8%b1%d8%b3%d8%aa%d8%b1%db%8c\/#2-toc-title\">generating and storing tiles<\/a>\u00a0for more guidance.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>raster_uuid is the available raster layer uuid.<\/p>\n<p>options (Object)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5964%; height: 316px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; height: 26px; width: 22.8381%;\">Name<\/th>\n<th style=\"text-align: left; height: 26px; width: 102.491%;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.from_zoom<\/div>\n<div>Number<\/div>\n<\/td>\n<td style=\"height: 26px; width: 102.491%; text-align: left;\">from_zoom parameter is between 0 and 22.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.to_zoom<\/div>\n<div>Number<\/div>\n<\/td>\n<td style=\"height: 26px; width: 102.491%; text-align: left;\">to_zoom parameter is between 0 and 22.<\/td>\n<\/tr>\n<tr style=\"height: 79px;\">\n<td style=\"height: 79px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">extent<\/span><\/div>\n<div>Array<\/div>\n<\/div>\n<\/td>\n<td style=\"height: 79px; width: 102.491%; text-align: left;\"><span class=\"enlighter-s0\">[southwest x, southwest y,\u00a0 northeast x, northeast y]<\/span><\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.workers<\/div>\n<div>Number<\/div>\n<\/td>\n<td style=\"height: 26px; width: 102.491%; text-align: left;\">Number of CPU cores.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 53px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\">options.<span style=\"font-family: inherit; font-size: inherit;\">user_id<\/span><\/div>\n<div>Number?<\/div>\n<\/td>\n<td style=\"height: 53px; width: 102.491%; text-align: left;\">If the admin wants to build cache for a raster layer of a certain user, this parameter determines which user is the target user.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>Object: Returns task id to manage task.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const taskId = await Server.seedCacheRaster('4f9f3e4b-4dc1-469b-83ab-00ae00f02581',{\r\n   'from_zoom': 0,\r\n   'to_zoom': 2,\r\n   'extent': [51, 35, 52, 36],\r\n   'workers': 1,\r\n   'user_id': 2\r\n})<\/pre>\n<h3>getCacheSizeRaster(raster_uuid)<\/h3>\n<p>Returns the size of tiles generated and stored for raster layer in bytes.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>raster_uuid is the available raster layer uuid.<\/p>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>Number: Returns tiles size in byte.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const tilesSize = await Server.getCacheSizeRaster('4f9f3e4b-4dc1-469b-83ab-00ae00f02581');<\/pre>\n<h3>clearCacheRaster(raster_uuid)<\/h3>\n<p>Removes generated tiles for the desired raster layer.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>raster_uuid is the available raster layer uuid.<\/p>\n<p id=\"zoomin-returns\" class=\"unprose txt-m mb3 anchor mt12\"><strong>Returns:<\/strong><\/p>\n<p>String: Returns a message that shows clearing was successful or not. Null message means clearing was successful.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const result = await Server.clearCacheRaster('4f9f3e4b-4dc1-469b-83ab-00ae00f02581');<\/pre>\n<h2><\/h2>\n","protected":false},"excerpt":{"rendered":"<p>Methods: getRaster(raster_uuid) Returns the desired existing raster layer. This function is an asynchronous function. Parameters: raster_uuid is the available raster layer uuid. Returns: Raster layer: Returns itself to allow for method chaining. Example: const rasterLayer = await Server.getRaster(&#8216;4f9f3e4b-4dc1-469b-83ab-00ae00f02581&#8217;); getRastersByIds(options) Returns the desired existing raster layers. This function is an asynchronous function. Parameters: options (Object) Name [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[68],"doc_tag":[],"class_list":["post-6129","docs","type-docs","status-publish","hentry","doc_category-raster"],"_links":{"self":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/6129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/comments?post=6129"}],"version-history":[{"count":30,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/6129\/revisions"}],"predecessor-version":[{"id":6677,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/6129\/revisions\/6677"}],"wp:attachment":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/media?parent=6129"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_category?post=6129"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_tag?post=6129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}