POST
|
There is a zip file (“TEST.gbd.zip”) containing a File Geodatabase with both feature classes from FTP County and I need it to download. What is the python script for this case? Please advise. Thank you. For example, I pulled this part of script like this: but what about zip file? # List of Other files to download
# Syntax: County file name with extension separated by colon, then
# the FTP Folder name
CountyOtherFiles = {
'pa_parceldata.dat':r'GISdata/Pa_data/',
'pa_parceldata.txt':r'GISdata/Pa_data/',
'pa_legal_ln.dat':r'GISdata/Pa_data/',
'pa_legal_ln.txt':r'GISdata/Pa_data/',
} I am new to python script. I have been researched thru here and having difficult to find a right answer. I have compressed zipfile in FTP WinSCP. I am trying to extract or unzip in python from FTP Winscp? It has compressed zip file in FTP. I have Winscp connect to FTP. I am not sure what is the right script for this case. I already have script set up that has been created by someone else. Please advise. Thank you. I tried to use this script but I got an error. ZipFile.extractall(path='GISData/Pubshp', members= 'PaFiles.gdb.zip')NameError: name 'ZipFile' is not defined Python Geodatabase
... View more
08-24-2017
01:32 PM
|
0
|
3
|
3159
|
POST
|
I figured it out the correct python script. It is working now. # Name: FeatureClassToFeatureClass_Example2.py # Description: Use FeatureClassToFeatureClass with an expression to create a subset # of the original feature class. # Import system modules import arcpy arcpy.env.overwriteOutput = True # Set environment settings arcpy.env.workspace = "N:\_Alexis\GISData\Pubshp\CityHall.shp" # Set local variables inFeatures = "CityHall" outLocation = "Database Connections\SDE.sde" outFeatureClass = "CityHall2" # Execute FeatureClassToFeatureClass arcpy.FeatureClassToFeatureClass_conversion(inFeatures, outLocation, outFeatureClass)
... View more
08-24-2017
11:44 AM
|
1
|
0
|
2151
|
POST
|
I recent run again and it gave me an error. Traceback (most recent call last): File "N:\_Alexis\GIS ArcPy\TEST_CityHall2.py", line 6, in <module> "CityHall2") File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\conversion.py", line 1790, in FeatureClassToFeatureClass raise e ExecuteError: ERROR 000258: Output Database Connections\SDE.sde\CityHall2 already exists Failed to execute (FeatureClassToFeatureClass). I added it. import arcpy arcpy.env.overwriteOutput = True arcpy.env.workspace = "N:\_Alexis\GISData\Pubshp\CityHall.shp" arcpy.FeatureClassToFeatureClass_conversion("CityHall", "Database Connections\SDE.sde", "CityHall2")
... View more
08-24-2017
10:53 AM
|
0
|
0
|
2151
|
POST
|
I added it and there is no error message. I think it is working. Thanks! import arcpy arcpy.env.overwriteOutput = True arcpy.env.workspace = "N:\_Alexis\GISData\Pubshp\CityHall.shp" arcpy.FeatureClassToFeatureClass_conversion("CityHall", "Database Connections\SDE.sde", "CityHall2") This is what I got result: It seems working. >>> ================================ RESTART ================================ >>> >>> Do you know what script is it? What do you recommend to set up python script that included whole feature class like drawing and tables?
... View more
08-24-2017
08:15 AM
|
0
|
0
|
2151
|
POST
|
Yes. This is what I am looking for. However, python script turned out an error when it tried to run. It is working fine inside ArcMap with Pyrhon window (arcpy)? I put overwrite the outputs of geoprocessing operations. It is succeeded. However, when I tried to run on Python script itself, it gave me an error. How can I fix it? See this message below. I used script in ArcMap with Python Window and it succeeded: import arcpy arcpy.env.workspace = "N:\_Alexis\GISData\Pubshp\CityHall.shp" arcpy.FeatureClassToFeatureClass_conversion("CityHall", "Database Connections\SDE.sde", "CityHall2") This is used in python script I used the same from ArcMap and gave me an error when I tried to run it. Traceback (most recent call last): File "N:\_Alexis\GIS ArcPy\TEST_CityHall2.py", line 5, in <module> "CityHall2") File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\conversion.py", line 1790, in FeatureClassToFeatureClass raise e ExecuteError: ERROR 000258: Output Database Connections\SDE.sde\CityHall2 already exists Failed to execute (FeatureClassToFeatureClass).
... View more
08-24-2017
07:48 AM
|
0
|
5
|
2151
|
POST
|
I set it up and it is working however how do i set it up every time I make change from shapefile to SDE feature class? I don't see change on SDE feature from shapefile. Am I missing something? For example, weekly Monday import shapefile from SDE feature class.
... View more
08-23-2017
10:30 AM
|
0
|
7
|
2151
|
POST
|
how to set up automate from shapefile to sde feature class connection? Can it be command or other recommend? Please advise. Thank you.
... View more
08-23-2017
08:35 AM
|
0
|
9
|
3069
|
POST
|
Where can I message it to you private? The link is not supposed to be in public yet.
... View more
08-22-2017
11:37 AM
|
0
|
1
|
747
|
POST
|
I looked into developer tools on Internet Explorer and this is the console I got: "SCRIPT7002: XMLHttpRequest: Network Error 0x2efd, Could not complete the operation due to error 00002efd. index.html" What is this mean? Is it my internet browser or is it something to do with my map?
... View more
08-22-2017
08:39 AM
|
0
|
5
|
747
|
POST
|
I wasn't sure and wasn't familiar with data OBJECTID part. Thank you for clarify!
... View more
08-22-2017
07:37 AM
|
0
|
0
|
1531
|
POST
|
Is there any other way to avoid that? Do you have any recommend?
... View more
08-22-2017
07:14 AM
|
0
|
4
|
1531
|
POST
|
Hi, When I deleted a row data on Attribute table and I noticed on OBJECTEDID a number skipped when I create another new one. See screenshot. Is there anyway to fix? Please advise.
... View more
08-22-2017
06:56 AM
|
0
|
8
|
2089
|
POST
|
If I want to customize story app such as add features in source code to index html story map, is this the only way to this link below and cannot use ArcGIS Online Assistant? https://developerscorner.storymaps.arcgis.com/an-introduction-to-hosting-your-own-story-map-e2450181ad2f
... View more
08-21-2017
09:01 AM
|
0
|
1
|
488
|
POST
|
I think it is my computer. I tested other computer and it is working fine. I will look into it. Thank you!
... View more
08-21-2017
08:55 AM
|
0
|
0
|
747
|
Title | Kudos | Posted |
---|---|---|
1 | 07-25-2018 12:53 PM | |
1 | 08-06-2018 12:27 PM | |
1 | 07-06-2018 01:00 PM | |
1 | 05-04-2018 08:52 AM | |
1 | 07-30-2021 10:26 AM |