Code
stringlengths
103
85.9k
Summary
listlengths
0
94
Please provide a description of the function:def find(self, searchText, layers, contains=True, searchFields="", sr="", layerDefs="", returnGeometry=True, maxAllowableOffset="", geometryPrecision="", dynamicLayers="", returnZ=False, returnM=False, gdbVersi...
[ " performs the map service find operation " ]
Please provide a description of the function:def getFeatureDynamicLayer(self, oid, dynamicLayer, returnZ=False, returnM=False): url = self._url + "/dynamicLayer/%s" % oid params = { "f": "json", "returnZ": returnZ, "returnM" : r...
[ " The feature resource represents a single feature in a dynamic\n layer in a map service\n " ]
Please provide a description of the function:def identify(self, geometry, mapExtent, imageDisplay, tolerance, geometryType="esriGeometryPoint", sr=None, layerDefs=None, time=None, ...
[ "\n The identify operation is performed on a map service resource\n to discover features at a geographic location. The result of this\n operation is an identify results resource. Each identified result\n includes its name, layer ID, layer name, geometry and geometry type,...
Please provide a description of the function:def generateKML(self, save_location, docName, layers, layerOptions="composite"): kmlURL = self._url + "/generateKml" params= { "f" : "json", 'docName' : docName, 'layers' : layers, 'layerOptions': layer...
[ "\n The generateKml operation is performed on a map service resource.\n The result of this operation is a KML document wrapped in a KMZ\n file. The document contains a network link to the KML Service\n endpoint with properties and parameters you specify.\n Inputs:\n...
Please provide a description of the function:def exportMap(self, bbox, size="600,550", dpi=200, imageSR=None, image_format="png", layerDefFilter=None, layers=None, transparent=...
[ "\n The export operation is performed on a map service resource.\n The result of this operation is a map image resource. This\n resource provides information about the exported map image such\n as its URL, its width and height, extent and scale.\n Inputs:\n ...
Please provide a description of the function:def estimateExportTilesSize(self, exportBy, levels, tilePackage=False, exportExtent="DEFAULTEXTENT", areaOfInterest...
[ "\n The estimateExportTilesSize operation is an asynchronous task that\n allows estimation of the size of the tile package or the cache data\n set that you download using the Export Tiles operation. This\n operation can also be used to estimate the tile count in a tile\n package a...
Please provide a description of the function:def exportTiles(self, levels, exportBy="LevelID", tilePackage=False, exportExtent="DEFAULT", optimizeTilesForSize=True, compressionQuality=0, ...
[ "\n The exportTiles operation is performed as an asynchronous task and\n allows client applications to download map tiles from a server for\n offline use. This operation is performed on a Map Service that\n allows clients to export cache tiles. The result of this operation\n is Ma...
Please provide a description of the function:def fromJSON(value): if isinstance(value, str): value = json.loads(value) elif isinstance(value, dict): pass else: raise AttributeError("Invalid input") return Extension(typeName=value['typeName'], ...
[ "returns the object from json string or dictionary" ]
Please provide a description of the function:def asList(self): return [self._red, self._green, self._blue, self._alpha]
[ " returns the value as the list object" ]
Please provide a description of the function:def asDictionary(self): template = { "type" : "esriSMS", "style" : self._style, "color" : self._color, "size" : self._size, "angle" : self._angle, "xoffset" : self._xoffset, ...
[ " returns the object as a dictionary " ]
Please provide a description of the function:def color(self, value): if isinstance(value, (list, Color)): if value is list: self._color = value else: self._color = value.asList
[ " sets the color " ]
Please provide a description of the function:def outlineColor(self, value): if isinstance(value, (list, Color)): if value is list: self._outlineColor = value else: self._outlineColor = value.asList
[ " sets the outline color " ]
Please provide a description of the function:def outline(self, value): if isinstance(value, SimpleLineSymbol): self._outline = value.asDictionary
[ " sets the outline " ]
Please provide a description of the function:def asDictionary(self): template = { "type" : "esriSFS", "style" : self._style, "color" : self._color, "outline" : self._outline } return template
[ " returns object as dictionary " ]
Please provide a description of the function:def base64ToImage(imgData, out_path, out_file): fh = open(os.path.join(out_path, out_file), "wb") fh.write(imgData.decode('base64')) fh.close() del fh return os.path.join(out_path, out_file)
[ " converts a base64 string to a file " ]
Please provide a description of the function:def asDictionary(self): template = { "type" : "esriPMS", "url" : self._url, "imageData" : self._imageDate, "contentType" : self._contentType, "width" : self._width, "height" : self._heig...
[ " returns the object as a dictionary " ]
Please provide a description of the function:def asDictionary(self): template = { "type" : "esriPMS", "url" : self._url, "imageData" : self._imageDate, "contentType" : self._contentType, "width" : self._width, "height" : self._heig...
[ " returns the object as a dictionary " ]
Please provide a description of the function:def find(self, text, magicKey=None, sourceCountry=None, bbox=None, location=None, distance=3218.69, outSR=102100, category=None, outFields="*", m...
[ "\n The find operation geocodes one location per request; the input\n address is specified in a single parameter.\n\n Inputs:\n text - Specifies the location to be geocoded. This can be a\n street address, place name, postal code, or POI.\n magicKey - The find ope...
Please provide a description of the function:def findAddressCandidates(self, addressDict=None, singleLine=None, maxLocations=10, outFields="*", outSR=4326, ...
[ "\n The findAddressCandidates operation is performed on a geocode\n service resource. The result of this operation is a resource\n representing the list of address candidates. This resource provides\n information about candidates, including the address, location, and\n match score...
Please provide a description of the function:def geocodeAddresses(self, addresses, outSR=4326, sourceCountry=None, category=None): params = { "f" : "json" } url = self._url + ...
[ "\n The geocodeAddresses operation is performed on a Geocode Service\n resource. The result of this operation is a resource representing\n the list of geocoded addresses. This resource provides information\n about the addresses including the address, location, score, and\n other g...
Please provide a description of the function:def reverseGeocode(self, location): params = { "f" : "json" } url = self._url + "/reverseGeocode" if isinstance(location, Point): params['location'] = location.asDictionary elif isinstance(location, lis...
[ "\n The reverseGeocode operation determines the address at a particular\n x/y location. You pass the coordinates of a point location to the\n geocoding service, and the service returns the address that is\n closest to the location.\n\n Input:\n location - either an Point...
Please provide a description of the function:def suggest(self, text, location, distance=2000, category=None ): params = { "f" : "json", "text" : text } url = self._url + "/suggest" ...
[ "\n The suggest operation is performed on a geocode service resource.\n The result of this operation is a resource representing a list of\n suggested matches for the input text. This resource provides the\n matching text as well as a unique ID value, which links a\n suggestion to ...
Please provide a description of the function:def __init(self): params = { "f" : "json", } json_dict = self._get(self._url, params, securityHandler=self._securityHandler, proxy_url=self._proxy_url, ...
[ " initializes the properties " ]
Please provide a description of the function:def __init(self): params = { "f" : "json" } json_dict = self._get(url=self._url, param_dict=params, securityHandler=self._securityHandler, proxy_url=self._proxy_url...
[ " initializes all the properties " ]
Please provide a description of the function:def solve(self,stops, method="POST", barriers=None, polylineBarriers=None, polygonBarriers=None, travelMode=None, attributeParameterValues=None, returnDirections=None, ...
[ "The solve operation is performed on a network layer resource.\n The solve operation is supported on a network layer whose layerType\n is esriNAServerRouteLayer. You can provide arguments to the solve\n route operation as query parameters.\n Inputs:\n stops - The set of stops ...
Please provide a description of the function:def solveServiceArea(self,facilities,method="POST", barriers=None, polylineBarriers=None, polygonBarriers=None, travelMode=None, attributeParameterVal...
[ " The solve service area operation is performed on a network layer\n resource of type service area (layerType is esriNAServerServiceArea).\n You can provide arguments to the solve service area operation as\n query parameters.\n Inputs:\n facilities - The set of facilities load...
Please provide a description of the function:def solveClosestFacility(self,incidents,facilities,method="POST", barriers=None, polylineBarriers=None, polygonBarriers=None, travelMode=None, ...
[ "The solve operation is performed on a network layer resource of\n type closest facility (layerType is esriNAServerClosestFacilityLayer).\n You can provide arguments to the solve route operation as query\n parameters.\n Inputs:\n facilities - The set of facilities loaded as n...
Please provide a description of the function:def upload(self, filePath, description=None): params = { "f" : "json"} if description is not None: params['description'] = str(description) url = self._url + "/upload" files = {} files['file'] = filePat...
[ "\n This operation uploads an item to the server. Each uploaded item is\n identified by a unique itemID. Since this request uploads a file,\n it must be a multi-part request as per IETF RFC1867.\n All uploaded items are subjected to the deletion rules set on the\n upload directory...
Please provide a description of the function:def download(self, itemID, savePath): if os.path.isdir(savePath) == False: os.makedirs(savePath) url = self._url + "/%s/download" % itemID params = { } if len(params.keys()): url = url + "?%s" % urlenc...
[ "\n downloads an item to local disk\n\n Inputs:\n itemID - unique id of item to download\n savePath - folder to save the file in\n " ]
Please provide a description of the function:def reports(self): if self._metrics is None: self.__init() self._reports = [] for r in self._metrics: url = self._url + "/%s" % six.moves.urllib.parse.quote_plus(r['reportname']) self._reports.append(UsageR...
[ "returns a list of reports on the server" ]
Please provide a description of the function:def createUsageReport(self, reportname, queries, metadata, since="LAST_DAY", fromValue=None, toValue=None, ...
[ "\n Creates a new usage report. A usage report is created by submitting\n a JSON representation of the usage report to this operation.\n\n Inputs:\n reportname - the unique name of the report\n since - the time duration of the report. The supported values\n are:...
Please provide a description of the function:def edit(self): usagereport_dict = { "reportname": self.reportname, "queries": self._queries, "since": self.since, "metadata": self._metadata, "to" : self._to, "from" : self._from, ...
[ "\n Edits the usage report. To edit a usage report, you need to submit\n the complete JSON representation of the usage report which\n includes updates to the usage report properties. The name of the\n report cannot be changed when editing the usage report.\n\n Values are changed i...
Please provide a description of the function:def __init(self): params = { "f" : "json", } json_dict = self._get(self._url, params, securityHandler=self._securityHandler, proxy_url=self._proxy_url, ...
[ " inializes the properties " ]
Please provide a description of the function:def replicasResource(self): if self._replicasResource is None: self._replicasResource = {} for replica in self.replicas: self._replicasResource["replicaName"] = replica.name self._replicasResource["repl...
[ "returns a list of replices" ]
Please provide a description of the function:def main(*argv): try: username = str(argv[0]) password = str(argv[1]) baseURL = str(argv[2]) folderId = str(argv[3]) filePath = str(argv[4]) # Local variables # sh = None agol = None u...
[ " main driver of program " ]
Please provide a description of the function:def services(self): self._services = [] params = {"f": "json"} if not self._url.endswith('/services'): uURL = self._url + "/services" else: uURL = self._url res = self._get(url=uURL, param_dict=params, ...
[ " returns all the service objects in the admin service's page " ]
Please provide a description of the function:def refresh(self, serviceDefinition=True): url = self._url + "/MapServer/refresh" params = { "f" : "json", "serviceDefinition" : serviceDefinition } res = self._post(url=self._url, ...
[ "\n The refresh operation refreshes a service, which clears the web\n server cache for the service.\n " ]
Please provide a description of the function:def editTileService(self, serviceDefinition=None, minScale=None, maxScale=None, sourceItemId=None, exportTilesAllowed=False, maxExp...
[ "\n This post operation updates a Tile Service's properties\n\n Inputs:\n serviceDefinition - updates a service definition\n minScale - sets the services minimum scale for caching\n maxScale - sets the service's maximum scale for caching\n sourceItemId - The Sou...
Please provide a description of the function:def __init(self): params = { "f" : "json", } json_dict = self._get(self._url, params, securityHandler=self._securityHandler, proxy_port=self._proxy_port, ...
[ " initializes the service " ]
Please provide a description of the function:def securityHandler(self, value): if isinstance(value, BaseSecurityHandler): if isinstance(value, (security.AGOLTokenSecurityHandler,security.PortalTokenSecurityHandler,security.ArcGISTokenSecurityHandler)): self._securityHandler ...
[ " sets the security handler " ]
Please provide a description of the function:def refresh(self): params = {"f": "json"} uURL = self._url + "/refresh" res = self._get(url=uURL, param_dict=params, securityHandler=self._securityHandler, proxy_port=self._proxy_port, ...
[ " refreshes a service " ]
Please provide a description of the function:def updateDefinition(self, json_dict): definition = None if json_dict is not None: if isinstance(json_dict,collections.OrderedDict) == True: definition = json_dict else: definition = collection...
[ "\n The updateDefinition operation supports updating a definition\n property in a hosted feature service. The result of this\n operation is a response indicating success or failure with error\n code and description.\n\n Input:\n json_dict - part to add ...
Please provide a description of the function:def __init(self): params = { "f" : "json", } json_dict = self._get(self._url, params, securityHandler=self._securityHandler, proxy_port=self._proxy_port, ...
[ " initializes the service " ]
Please provide a description of the function:def calc_resp(password_hash, server_challenge): # padding with zeros to make the hash 21 bytes long password_hash += b'\0' * (21 - len(password_hash)) res = b'' dobj = des.DES(password_hash[0:7]) res = res + dobj.encrypt(server_challenge[0:8]) ...
[ "calc_resp generates the LM response given a 16-byte password hash and the\n challenge from the Type-2 message.\n @param password_hash\n 16-byte password hash\n @param server_challenge\n 8-byte challenge from Type-2 message\n returns\n 24-byte buffer to c...
Please provide a description of the function:def create_LM_hashed_password_v1(passwd): # if the passwd provided is already a hash, we just return the first half if re.match(r'^[\w]{32}:[\w]{32}$', passwd): return binascii.unhexlify(passwd.split(':')[0]) # fix the password length to 14 bytes ...
[ "create LanManager hashed password" ]
Please provide a description of the function:def create_NT_hashed_password_v1(passwd, user=None, domain=None): "create NT hashed password" # if the passwd provided is already a hash, we just return the second half if re.match(r'^[\w]{32}:[\w]{32}$', passwd): return binascii.unhexlify(passwd.split(':...
[]
Please provide a description of the function:def create_NT_hashed_password_v2(passwd, user, domain): "create NT hashed password" digest = create_NT_hashed_password_v1(passwd) return hmac.new(digest, (user.upper() + domain).encode('utf-16le')).digest()
[]
Please provide a description of the function:def _readcsv(self, path_to_csv): return np.genfromtxt(path_to_csv, dtype=None, delimiter=',', names=True)
[ "reads a csv column" ]
Please provide a description of the function:def queryDataCollectionByName(self, countryName): var = self._dataCollectionCodes try: return [x[0] for x in var[var['Countries'] == countryName]] except: return None
[ "\n returns a list of available data collections for a given country\n name.\n\n Inputs:\n countryName - name of the country to file the data collection.\n Output:\n list or None. None implies could not find the countryName\n " ]
Please provide a description of the function:def __geometryToDict(self, geom): if isinstance(geom, dict): return geom elif isinstance(geom, Point): pt = geom.asDictionary return {"geometry": {"x" : pt['x'], "y" : pt['y']}} elif isinstance(geom, Polygo...
[ "converts a geometry object to a dictionary" ]
Please provide a description of the function:def lookUpReportsByCountry(self, countryName): code = self.findCountryTwoDigitCode(countryName) if code is None: raise Exception("Invalid country name.") url = self._base_url + self._url_list_reports + "/%s" % code param...
[ "\n looks up a country by it's name\n Inputs\n countryName - name of the country to get reports list.\n " ]
Please provide a description of the function:def enrich(self, studyAreas, dataCollections=None, analysisVariables=None, addDerivativeVariables="all", studyAreasOptions=None, useData=None, intersectingGeographies=Non...
[ "\n The GeoEnrichment service uses the concept of a study area to\n define the location of the point or area that you want to enrich\n with additional information. If one or many points are input as\n a study area, the service will create a 1-mile ring buffer around\n the point to...
Please provide a description of the function:def createReport(self, out_file_path, studyAreas, report=None, format="PDF", reportFields=None, studyAreasOptions=None, useData=...
[ "\n The GeoEnrichment Create Report method uses the concept of a study\n area to define the location of the point or area that you want to\n enrich with generated reports. This method allows you to create\n many types of high-quality reports for a variety of use cases\n describing...
Please provide a description of the function:def dataCollections(self, countryName=None, addDerivativeVariables=None, outFields=None, suppressNullValues=False): if addDerivativeVariables is None: ...
[ "\n The GeoEnrichment service uses the concept of a data collection to\n define the data attributes returned by the enrichment service. Each\n data collection has a unique name that acts as an ID that is passed\n in the dataCollections parameter of the GeoEnrichment service.\n Som...
Please provide a description of the function:def getVariables(self, sourceCountry, optionalCountryDataset=None, searchText=None): r url = self._base_url + self._url_getVariables params = { "f" : "json", "sourc...
[ "\n The GeoEnrichment GetVariables helper method allows you to search\n the data collections for variables that contain specific keywords.\n\n To see the comprehensive set of global Esri Demographics data that\n are available, use the interactive data browser:\n http://resources.a...
Please provide a description of the function:def standardGeographyQuery(self, sourceCountry=None, optionalCountryDataset=None, geographyLayers=None, geographyIDs=None, ...
[ "\n The GeoEnrichment service provides a helper method that returns\n standard geography IDs and features for the supported geographic\n levels in the United States and Canada.\n As indicated throughout this documentation guide, the GeoEnrichment\n service uses the concept of a st...
Please provide a description of the function:def folderName(self, folder): if folder == "" or\ folder == "/": self._currentURL = self._url self._services = None self._description = None self._folderName = None self._webEncrypted ...
[ "gets/set the current folder" ]
Please provide a description of the function:def folders(self): if self._folders is None: self.__init() if "/" not in self._folders: self._folders.append("/") return self._folders
[ " returns a list of all folders " ]
Please provide a description of the function:def services(self): self._services = [] params = { "f" : "json" } json_dict = self._get(url=self._currentURL, param_dict=params, securityHan...
[ " returns the services in the current folder " ]
Please provide a description of the function:def find_services(self, service_type="*"): allowed_service_types = ("GPSERVER", "GLOBESERVER", "MAPSERVER", "GEOMETRYSERVER", "IMAGESERVER", "SEARCHSERVER", "GEODATASERVER", ...
[ "\n returns a list of a particular service type on AGS\n Input:\n service_type - Type of service to find. The allowed types\n are: (\"GPSERVER\", \"GLOBESERVER\", \"MAPSERVER\",\n \"GEOMETRYSERVER\", \"IMAGESERVER\",\n ...
Please provide a description of the function:def addFolderPermission(self, principal, isAllowed=True, folder=None): if folder is not None: uURL = self._url + "/%s/%s" % (folder, "/permissions/add") else: uURL = self._url + "/permissions/add" params = { ...
[ "\n Assigns a new permission to a role (principal). The permission\n on a parent resource is automatically inherited by all child\n resources\n Input:\n principal - name of role to assign/disassign accesss\n isAllowed - boolean which allows access\n...
Please provide a description of the function:def service_report(self, folder=None): items = ["description", "status", "instances", "iteminfo", "properties"] if folder is None: uURL = self._url + "/report" else: uURL = self._url +...
[ "\n provides a report on all items in a given folder\n Inputs:\n folder - folder to report on given services. None means root\n " ]
Please provide a description of the function:def rename_service(self, serviceName, serviceType, serviceNewName, folder=None): params = { "f" : "json", "serviceName" : serviceName, "serviceType" : serviceType, "serviceNewName" : serv...
[ "\n Renames a published AGS Service\n Inputs:\n serviceName - old service name\n serviceType - type of service\n serviceNewName - new service name\n folder - location of where the service lives, none means\n root folder.\n...
Please provide a description of the function:def editFolder(self, description, webEncrypted=False): url = self._url + "/editFolder" params = { "f" : "json", "webEncrypted" : webEncrypted, "description" : "%s" % description } return self._post(...
[ "\n This operation allows you to change the description of an existing\n folder or change the web encrypted property.\n The web encrypted property indicates if all the services contained\n in the folder are only accessible over a secure channel (SSL). When\n setting this property ...
Please provide a description of the function:def exists(self, folderName, serviceName=None, serviceType=None): url = self._url + "/exists" params = { "f" : "json", "folderName" : folderName, "serviceName" : serviceName, "type" : serviceType ...
[ "\n This operation allows you to check whether a folder or a service\n exists. To test if a folder exists, supply only a folderName. To\n test if a service exists in a root folder, supply both serviceName\n and serviceType with folderName=None. To test if a service exists\n in a f...
Please provide a description of the function:def __init(self): params = { "f" : "json" } json_dict = self._get(url=self._currentURL, param_dict=params, securityHandler=self._securityHandler, ...
[ " populates server admin information " ]
Please provide a description of the function:def modifyExtensions(self, extensionObjects=[]): if len(extensionObjects) > 0 and \ isinstance(extensionObjects[0], Extension): self._extensions = extensionObjects res = self.edit(str(self)) ...
[ "\n enables/disables a service extension type based on the name\n " ]
Please provide a description of the function:def itemInfoUpload(self, folder, filePath): files = {} url = self._url + "/iteminfo/upload" params = { "f" : "json", "folder" : folder } files['file'] = filePath return self._post(url=url, ...
[ "\n Allows for the upload of new itemInfo files such as metadata.xml\n Inputs:\n folder - folder on ArcGIS Server\n filePath - full path of the file to upload\n Output:\n json as dictionary\n " ]
Please provide a description of the function:def serviceManifest(self, fileType="json"): url = self._url + "/iteminfo/manifest/manifest.%s" % fileType params = {} f = self._get(url=url, param_dict=params, securityHandler=self._securityHandler...
[ "\n The service manifest resource documents the data and other\n resources that define the service origins and power the service.\n This resource will tell you underlying databases and their location\n along with other supplementary files that make up the service.\n\n Inputs:\n ...
Please provide a description of the function:def findDataItems(self, parentPath=None, ancestorPath=None, type=None, id=None): params = { "f" : "json", } if parentPath is not None: params['parentPath'] = parentPath if ancestorPath is ...
[ "\n You can use this operation to search through the various data\n items registered in the server's data store.\n Inputs:\n parentPath - The path of the parent under which to find items\n ancestorPath - The path of the ancestor under which to find\n ...
Please provide a description of the function:def startDataStoreMachine(self, dataStoreItemName, machineName): url = self._url + "/items/enterpriseDatabases/%s/machines/%s/start" % (dataStoreItemName, machineName) params = { "f": "json" } return self._post(url=url, pa...
[ "\n Starts the database instance running on the Data Store machine.\n\n Inputs:\n dataStoreItemName - name of the item to start\n machineName - name of the machine to start on\n " ]
Please provide a description of the function:def unregisterDataItem(self, path): url = self._url + "/unregisterItem" params = { "f" : "json", "itempath" : path, "force":"true" } return self._post(url, param_dict=params, ...
[ "\n Unregisters a data item that has been previously registered with\n the server's data store.\n\n Inputs:\n path - path to share folder\n\n Example:\n path = r\"/fileShares/folder_share\"\n print data.unregisterDataItem(path)\n " ]
Please provide a description of the function:def validateDataStore(self, dataStoreName, machineName): url = self._url + "/items/enterpriseDatabases/%s/machines/%s/validate" % (dataStoreName, machineName) params = { "f" : "json" } return self._post(url=url, ...
[ "\n Checks the status of ArcGIS Data Store and provides a health check\n response.\n\n Inputs:\n dataStoreName - name of the datastore\n machineName - name of the machine\n " ]
Please provide a description of the function:def layers(self): if self._layers is None: self.__init() lyrs = [] for lyr in self._layers: lyr['object'] = GlobeServiceLayer(url=self._url + "/%s" % lyr['id'], securityHan...
[ "gets the globe service layers" ]
Please provide a description of the function:def main(*argv): try: # Inputs # adminUsername = argv[0] adminPassword = argv[1] siteURL = argv[2] username = argv[3] subFolders = argv[4].lower() == "true" # Logic # sh = arcrest.AG...
[ " main driver of program " ]
Please provide a description of the function:def main(*argv): try: # Inputs # adminUsername = argv[0] adminPassword = argv[1] siteURL = argv[2] groupTitle = argv[3] groupTags = argv[4] description = argv[5] access = argv[6] # ...
[ " main driver of program " ]
Please provide a description of the function:def fromJSON(value): j = json.loads(value) v = GPMultiValue(gptype=j['dataType']) if "defaultValue" in j: v.value = j['defaultValue'] else: v.value = j['value'] if 'paramName' in j: v.paramN...
[ "loads the GP object from a JSON string " ]
Please provide a description of the function:def fromJSON(value): j = json.loads(value) v = GPRecordSet() if "defaultValue" in j: v.value = j['defaultValue'] else: v.value = j['value'] if 'paramName' in j: v.paramName = j['paramName'] ...
[ "loads the GP object from a JSON string " ]
Please provide a description of the function:def fromTable(table, paramName): from ..common.spatial import recordset_to_json g = GPRecordSet() g.paramName = paramName g.value = json.loads(recordset_to_json(table)) return g
[ "\n Converts a table to GPRecordSet object\n Inputs:\n table - path to the table\n paramName - name of the parameter\n " ]
Please provide a description of the function:def loadFeatures(self, path_to_fc): from ..common.spatial import featureclass_to_json v = json.loads(featureclass_to_json(path_to_fc)) self.value = v
[ "\n loads a feature class features to the object\n " ]
Please provide a description of the function:def fromJSON(value): j = json.loads(value) v = GPFeatureRecordSetLayer() if "defaultValue" in j: v.value = j['defaultValue'] else: v.value = j['value'] if 'paramName' in j: v.paramName = j['...
[ "loads the GP object from a JSON string " ]
Please provide a description of the function:def fromFeatureClass(fc, paramName): from ..common.spatial import featureclass_to_json val = json.loads(featureclass_to_json(fc)) v = GPFeatureRecordSetLayer() v.value = val v.paramName = paramName return v
[ "\n returns a GPFeatureRecordSetLayer object from a feature class\n\n Input:\n fc - path to a feature class\n paramName - name of the parameter\n " ]
Please provide a description of the function:def fromJSON(value): j = json.loads(value) v = GPRasterDataLayer() if "defaultValue" in j: v.value = j['defaultValue'] else: v.value = j['value'] if 'paramName' in j: v.paramName = j['paramN...
[ "loads the GP object from a JSON string " ]
Please provide a description of the function:def fromJSON(value): j = json.loads(value) v = GPRasterData() if "defaultValue" in j: v.value = j['defaultValue'] else: v.value = j['value'] if 'paramName' in j: v.paramName = j['paramName']...
[ "loads the GP object from a JSON string " ]
Please provide a description of the function:def fromJSON(value): j = json.loads(value) v = GPDataFile() if "defaultValue" in j: v.value = j['defaultValue'] else: v.value = j['value'] if 'paramName' in j: v.paramName = j['paramName'] ...
[ "loads the GP object from a JSON string " ]
Please provide a description of the function:def fromJSON(value): j = json.loads(value) v = GPLinearUnit() if "defaultValue" in j: v.value = j['defaultValue'] else: v.value = j['value'] if 'paramName' in j: v.paramName = j['paramName']...
[ "loads the GP object from a JSON string " ]
Please provide a description of the function:def fromJSON(value): j = json.loads(value) v = GPDate() if "defaultValue" in j: v.value = j['defaultValue'] else: v.value = j['value'] if 'paramName' in j: v.paramName = j['paramName'] ...
[ "loads the GP object from a JSON string " ]
Please provide a description of the function:def fromJSON(value): j = json.loads(value) v = GPBoolean() if "defaultValue" in j: v.value = j['defaultValue'] else: v.value = j['value'] if 'paramName' in j: v.paramName = j['paramName'] ...
[ "loads the GP object from a JSON string " ]
Please provide a description of the function:def fromJSON(value): j = json.loads(value) v = GPLong() if "defaultValue" in j: v.value = j['defaultValue'] else: v.value = j['value'] if 'paramName' in j: v.paramName = j['paramName'] ...
[ "loads the GP object from a JSON string " ]
Please provide a description of the function:def fromJSON(value): j = json.loads(value) v = GPString() if "defaultValue" in j: v.value = j['defaultValue'] else: v.value = j['value'] if 'paramName' in j: v.paramName = j['paramName'] ...
[ "loads the GP object from a JSON string " ]
Please provide a description of the function:def fromJSON(value): j = json.loads(value) v = GPDouble() if "defaultValue" in j: v.value = j['defaultValue'] else: v.value = j['value'] if 'paramName' in j: v.paramName = j['paramName'] ...
[ "loads the GP object from a JSON string " ]
Please provide a description of the function:def createKMZ(self, kmz_as_json): kmlURL = self._url + "/createKmz" params = { "f" : "json", "kml" : kmz_as_json } return self._post(url=kmlURL, param_dict=params, securityHandler=s...
[ "\n Creates a KMZ file from json.\n See http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Create_Kmz/02r3000001tm000000/\n for more information.\n " ]
Please provide a description of the function:def asDictionary(self): template = { "type" : "simple", "symbol" : self._symbol.asDictionary, "label" : self._label, "description" : self._description, "rotationType": self._rotationType, ...
[ " provides a dictionary representation of the object " ]
Please provide a description of the function:def asDictionary(self): template = { "type" : "uniqueValue", "field1" : self._field1, "field2" : self._field2, "field3" : self._field3, "fieldDelimiter" : self._fieldDelimiter, "defaultS...
[ " returns object as dictionary " ]
Please provide a description of the function:def searchDiagrams(self,whereClause=None,relatedObjects=None, relatedSchematicObjects=None): params = {"f" : "json"} if whereClause: params["where"] = whereClause if relatedObjects: params["relat...
[ "\n The Schematic Search Diagrams operation is performed on the schematic\n service resource. The result of this operation is an array of Schematic\n Diagram Information Object.\n\n It is used to search diagrams in the schematic service by criteria;\n that is, diagrams filtered ou...
Please provide a description of the function:def _validateurl(self, url): parsed = urlparse(url) path = parsed.path.strip("/") if path: parts = path.split("/") url_types = ("admin", "manager", "rest") if any(i in parts for i in url_types): ...
[ "assembles the server url" ]
Please provide a description of the function:def __init(self, folder='root'): params = { "f" : "json" } if folder == "root": url = self.root else: url = self.location json_dict = self._get(url=url, para...
[ "loads the property data into the class" ]
Please provide a description of the function:def admin(self): if self._securityHandler is None: raise Exception("Cannot connect to adminstrative server without authentication") from ..manageags import AGSAdministration return AGSAdministration(url=self._adminUrl, ...
[ "points to the adminstrative side of ArcGIS Server" ]
Please provide a description of the function:def services(self): services = [] if self._services is None: self.__init() for service in self._services: url = "%s/%s/%s" % (self.root, service['name'], service['type']) if service['type'] == "GPServer": ...
[ "gets the services in the current folder" ]
Please provide a description of the function:def currentFolder(self, value): if value in self.folders: if value.lower() != 'root': self._currentFolder = value self._location = "%s/%s" % (self.root, value) else: self._currentFolder ...
[ "gets/sets the current folder name" ]