{"id":6163,"date":"2023-01-02T13:04:56","date_gmt":"2023-01-02T09:34:56","guid":{"rendered":"https:\/\/en.geobox.ir\/developers\/?post_type=docs&#038;p=6163"},"modified":"2023-02-13T11:12:16","modified_gmt":"2023-02-13T07:42:16","slug":"geoprocessing-2","status":"publish","type":"docs","link":"https:\/\/en.geobox.ir\/developers\/docs\/geoprocessing\/geoprocessing-2\/","title":{"rendered":"Buffer"},"content":{"rendered":"<h3>buffer(option)<\/h3>\n<p>Buffers on the desired layer. After the process is finished, results are appeared as a new vector layer.<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>options (<a href=\"https:\/\/geobox.ir\/\">FormData<\/a>)<\/p>\n<table class=\"table table--fixed table--compact\" style=\"width: 82.5238%; height: 347px;\">\n<thead>\n<tr class=\"bg-gray-faint\" style=\"height: 26px;\">\n<th style=\"text-align: left; height: 32px; width: 22.8381%;\">Name<\/th>\n<th style=\"text-align: left; height: 32px; width: 103.215%;\">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\">layer_uuid<\/div>\n<div>String<\/div>\n<\/td>\n<td style=\"height: 26px; width: 103.215%; text-align: left;\">uuid of the vector layer or vector layer view.<\/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\">is_view<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">Bolean<\/div>\n<div>Deafult: false<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.215%; text-align: left;\">If uuid is for a vector layer, this parameter should be false and if uuid is for a vector layer view, this parameter should be true.<\/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\">buffer_distance<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">Number<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.215%; text-align: left;\">Buffer distance in meters.<\/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\">out_layer_name<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">String<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.215%; text-align: left;\">Name of new layer for buffer results.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"height: 24px; width: 22.8381%; text-align: left;\">\n<div class=\"txt-mono txt-bold txt-break-word\"><span style=\"color: #000000;\">join_style<\/span><\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">String<\/div>\n<div>Default: null<\/div>\n<\/td>\n<td style=\"height: 24px; width: 103.215%; text-align: left;\">Choices are: &#8216;Round&#8217;, &#8216;Mitre&#8217;, &#8216;Bevel&#8217;.<\/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\">cap_style<\/div>\n<div class=\"txt-mono txt-bold txt-break-word\">\n<div class=\"txt-mono txt-bold txt-break-word\">String<\/div>\n<div>Default: null<\/div>\n<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.215%; text-align: left;\">Choices are: &#8216;Round&#8217;, &#8216;Flat&#8217;, &#8216;Square&#8217;.<\/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\">user_id<\/div>\n<div>Number?<\/div>\n<\/td>\n<td style=\"height: 53px; width: 103.215%; text-align: left;\">If the admin wants to do buffer geoprocessing for a vector layer or vector layer view 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<p>First, create a FormData. Then add the values.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let formData = new FormData();\r\nformData.append('layer_uuid', '4f9f3e4b-4dc1-469b-83ab-00ae00f02581');\r\nformData.append('is_view', false);\r\nformData.append('buffer_distance', 10);\r\nformData.append('out_layer_name', 'buffer_10m');\r\nformData.append('join_style', 'Round');\r\nformData.append('cap_style', 'Round');\r\nformData.append('user_id', 2);<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const newBufferLayer = await Server.buffer(formData);<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>buffer(option) Buffers on the desired layer. After the process is finished, results are appeared as a new vector layer. Parameters: options (FormData) Name Description layer_uuid String uuid of the vector layer or vector layer view. is_view Bolean Deafult: false If uuid is for a vector layer, this parameter should be false and if uuid is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[73],"doc_tag":[],"class_list":["post-6163","docs","type-docs","status-publish","hentry","doc_category-geoprocessing"],"_links":{"self":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/6163","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=6163"}],"version-history":[{"count":9,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/6163\/revisions"}],"predecessor-version":[{"id":6689,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/docs\/6163\/revisions\/6689"}],"wp:attachment":[{"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/media?parent=6163"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_category?post=6163"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/en.geobox.ir\/developers\/wp-json\/wp\/v2\/doc_tag?post=6163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}