|
POST
|
First of all verify the location and name of you sde (connection) file: On Windows XP or Server 2003, navigate to Documents and Settings > <user_name> > Application Data > ESRI > Desktop<release#> > ArcCatalog. On Windows Vista, 7, or Server 2008, navigate to Users > <user_name> > AppData > Roaming > ESRI > Desktop<release#> > ArcCatalog. The file has an extension of .sde. Example I have one here:
conn = r"C:\Users\xbakker\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog\NameOfMyConnectionFile.sde"
To make use of the ListTables and ListFeatureClasses(), you will have to set your connection file to be the current workspace. You can do this like this:
arcpy.env.workspace = conn
Since featureclasses can reside in datasets you should list the available datasets first;
lst_fds = arcpy.ListDatasets()
lst_fds.append("")
The second line is to append an empty string to the list of feature datasets, since featureclasses may reside outside a dataset. Next go through each dataset in the list and create for each dataset a list of featureclasses:
for fds in lst_fds:
fcs = arcpy.ListFeatureClasses(feature_dataset=fds)
Using this list of featureclasses you can loop through each featureclass in that list and do something with it:
for fc in fcs:
print fc
So the script to, in this case, print the names of all the featureclasses in the enterprise geodatabase would be:
import arcpy
# name and location of your connection file
conn = r"C:\Users\xbakker\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog\NameOfYourConnectionFile.sde"
# set the current workspace
arcpy.env.workspace = conn
# create a list of feature datasets and append an empty string to the list
lst_fds = arcpy.ListDatasets()
lst_fds.append("")
# loop through the list of feature datasets
for fds in lst_fds:
# list the featureclasses in the current dataset
fcs = arcpy.ListFeatureClasses(feature_dataset=fds)
# loop through each featureclass in the current dataset
for fc in fcs:
# do somethig with the featureclass
print fc
Kind regards, Xander
... View more
11-06-2014
04:57 AM
|
0
|
0
|
3225
|
|
DOC
|
Hi Neil, I added your example with some additional explanation to the document (in ' Working with Lists'). Thanx for your contribution! Kin regards, Xander
... View more
11-05-2014
05:27 AM
|
0
|
0
|
18502
|
|
POST
|
I guess you are looking for the REST API. In case you want to query a featureservice layer you can find the details here: ArcGIS REST API - Services and Data Types In case of a map service more info here: ArcGIS REST API - Services and Data Types The JSON syntax of geometries can be found here: ArcGIS REST API - Services and Data Types Kind regards, Xander
... View more
10-30-2014
05:46 AM
|
0
|
0
|
699
|
|
POST
|
Hi Leo, The argument (list of rasters) is indeed incorrect. If you look at the help page, at the bottom there is a python sample. The list of raster is actually a string and each raster is separated by a semicolon. Be aware that the name of each raster should include the workspace in case the rasters do no reside in the current workspace. There is actually more. I noticed that first and second list will actually contain the same information, since they point to the same folder. So you have to check that too. If you are sure that there are as many h26 as h27 tiffs and the structure of the name is the same. You can create a list for the h26 rasters and derive the h27 name from it. Kind regards, Xander
... View more
10-19-2014
04:38 PM
|
0
|
0
|
2628
|
|
POST
|
Hi David, The key to this type of analysis is to set the geoprocessing environments; the extent, cellsize, spatial reference, etc that will be used in the analysis. Important are: Output coordinates Processing extent (including snap raster if you already have a raster) Raster Analysis, cell size This should be done, before converting vector data to raster and will force the data to use the same extent. By default many raster tools will use an output extent that is the intersection of the input extents of the rasters. I am not able to see the images you zipped and attached to your post. Consider to include the images in the post the next time and not zip and attach them. This makes it a lot easier and faster to see what you mean. The merge tool is used to merge adjacent data and not to sum pixel values. The Cell statistics tool can be used for that purpose, but make sure that the "Ignore NoData in calculation" is checked to avoid NoData to propagate in the result. Read this topic for more information on NoData cells: ArcGIS Help (10.2, 10.2.1, and 10.2.2) Please note that when doing cost distance calculations that the rasters that make up the cost raster, cover the entire extent, otherwise lower cost values will influence the route calculated since the cost will result in a lower value. Kind regards, Xander
... View more
10-08-2014
08:24 PM
|
1
|
0
|
1110
|
|
POST
|
Hi Andrew, Maybe the "Mosaic To New Raster (Data Management)" with the BLEND mosaic method comes close to what you are trying to obtain: BLEND —The output cell value of the overlapping areas will be a horizontally weighted calculation of the values of the cells in the overlapping area. Kind regards, Xander
... View more
10-08-2014
07:49 PM
|
2
|
0
|
726
|
|
POST
|
Hi Miranda I hate to disappoint you, but when you georeference a satellite image in ArcMap, you still do not have the necessary data to generate a Digital Elevation Model. Have a look at this Wiki GIS article: Digital Elevation Model - GIS Wiki | The GIS Encyclopedia or this presentation that I created a while ago on Digital Elevation Models and their applications:Digital Elevation Models - WUR - Grontmij There are however a lot of free DEM (or LiDAR) resource where you can download DEM data directly. To give you a few pointers: Digital elevation model - Wikipedia, the free encyclopedia http://nationalmap.gov/elevation.html Free Satellite Data - TERRAINMAP Satellite Image Analysis USGS SDTS format Digital Elevation Model data (DEM) Lidar Links of Use in Mapping EarthExplorer Kind regards, Xander
... View more
10-08-2014
07:15 PM
|
0
|
0
|
2305
|
|
POST
|
Hi Blake, If you work with Geoprocessing services, an input featureclass will be send as FeatureSet to the service (in json). The IN_MEMORY workspace is, as the name suggests, a workspace that is available in memory to write (intermediate) results to. Since a FeatureSet is a lightweight abstract of a featureclass, it does not support all the methods a (in_memory) featureclass does. Both are used in different ways for different purposes. Maybe you can explain in what type of process you would like to use them to be able to give some suggestions on what type to use... Kind regards, Xander
... View more
10-08-2014
06:51 PM
|
2
|
1
|
1481
|
|
POST
|
Hi Phil, Thanks for sharing! It sounds correct to me, although some of the point locations look a bit odd (at the extremes east and west, but might have to do with the differences in angle when it's near to sunrise or sunset). You could use the solar radiation tools provided by ArcGIS to test the area you want to clear. You should add the trees (area not being logged with an altitude of 70ft) and test the solar radiation it receives. Kind regards, Xander
... View more
09-29-2014
11:54 AM
|
0
|
1
|
3264
|
|
POST
|
Good to hear that Phil. Python is the scripting language for these type of problems. If you manage to solve the problem, share a little map of the result. It will be interesting to see what it looks like. Kind regards, Xander
... View more
09-28-2014
01:46 PM
|
0
|
4
|
3264
|
|
POST
|
I guess a python script as scheduled task (that runs each night) could do this job automatically.
... View more
09-28-2014
01:42 PM
|
0
|
1
|
848
|
|
POST
|
You might be interested in this thread: Extract Feature Attachments Kind regards, Xander
... View more
09-28-2014
11:35 AM
|
0
|
0
|
1668
|
|
POST
|
Not sure why you want to do this... It is possible to "hide" the column. This way the data remains, but is not visible. In case you don't want to keep the content of the column you can replace them with Null of blanks... Kind regards, Xander
... View more
09-28-2014
11:29 AM
|
0
|
1
|
1053
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-09-2020 09:26 AM | |
| 6 | 12-20-2019 08:41 AM | |
| 1 | 01-21-2020 07:21 AM | |
| 2 | 01-30-2020 12:46 PM | |
| 1 | 05-30-2019 08:24 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|