POST
|
Sorry, I started with arcpy yesterday and I do not understand. I have a .gdb and I would like to select some feature class to load in SQL Server, but not all. import arcpy from Tkinter import * root = Tk() features = [] def var_states(): print 'Upload data SQL ?????' arcpy.env.workspace = "D:\GIS\Treinamento\deletar.gdb" datasets = arcpy.ListDatasets(feature_type='feature') datasets = [''] + datasets if datasets is not None else [] i = 1 Label(root, text="Select Features Class: ").grid(row=0, sticky=W) for ds in datasets: for fc in arcpy.ListFeatureClasses(feature_dataset=ds): var = IntVar() desc = arcpy.Describe(fc) chk = Checkbutton(root, text=desc.name, variable=var).grid(row=i, padx = 20 , sticky=W) features.append(fc) i = i + 1 Label(root, text="").grid(row=i, sticky=W) i = i+1 button = Button(root, text='OK', command=var_states) button.grid(row=i+1, sticky=W) button.place(relx=0.5, rely=0.9, anchor=CENTER) i = i+1 w = 350 h = i * 22 ws = root.winfo_screenwidth() # width of the screen hs = root.winfo_screenheight() # height of the screen x = (ws/2) - (w/2) y = (hs/2) - (h/2) root.geometry('%dx%d+%d+%d' % (w, h, x, y)) root.mainloop() #print map((lambda var: var.get()), states) I do not know how to find the features class chosen Does anyone have an example that I can use?
... View more
09-05-2017
05:58 AM
|
0
|
1
|
812
|
POST
|
Good afternoon, We only have the ArcGIS Basic, but we want to work with database version. Is it possible to create a local replica of the database version using Arcpy? This application would have to download and upload the data.
... View more
04-18-2017
10:11 AM
|
0
|
1
|
421
|
Title | Kudos | Posted |
---|---|---|
1 | 09-06-2017 11:34 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|