|
POST
|
Ted, If an existing tool does the job you need it to do then just call it using the IGeoProcessor object and it's execute method. Follow the link and you'll see an example of how the code is put together to call an existing tool. You'll see that the execute method returns a GeoProcessorResult and you can check the status property to see if it ran without error. Duncan
... View more
05-27-2013
02:53 AM
|
0
|
0
|
766
|
|
POST
|
Tai, One way is to tag the text element name property using the IElementProperties3 Interface. This would be equivalent to you going into the text element in page layout and setting the name property under the size and position tab. Duncan
... View more
05-27-2013
02:40 AM
|
0
|
0
|
792
|
|
POST
|
Just adding my experience to this thread. I've created a python script (Arcgis 10.1, sp1,(build 10.1.1.3143)) and have been running it in Pyscripter. It updates the datasources of layers and then saves the mxd. I've noticed that these green lines have appeared in the mxd layout. I think its some sort of corruption of the mxd being introduced by arcpy. There is also a discussion on GIS stack exchange about this which ironically links back to this thread... Duncan
... View more
05-20-2013
10:20 AM
|
0
|
0
|
6657
|
|
POST
|
Are you saying you rail realignment is over 3000Km long??? Your grid data is covering an area of 3118Km by 2244Km. It may be worth the effort to clip back your DEM to the area you are doing the analysis on.
... View more
05-14-2013
07:19 AM
|
0
|
0
|
2473
|
|
POST
|
Not sure why that would happen, I guess its just defaulting to somewhere as the workspace has not been set. You set the workspace with the following code arcpy.env.workspace = r"C:\temp"
... View more
05-14-2013
06:33 AM
|
0
|
0
|
4937
|
|
POST
|
What do you mean by centreline? What if you have multiple overlapping polygons, what do you envisage in that scenario? May be you should upload a sketch of what you are after?
... View more
05-14-2013
06:25 AM
|
0
|
0
|
3167
|
|
POST
|
Steve, For the benefit of others you should mark you post as answered and are encouraged to vote up or down answers/questions. Duncan
... View more
05-14-2013
05:31 AM
|
1
|
0
|
8780
|
|
POST
|
Definitely for ESRI grids but also good practise for other datasets. For example if you create a bunch of shapefiles starting with numbers then decide to import them into a geodatabase, you cannot, as geodatabases do not support tables beginning with numbers or contain spaces\weird characters. So avoid shooting yourself in the foot all the time and employ a strict, simple, naming convention backed up with simple metadata to explain the name if it gets a bit cryptic (which it can if you start generating hundreds of datasets). If you start geo-processing with crazy names then python/model builder will blow up and cause you a head ache. And they do get crazy, some "expert" consultant was sending me data with commas and superscript 2's in the dataset name...
... View more
05-14-2013
02:35 AM
|
0
|
0
|
8780
|
|
POST
|
Mark, You manipulate the extent throught the IActiveView interface. Duncan
... View more
05-14-2013
01:02 AM
|
0
|
0
|
1425
|
|
POST
|
When you set the raster output name you should always use 8 characters or less, does not start with a number, uses a..z and 0..9 are characters only and don't place your grid in a folder with spaces or other weird characters. So avoid "documents & settings" as this has spaces and an & symbol. Keep your folder structure and naming convention simple. This does mean the naming convention can become quite cryptic but then thats what metadata is for... File geodatabases can support rasters with longer names. Duncan
... View more
05-14-2013
12:57 AM
|
1
|
0
|
8780
|
|
POST
|
Michael, Are you asking you want to actually see the text " YYYYMMDD HH:mm:SS UTC " as a default rather than "12:00:00 AM" or you want to see "12:00:00 AM" in the "YYYYMMDD HH:mm:SS UTC" format? From your code you create a datetime object but don't actually set any of its properties, have a look at the examples at the end of this page. Duncan
... View more
05-14-2013
12:48 AM
|
0
|
0
|
2896
|
|
POST
|
Rob, Move the line that creates the spatialfilter object out of your looping code and place it above, you only need to create this object once. So move these line above the beginning of your loop ISpatialFilter SPF = new SpatialFilter();
SPF.SpatialRel = esriSpatialRelEnum.esriSpatialRelWithin;
Duncan
... View more
05-10-2013
03:37 AM
|
0
|
0
|
949
|
|
POST
|
The shutil error maybe occurring because you have not imported the module? You would need to put it at the top of your script. import shutil But looking at your code I notice you have not put an "r" in front of your strings. You want your code to look like: Output_mxd = r"G:\GIS\Weave\mxd\REBUILD\newDataSource_EmptyOutput_3.mxd"
... View more
05-08-2013
05:36 AM
|
0
|
0
|
2797
|
|
POST
|
Jeff, Just looked at your sample data on a machine without spatial analyst so I can't test the cell statistics tool. I did notice that your raster format is floating point. So the error you are seeing is caused by the computer not being able to store the number precisely. Your mean values are very small. If I have understood you, if you add all the cells up in a single grid then it should be exactly 1? Well I've not seen this! I went into the symbology tab > classified and clicked on classify to have a look at the SUM, none of them added up precisely to 1. This is where the issue lies. That's why none of the examples you see in Help are floating point... 😉 Duncan
... View more
05-07-2013
11:47 AM
|
0
|
0
|
3060
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-03-2026 07:31 AM | |
| 3 | 06-29-2026 05:17 AM | |
| 1 | 02-15-2023 05:45 AM | |
| 1 | 06-16-2026 02:37 AM | |
| 1 | 06-15-2026 08:29 AM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|