A Python script executes a Spatial ETL device if the Data Interoperability expansion is examined out, the ETL tool is added to a model, and the model is performed making use of a Python script with the arcpy.ImportToolbox function.
Arcgis Data Interoperability Extension Code Samples UsedProvided are usually code samples used to check out out the Data Interoperability expansion (if obtainable), import the toolbox formulated with the design and ETL tool, and execute the model.Arcgis Data Interoperability Extension License Is ObtainableUse the CheckExtension function to examine if a license is obtainable to become examined out for a particular type of expansion; make use of the CheckOutExtension functionality to obtain the license.
Once the extension license can be gathered by the script, tools requiring that extension can become executed. To return the permit and enable some other programs to make use of the license, make use of the CheckInExtension function. Program code: A returned value of Failed, Inaccessible, or NotLicensed signifies that the expansion could not really be effectively checked out print Enable Data Interoperability Expansion Start attempt: if arcpy.ChéckExtension(DataInteroperability) Available: árcpy.CheckOutExtension(DataInteroperability) print Examined out DataInteroperability Expansion else: boost LicenseError except LicenseError: print Data Interoperability permit is inaccessible except: printing arcpy.GetMessages(2) lastly: Check out in the ArcGIS DataInteroperability extension once the procedure is finished arcpy.CheckInExtension(DataInteroperability) printing Checked in DataInteroperability Extension B. Set required variables, transfer the tool kit formulated with the Spatial ETL tool and design, and perform the model. This can become discovered by right clicking on the tool kit in ArcCatalog, or the Directory Windowpane in ArcMap, and starting the attributes. The route to the tool kit should be shown under the Area section. SourceGoogleEarthKMLFileorURLC:ExampIeKMLCountiesLayerToKML.kmz DestinationEsriFileGeodatabaseC:Example0utGeodatabase.gdb print out Variables described, starting process Import custom toolbox (input toolbox path, tool kit alias) The variable utilized above (inputtoolboxpath) can end up being utilized for the input document because it is looking for the place of the tool kit. The Tool kit Alias can end up being discovered by correct clicking on the tool kit in ArcCatalog, or the List Screen in ArcMap, and opening the properties. The name utilized for the alias should be shown in the Alias area. If this is usually blank, stipulate an alias and apply the adjustments to allow the alias in the software. The device is discovered by the TooI-name Toolbox-aIias; with the underscore incorporated.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |