POST
|
Hi there, I have exported a python script from model builder and I am now trying to make that script run as a stand alone script. The script in question is using the CreateFileGDB tool, CreateFeatureDataset tool and FeatureClassToGeodatabase tool. I am currently getting an ImportError: No module named arcpy. I am very new to python and I am going to have to create stand alone scripts for everything I do in ArcGIS for this project so I would be very grateful for any help or advise on the subject. I am using ArcGIS 10.3.1 and Python 2.7.8. The code and results are provided below. # Import arcpy module
import arcpy
# Local variables:
v1km_grid_Eng_Wales_shp = "D:\\16426-0\\NVZstats_spatial_data\\1km_grid\\1km_grid_Eng_Wales.shp"
Eng_2010_land_cover_local_shp = "D:\\16426-0\\NVZstats_spatial_data\\LandUse_Cover\\Eng_2010_land_cover_local.shp"
rbcv16_shp = "D:\\16426-0\\NVZstats_spatial_data\\WFD_WBs_cycle1\\rbcv16.shp"
Python_Tests = "D:\\Python Training\\Python Tests"
GDB_Test_v1_gdb = Python_Tests
Shapefiles = "D:\\Python Training\\Python Tests\\GDB_Test_v1.gdb\\Shapefiles"
Shapefiles__2_ = Shapefiles
# Process: Create File GDB
arcpy.CreateFileGDB_management(Python_Tests, "GDB_Test_v1.0", "9.3")
# Process: Create Feature Dataset
arcpy.CreateFeatureDataset_management(GDB_Test_v1_gdb, "Shapefiles", "PROJCS['British_National_Grid',GEOGCS['GCS_OSGB_1936',DATUM['D_OSGB_1936',SPHEROID['Airy_1830',6377563.396,299.3249646]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',400000.0],PARAMETER['False_Northing',-100000.0],PARAMETER['Central_Meridian',-2.0],PARAMETER['Scale_Factor',0.9996012717],PARAMETER['Latitude_Of_Origin',49.0],UNIT['Meter',1.0]];-5220400 -15524400 10000;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision")
# Process: Feature Class to Geodatabase (multiple)
arcpy.FeatureClassToGeodatabase_conversion("D:\\16426-0\\NVZstats_spatial_data\\1km_grid\\1km_grid_Eng_Wales.shp;D:\\16426-0\\NVZstats_spatial_data\\LandUse_Cover\\Eng_2010_land_cover_local.shp;D:\\16426-0\\NVZstats_spatial_data\\WFD_WBs_cycle1\\rbcv16.shp", Shapefiles) Here is the error: Traceback (most recent call last):
File "D:\Python Training\Test_GDB2.py", line 10, in <module>
import arcpy
ImportError: No module named arcpy Any help in fixing this code would be much appreciated. I hope I have provided all the information that you need, if not please let me know. Ben.
... View more
06-10-2015
05:52 AM
|
0
|
4
|
6766
|
POST
|
Hi there, I would like to no if it is possible to have an R script save an output dataset directly into a file geodatabase and what are the commands needed to achieve this? Any help on this topic would be much appreciated. If the answer is too complex to explain on this thread then I would be grateful to be pointed to any online sources which would provide me with the information that I need. Please let me know if you need anymore information. Thank you, Ben.
... View more
06-09-2015
04:55 AM
|
1
|
0
|
2959
|
POST
|
Thank you, that has worked perfectly much appreciated.
... View more
06-02-2015
06:29 AM
|
0
|
0
|
372
|
POST
|
Hi all, I would very much appreciate some help in working out how to create a particular type of layer/map. I have a polygon layer which represents spatial coverage of three different categories. At the moment these categories are represented as separate polygons. In certain areas the different categories overlap each other, so I want to create a map which represents areas where there are more than one category. This would mean that the final map should show seven different spatial classifications, as shown below: Category A Category B Category C Category A and B Category A and C Category B and C Category A, B and C I am stuck on working out how to create this sort of map/layer. If anyone could point me in the right direction so I at least know where to begin then that would be great. Sorry if I have not explained it very well, please ask if you need anymore information. Thanks, Ben.
... View more
06-02-2015
05:08 AM
|
0
|
2
|
3436
|
Title | Kudos | Posted |
---|---|---|
1 | 06-09-2015 04:55 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|