POST
|
Hi Randy, you should have opened a seperate thread for that ... I know of no python way to get this. ArcObjects I think to remember there is one ... In python you can use the saveACopy (file_name, {version}) method to save to a previous version - but unless you havent used any of the potential document properties to store a helper string in (like description, summary, tags ...) you will have to "guess" which version this is. Maybe the read-only property dateSaved could help to evaluate which version this is ... Regards Guenter
... View more
07-21-2010
10:22 PM
|
0
|
0
|
543
|
POST
|
Hi David, that was probably a little misleading, the computed field is the way to go ... I do not have a magic trick to do something like labeling classes for symbols. But a simplifying approach - if you need that more than just once - would be to create something like a "lookup-table" - say SYMBOL IsCONTOUR 1 20 1 40 1 60 1 80 2 100 1 120 ... and then join this via IsCONTOUR to the CONTOUR-Field of your lines and then use SYMBOL for symbolization ... that way you wouldnt have to do calculates and create new fields all the time ... Regards Guenter
... View more
07-21-2010
10:09 PM
|
0
|
0
|
427
|
POST
|
Hi David, I wonder: Did you see the "Contour List" Tool ... I think part of ArcGIS since 9.3? Here you can specify for which values to create contours and then you have an attribute "Contour" that you can use to symbolize whatever you want ... Like creating a special symbolization field ... i.e you could use a query definition to select all contours that are 20' but not 100' with MOD( "Contour",20) = 0 AND NOT MOD( "Contour",100) = 0 Give it a try Regards Guenter
... View more
07-21-2010
12:38 AM
|
0
|
0
|
427
|
POST
|
Hi everybody, while I fully support ESRIs official position on this (who wonders :D) I have fooled around with excactly this scenario to beta-test the customization options of ArcGIS 10 ... besides what Eric states below regarding the mix up of GUIs, Option dialogs etc. there are also a few spots where the single tools of the toolbox are more "modular" then the GUI in Spatial Analyst 9.x was ... I attached a customized MXD containing a Spatial analyst toolbar "mimicking" the old one ... with a few slight changes ... most of your old "shortcuts" will work, though (a bug) they are not visible in the GUI ... Have fun AND - hey - things they are changing! Adopt whats advantageous - and the new customization options are a big step forward for non-programmers! Regards Guenter
... View more
07-21-2010
12:12 AM
|
0
|
0
|
1170
|
POST
|
Hi Jeff, I use the os.walk function to do any recursive directory "thingies" ... Here a stub-code sample you might find useful:
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# ListMXDs.py
#
# Usage: ListMXDs <Directory to search>
# ---------------------------------------------------------------------------
import sys, os
#path to search - here hardcoded
theDirectory=r'C:\Archive'
#if parsed as argument
#theDirectory = sys.argv[1]
#File-Pattern to search
thePattern = "mxd"
#cycle through the directory and find all Files of type ...
for root, folders, AllFiles in os.walk(theDirectory):
print "********** \nWorking on folder "+root+"\n**********"
# now find mxds and print their names
for oneFile in AllFiles:
#only do something if it is an mxd
if oneFile.endswith(thePattern):
print oneFile
Regards Guenter
... View more
07-20-2010
11:31 PM
|
0
|
0
|
181
|
POST
|
Hi Christian, as far as I understood the "CURRENT" option is basically meant to be used from within the python-Window. Try to parse the full mxd-Path as an argument into your script and make the document line get that mxd = arcpy.mapping.MapDocument(r"C:\temp\xxtest.mxd")
Havent tried but its worth a try! Regards Guenter
... View more
07-20-2010
07:35 AM
|
0
|
0
|
543
|
POST
|
Hi Flavio, just add a redirection to the end of your batch commands, like (example with lots of variables) ... ISCommand MyAddTIFFs.ISCmd ^
--ISDef=%ISDEF_Path%\%ISDEF_Name%.ISDEF\ImageService.ISDef --Folder=%ISDEF_Folder% >>%ISDEF_Path%\%ISDEF_LOGFILE%.txt
Hope this helps Regards Guenter
... View more
07-20-2010
07:32 AM
|
0
|
0
|
330
|
POST
|
Hi Randy, are we talking ArcGIS 10? If so, you could first define a MosaikDatset from your 4band tifs - but only use the 3 bands you want to use. Mosaiks support this either while importing or later on the MosaicDataset Level by using an ExtractBands dynamic function ... then you could load the data into SDE from the Mosaic - if you still want to do that ... Give it a try - its time to get used to the power of MosaicDatsets anyway 😄 Regards Guenter
... View more
07-17-2010
08:27 AM
|
0
|
0
|
5492
|
POST
|
Hi Morten, I'll add that to my troubleshoot-list ... thanks and glad it works now! Regards Guenter
... View more
07-12-2010
07:32 PM
|
0
|
0
|
884
|
POST
|
Hi Morten, python is sensible in special characters ... we have them a lot in germany, too 🙂 Try adding a starting line to your python script telling it to work in unicode:
# -*- coding: utf-8 -*-
This LOOKS like a comment AND NEEDS TO BE THE FIRST LINE OF THE SCRIPT ... but it is important! You might want to use a different codepage ... or even go further and use the python concepts of .encode() and .decode() ... but usually declaring the codepage to work in will do! Regards Guenter
... View more
07-09-2010
02:08 AM
|
0
|
0
|
884
|
POST
|
Hi Robert, yes, if you intend to build a custom network "enriched" by your own data you will have to create a network dataset of ALL roads to be used ... and this will be possible with Network Analyst and the appropriate source data only Regards Guenter
... View more
07-09-2010
01:42 AM
|
0
|
0
|
202
|
POST
|
Hi, due to changes to the raster-engine between 9.3.1 and 10 you should contact ESRI Support with this case ... Regards Guenter
... View more
07-09-2010
12:52 AM
|
0
|
0
|
1665
|
POST
|
Hi Gaute, I can still provide a version for 9.3.1 with extended time-out In version 10 the new mosaic dataset offers workflows to create independant MosaicDatsets and then derive a Mosaic from it that consists of the entries the single (easily maintainable) datastes have. This is scriptable with python or programmable with ArcObjects if you have repeated procedures like that
... View more
06-22-2010
06:22 AM
|
0
|
0
|
280
|
POST
|
Hi, does that mean you will need more than 256 individual colors to display? Besides the fact that there will be no appropriate legend to that this sounds challenging ... You can actually define colors for a 32 bit floating point dataset ... if you define it as being elevation and visualize it with lets say a shaded relief process which uses a custom xml file for the relief colors ... and here you go - this is an xml file with range definitions in it and every range can get a color definition in RBG ... give it a try ... but for many values the definition of the XML might become anoying...
... View more
06-22-2010
06:14 AM
|
0
|
0
|
289
|
POST
|
Hi, I wont check through all your code, but there actually is one very prominent error: you coded: prows = gp.InsertCursor(OutputFC__3_)
# create point object to create feature
pnt = gp.CreateObject("Point")
pnt.id = 1
pnt.x = 566020
pnt.y = 252044
prow = prows.NewRow()
prow.Shape = Point
prow.Dt = count2
prow.H = count1 / count2
Point.Add(pnt)
prows.InsertRow(prow)
row = rows.Next() which wont work, since you assign Point to the shape of the newly added record ... this does not exist! try: prows = gp.InsertCursor(OutputFC__3_)
# create point object to create feature
pnt = gp.CreateObject("Point")
pnt.id = 1
pnt.x = 566020
pnt.y = 252044
prow = prows.NewRow()
prow.Shape = pnt here - to continue I'd use:
prow.SetValue("Dt", count2)
prow.SetValue("H" , count1 / count2)
this line here is wrong anyway and obsolete now Point.Add(pnt) this should be the correct end of your code:
prows.InsertRow(prow)
row = rows.Next() so altogether this section should read:
prows = gp.InsertCursor(OutputFC__3_)
pnt = gp.CreateObject("Point")
pnt.id = 1
pnt.x = 566020
pnt.y = 252044
prow = prows.NewRow()
prow.Shape = pnt
prow.SetValue("Dt", count2)
prow.SetValue("H" , count1 / count2)
prows.InsertRow(prow)
row = rows.Next()
Hope this helps Regards Guenter
... View more
05-11-2010
02:54 AM
|
0
|
0
|
670
|
Title | Kudos | Posted |
---|---|---|
1 | 06-14-2017 07:54 AM | |
1 | 07-04-2017 12:33 AM | |
1 | 06-15-2017 01:16 PM | |
1 | 08-08-2017 04:05 AM | |
1 | 08-04-2017 12:37 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:22 AM
|