|
POST
|
I performing a 'Find Data Source' Python script on mxd data files. However, the table report does not automatically open. What do I need to do to read the results? Shelly Guess that depends on where your script is telling python to "write" the results... Would need more info for this. What is "a Find Data Source" python script? What is the code telling it to report, and where? I don't see any built in tool/script named that, maybe it is hidden somewhere that I'm not seeing or is this custom code? R_
... View more
06-26-2013
02:39 PM
|
0
|
0
|
684
|
|
POST
|
Could be a couple reasons. One, if it is a python script that you are clicking on, there is no export option as it is already a .py file. Can just choose "Edit" and will get the source. If it is a model that you are clicking on, it will be greyed out as well. however, if you click "Edit" on the model, then under the file menu, you should be able to export it. R_
... View more
06-26-2013
02:32 PM
|
0
|
0
|
782
|
|
POST
|
Hard to say without seeing the previous code. not sure if you don't have a dataset named select in your workspace. or, what dataset have you defined to the variable select? what about buffer? Also, I'd look into the help documentation on both erase and select to see how to code them. I see no examples of actually setting it equal to something. SelectLayerByAttribute_management (in_layer_or_view, {selection_type}, {where_clause}) http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000071000000 will create the selection on the in_layer_or_view, and this would be the input for your other tool(s) Erase_analysis (in_features, erase_features, out_feature_class, {cluster_tolerance}) http://resources.arcgis.com/en/help/main/10.1/index.html#/Erase/00080000000m000000/ Erase creates a new out feature class, not sure what erase = would do .... R_ PS 10.1 has no problem consuming older feature classes, just doesn't work the other way.
... View more
06-26-2013
12:18 PM
|
0
|
0
|
1559
|
|
POST
|
Could try something like this:
# Mosaic : Date 02, January, 2001
import arcpy, os
rasts = []
try:
workspace = arcpy.env.workspace = r"L:/MODIS_NDVI/TIF_files/2001"
rasterList = arcpy.ListRasters("*","TIF")
for raster in rasterList:
rasts.append(raster.split(".")[0]) ## grabs the filename before first "." which is J year and appends to the list "rasts"
del raster
rastSet = set(rasts) ## make a set so unique (no duplicates) - result of one entry for each julian year
for r in rastSet: ##iterate through set
newList = []
for raster in rasterList: ## iterate through list of rasters again, and those that start with our value for r are appended to NewList.
if raster.startswith(r):
newList.append(raster) ## use this newList as you raster list for mosaic tool
want to do the mosaic at this indentation level so it only does it for r = singlevalue
del raster
del newList
except:
print "Mosiac failed."
print arcpy.GetMessages()
That should get you going, R_
... View more
06-26-2013
12:08 PM
|
0
|
0
|
2812
|
|
POST
|
sounds like the field "cDataFileNFailed" is either not a text field, or is not large enough to hold that string. R_
... View more
06-26-2013
11:35 AM
|
0
|
0
|
1311
|
|
POST
|
At the bottom of the SelectionWidget.xml there is an <info>widgets/InfoTemplates/InfoPopupWidget.swf</info> tag. Make sure it is set to the correct path to your .swf file (remember, it is CaSe sensitive). If that doesn't work, what does the rest of the error message say? R_
... View more
06-26-2013
08:13 AM
|
0
|
0
|
2602
|
|
POST
|
I have no problem sharing my code. besides, anyone I work with would need to come back to me to modify it for them anyway :cool: R_
... View more
06-25-2013
05:38 PM
|
0
|
0
|
1841
|
|
POST
|
of course, with the "new" security after XP, you need to make sure your group policy allows it. I have to remain logged in for my scheduled task to work as the GroupPolicy is set to: Network access: Do not allow storage of passwords and credentials for network authentication. If this is set, you are not allowed to run when not logged in (you can, but very limited and local resources only, no network access). My workaround is to remain logged in, at least, until I can get IT to change the policy for that box. R_
... View more
06-25-2013
11:26 AM
|
0
|
0
|
1697
|
|
POST
|
I need to create a series of points on a polyline. My polyline has a start and end point and I have distances for points along that line that I need to plot. My polyline is 250 m long and I have points with distances from 0-250m on the polyline. The distances of the points are uneven from the start of the polyline. Does anyone know how to do this or if there is a script to tell ARC to create points on a line based on the location? Well, if it is along a single line with only two points, you could use the start point as your begining, then use Cosine to calculate the Oposite and Adjacent distances using your angle and length. (startX + Adjacent), (startY + Opposite) would be the "new" point at your distance along the line. Then, the only thing that changes is the distance, so just iterate it using same math, but with different length. Could also create lines starting at start point in dist/direction, then get end verticies. R_ This, of course is assuming you are after code. In ArcMap, just start editing and add points (using Point at end of line Tool) with snapping on. Snapping will start at the endpoint of your line, then right-click and select "Lenth", enter your lenth and it will "fix" it, then move until you snap back to the line and finish sketch. Do this for each of your points and you are done. Also in ArcMap, if your line has M values, can use construct points tool http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001t00000029000000.htm.
... View more
06-25-2013
10:46 AM
|
0
|
0
|
2360
|
|
POST
|
Stew, I know that you can have the best of "both" worlds, but know there are limitation as to what the app builder can do, especially for custom widgets and configuring. I know that you can add widgets with limited config capabilites that can be fully configed once "outside" of app builder. The one thing that I would check and make sure is that if you make a change to the xml, then "re-configure" that widget in app builder, I would make sure that the changes you made outside of app builder are not getting re-set by app builder. One thing I find handy is to load the xml directly into the browser http : //yourservername.com/flexviewer/widgets/identify/identifywidget.xml . This will show you in the browser the "current" file on the server that is being loaded for the config. Make sure you see the changes here, then it's just a matter of configuring correctly. R_
... View more
06-25-2013
08:18 AM
|
0
|
0
|
1367
|
|
POST
|
Andy, Here you go. Configured for 10.0x SOE server (which means it doesn't work with the SOE sever listed in the config file). R_
... View more
06-25-2013
08:09 AM
|
0
|
2
|
922
|
|
POST
|
Figured it was a public site, that is why I mentioned it. Maybe it is a security issue. Sandbox security issues are when the site is not allowing/blocking traffic to Adobe apps. For this server http://svctenvims.dot.ca.gov/dea_web_gis/rest/services/agencies , I can see the rest services, export map, view in all the options EXCEPT flash. http://resources.arcgis.com/en/help/flex-api/concepts/index.html#//017p0000001w000000 If I try to load that mapservice into my FV app(s), I get a sandbox security error message telling me that this site doesn't allow me to load services into flash. SecurityError: Error #2048: Security sandbox violation: http://gis01.wch-rcc.com/fv31_2/index.swf cannot load data from http://svctenvims.dot.ca.gov/dea_web_gis/rest/services/agencies/agencies/MapServer/?f=json.
at com.esri.ags.tasks::BaseTask/handleFaultEvent()
at mx.rpc::AsyncResponder/fault()
at mx.rpc::AsyncToken/http://www.adobe.com/2006/flex/mx/internal::applyFault()
at mx.rpc.events::FaultEvent/http://www.adobe.com/2006/flex/mx/internal::callTokenResponders()
at HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()
at mx.rpc::Responder/fault()
at mx.rpc::AsyncRequest/fault()
at DirectHTTPMessageResponder/securityErrorHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/redirectEvent()
I don't know that much about them, but it almost appears as if they are missing the allow-access portion from the crossdomain file. http://svctenvims.dot.ca.gov/crossdomain.xml Not sure what "site-control" without "allow-access" is supposed to allow, but I get denied every time using FV3.1 or FV3.3. This crossdomain from ESRI works "most of the time" http://geocode.arcgis.com/crossdomain.xml . R_
... View more
06-25-2013
07:46 AM
|
0
|
0
|
1361
|
|
POST
|
Stewart, I don't use app builder, so I'm not sure. I believe app builder only works with compiled apps, so it shouldn't be re-compiling it for you, especially with only .xml changes. Not sure if app builder will re-write the xml file every time you configure, but know there are certain configs that you can't do within the app builder. However, if I change the xml(s) on my server (for that FV app) for a widget, the changes are reflected the next time I do a clean load into the browser (can do this with any text editor, so is independant of the "build"). So, you should be able to make the config changes on your server folder and have them take effect. Not sure, however, if app builder will "remove" your customizations if you open/configure that widget again or not. You would have to test. With the identifywidget, I find it much easier to just put ONE layer in there and get it configured so that it is reporting as you want, then I add my other layers to the xml. R_
... View more
06-25-2013
07:27 AM
|
0
|
0
|
1367
|
|
POST
|
Would probably read the years, months, and dates into their own list.
# Mosaic : Date 02, January, 2001
import arcpy, os
years = []
months = [] ## either populate these manually or read in
dates = []
try:
for year in years:
for month in months:
for date in dates:
workspace = arcpy.env.workspace = r"L:\MODIS_NDVI\TIF_files" + os.sep + year + os.sep + month + os.sep + date
rasterList = arcpy.ListRasters("*","TIF")
outLoc = workspace + os.sep + "mosaic.tif"
arcpy.MosaicToNewRaster_management(rasterList, outLoc, "", "16_BIT_SIGNED", "", "1", "LAST", "FIRST")
except:
print "Mosiac failed."
print arcpy.GetMessages()
Have not tried this, nor am I anywhere that I can but should make a new mosaic.tif file in each date folder with all the tiff files from that folder mosaiced. R_
... View more
06-24-2013
06:36 PM
|
0
|
0
|
2812
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-14-2026 04:00 PM | |
| 1 | 09-14-2022 07:53 AM | |
| 1 | 09-14-2022 08:23 AM | |
| 1 | 05-21-2026 08:53 AM | |
| 1 | 05-14-2026 04:28 PM |
| Online Status |
Online
|
| Date Last Visited |
Wednesday
|