|
POST
|
I have tried with the same MapService on both 10.0 and 10.1. For some of them on 10.1, I had to edit the service, and tell it to load dynamically, then restart service, then edit again and tell it to cache and point it at the existing cache folder. Now, I get the same results regardless of the server/version I am calling from at least with FV2.5, 3.1 and 3.3) none of which is appending an extention on there. (same tile/request different servers) http://gis01.wch-rcc.com/ArcGIS/rest/services/Base/RGBs_complete/MapServer/tile/1/1250/1073 http://wc98116.wch-rcc.com:6080/arcgis/rest/services/Base/RGBs_complete/MapServer/tile/1/1250/1073 R_
... View more
05-13-2013
02:04 PM
|
0
|
0
|
1014
|
|
POST
|
Stuart/Alex, Here are the nuts and bolts of it: This is using the python that comes with 10.1 (v2.7.2). import arcpy, os from arcpy import da inTable = "C:\\Connection to RCES_P.sde\\SIS_ADM.IMAGES" # table with identifier (SITE_CODE), imageID number (IMAGE_ID), and photo in BLOB field (PHOTO) savepath = "\\\\mcflight01\\WebImages" # initial path to save images/sub folders with da.SearchCursor(inTable,['SITE_CODE','IMAGE_ID','PHOTO']) as cursor: for row in cursor: SITE_CODE = str(row[0]) # gets feature identifier from table (SITE_CODE) as string Fid = str(int(row[1])) # gets ImageID from table (IMAGE_ID) as string without decimal point binaryRep = row[2] # get photo from BLOB field as binaryRep variable filename = (SITE_CODE.replace(':','_')).replace('/','') + "_" + Fid + ".jpg" # appends site_code to filename replacing : and /'s folder = savepath + os.sep + SITE_CODE.replace(':','_') # appends site_code to folder replacing : with _ if binaryRep: if not os.path.exists(folder): os.system("mkdir " + '"' + folder + '"') # if doesn't already exist, make folder using folder variable open(folder + os.sep + filename, 'wb').write(binaryRep.tobytes()) # this actually saves the BLOB stored in binaryRep to filename variable del binaryRep del row R_
... View more
05-13-2013
01:33 PM
|
0
|
0
|
6374
|
|
POST
|
Dustin, With python and ArcGIS, I have found that it is normally best to execute all python scripts (at least scheduled ones) from a batch file. this way, once it is done with that particular script, since it was spawned in a separate python instance, it will then relsease all the "cryptic" locks it puts on the data and can move on to the next script. So, if I have many scripts to run, I make one python script with a bunch of os.system(batchfilename) calls, will run the script, close the process, and move on. each batch file is similar to : cd C:\Python27\ArcGIS10.1
Python C:\arcgisserver\python\finish.py
pause
Exit Which sets the path to the python version I want to use, then executes the finish.py script, then exits when done. To schedule, I just use the windows scheduled tasks (task scheduler in Win 7) to run it on a nightly/weekly basis. The "pause" in red I normally REM out, but is nice when developing so it doesn't just close the window down if it encounters an error. R_ Instead of the windows scheduler, I have used pyCRON in the past as well. Works like CRON on 'IX systems.
... View more
05-13-2013
10:36 AM
|
0
|
0
|
6374
|
|
POST
|
Dustin, I have a similar workflow, with photos stored in BLOB fields and one to potentially many photos per feature. The attachemnts feature doesn't really support 1:many so I have a python script that extracts the jpeg photos from the blob and saves them in a folder. As it is writing the blobs, I capture the path and filename that I am saving them to (as well as my feature ID) and append to a list, then at the end of my script, I insertCursor the list to populate a FGDB table. Now I not only have the jpeg stored local in a folder, I also have a ready-made table with all my paths ready to join/calculate to the feature class data that can be used for my link field. Of course, I had to make a virtual directory on the server pointing to the folder I saved all my jpegs in, then had to go into IIS and, for that virtual folder, allow directory browsing as I often have many photos per site (if just one photo, my "path" actually points to the jpeg file, if more than one, it points to the folder. This was kind of cluttery, especially for the sites with multiple photos, as IE doesn't give thumbnail views, so, all you see is a list of the somewhat cryptic filenames, and need to click on each photo to view it. So, I took it one step farther. After my python script extracts and saves the jpegs from the BOLBs, writes the "lookup table", joins/calculates the URL info to my feature class, it then runs a slightly modified version of pyGallery. This creates a gallery for my photos similar to ( http://pygallery.sourceforge.net/samples/ ). So now, if there is one photo, my popup says "Click for Photo", and it takes you direclty to the image viewed in a browser. If there are more than one image, it says "Click for Photos", and if you click, it will take you to the index/thumbnail gallery page for that feature, with all the photos. So far, not only the best way I've came up with for BLOBs, but also for one:many photos in Flex. In case this gives you some ideas, R_
... View more
05-13-2013
09:14 AM
|
0
|
0
|
6374
|
|
POST
|
I don't do mobile, but FLEX has issues accessing a local folder. You normally need to set up a virtual directory on your server that points to the folder you are saving the jpegs in. You can then access them using the URL in the flex viewer. R_
... View more
05-13-2013
08:19 AM
|
0
|
0
|
6374
|
|
POST
|
Julie, I think you will have problems until you get rid of the OID error as the layer is not searchable without an OID. See this post that is referring to the same issue (but for Oracle table) to see if it get's you on the right track. http://forums.arcgis.com/threads/80419-eSearch-on-XYevent-return-only-1-result.?p=284530#post284530 Basically, I have an autogenerated, unique, non-null numeric field being added to my table. This way, Arc can use it as an OID so that it will behave as a normal layer (except for the real time updates of course). R_
... View more
05-09-2013
10:41 AM
|
0
|
0
|
1376
|
|
POST
|
Julie, You should be able to click the Validate All button, and it will convert the question mark(s) to a green checkmark for all that are successfully registered. As far as the warning when publishing the service, just ignore it. It will let you publish the service with warnings, just not with errors and should work fine in searchwidget. What is the format of table you are using? FGDB, SDE, oracle table/view, etc? If you add it to ArcMap as an event theme, do you get a warning about the table not having an Object-ID field? R_
... View more
05-09-2013
10:05 AM
|
0
|
0
|
1376
|
|
POST
|
Julie, You need to start server manager and log into the server (generally http://localhost:6080/arcgis/manager/index.html). Then, click on the "Site" tab in upper right, click "Data Store" tab on left, There you will see the two options to "Register Database" and "Register Folder". Keep in mind that this sometimes has the normal AGS "quirks". I have had to register a few of them multiple times before it finally "stuck". Once they stuck, have not had to re-do it for months now. R_ Ok, just remembered a "cheat". Make you ArcMap project in 10.1 and "Share as Service". Go through the steps, and when it analyzes it, if the data source is not registered, it will give you an error that "Layer's data source must be registered with the server". Right-click on that error message, and select "Register Data Source With Server", give it a name and it should work. Also, remember the account running the AGS (not the current user) needs to have access to the data source, otherwise, you won't be able to register it.
... View more
05-09-2013
07:27 AM
|
0
|
0
|
1376
|
|
IDEA
|
-->
Make "Only show classes that are visible in the current map extent'in the legend properties checked by default for all the layers that get added to ArcMap table of contents. Most of the time, this is the desired result anyway. Makes more sense to un-check it if that is not what you want. ALSO, this would allow the settings to be made in a template document for use with the export web map tasks. Currently, there is not way to check this setting if there are no layers in the mxd (I.e, a print template). RR_
... View more
05-08-2013
01:42 PM
|
14
|
1
|
1370
|