|
POST
|
Using clip, MakeFeatureLayer, LayerToKML worked perfectly for this, in case anyone was wondering....
... View more
12-28-2012
11:08 AM
|
0
|
0
|
3547
|
|
POST
|
This this bug does affect the JS API FeatureLayer? Is there any workaround currently, or prediction of when it might be fixed? I had just recently posted this to the forums. Thanks! Jay
... View more
12-28-2012
10:20 AM
|
0
|
0
|
518
|
|
POST
|
I'm running ArcGIS for Server 10.1 SP1, and have recently been made aware of the bug that makes alternate get requests fail and the workarounds documented in this post and this one. Is this bug affecting the JS API when using a feature layer pointing to a REST service? For instance, I believe the FeatureLayer class is configured to query/redraw on map zoom. So when I zoom the map, the graphics disappear. And then when I zoom again, they reappear. This also occurs if I use a setInterval on a layer to auto-refresh on an interval. I'm hoping this is related to the bug and not caused by something else (but I'm not sure how the FeatureLayer class works, which is why I'm asking here). If it is related, is there a workaround. If no workaround, any progress on a hotfix, since this seems pretty serious.... Thanks, Jay
... View more
12-28-2012
08:02 AM
|
0
|
3
|
1777
|
|
POST
|
I spoke too soon - this was an easy fix by just not hardcoding the scratch workspace in the script! It works now...
... View more
12-27-2012
04:39 AM
|
0
|
0
|
1231
|
|
POST
|
I have a python script which when run in ArcMap works perfectly.... When creating the script tool in ArcMap, "Always run in foreground" is unchecked, "store relative path names" is checked, and "run python script in process" is checked. However, when I publish this script to an ArcGIS for Server 10.1 SP1 installation, executing the GPService fails with the following error from the logs: Traceback (most recent call last): File "E:\arcgisserver\directories\arcgissystem\arcgisinput\EON\AirportsExportPython.GPServer\extracted\v101\toolboxes\AirportsExport.py", line 38, in <module> outputFclass = arcpy.env.scratchWorkspace+"\\clipped.shp" File "c:\program files\arcgis\server\arcpy\arcpy\geoprocessing\_base.py", line 525, in get_ return self[env] File "c:\program files\arcgis\server\arcpy\arcpy\geoprocessing\_base.py", line 575, in __getitem__ return convertArcObjectToPythonObject(getattr(self._gp, item)) AttributeError: Object: Tool or environment <scratchWorkspace> not found Here is the script: import arcpy, csv, os arcpy.env.overwriteOutput = True # Script arguments Selecting_Geometry = arcpy.GetParameterAsText(0) if Selecting_Geometry == '#' or not Selecting_Geometry: Selecting_Geometry = r"E:\EON\data\templates.gdb\polygonTemplate" OutputType = arcpy.GetParameterAsText(1) if OutputType == '#' or not OutputType: OutputType = "kmz" # Local variables: arcpy.env.scratchWorkspace = r"E:\EON\temp" outputFclass = arcpy.env.scratchWorkspace+"\\clipped.shp" AirportsLayer = r"E:\EON\layers\LandingFacilitiesOrganized.lyr" Airports = r"E:\EON\data\FAA.gdb\airports" exportLayer = arcpy.env.scratchWorkspace+"\\exportLayer.lyr" # Process: Clip arcpy.Clip_analysis(Airports, Selecting_Geometry, outputFclass, "") OutputFile = arcpy.env.scratchWorkspace+"\\airportsExportResult.kmz" earthLayer = arcpy.mapping.Layer(AirportsLayer) for layer in earthLayer: if layer.isGroupLayer: continue else: layer.replaceDataSource(arcpy.env.scratchWorkspace, "SHAPEFILE_WORKSPACE", "clipped") earthLayer.saveACopy(exportLayer) arcpy.LayerToKML_conversion(exportLayer, OutputFile, "1", "false", exportLayer, "1024", "96", "CLAMPED_TO_GROUND") arcpy.SetParameterAsText(2,OutputFile) In short, this script clips a feature set to an input polygon, applies a complicated layer file to it, then exports to kmz. I got this geoprocessing tool working correctly earlier, but was using arcpy.env.workspace instead of arcpy.env.scratchWorkspace, so the process wasn't referencing the clipped file in a jobs directory, but instead in the hardcoded workspace directory in the script. Anyway, after some research I saw that I have to use scratchWorkspace for all intermediate data. But this broke the geoprocessing service. Any assistance would be greatly appreciated! Thanks, Jay
... View more
12-26-2012
11:02 AM
|
0
|
1
|
3208
|
|
POST
|
I didn't see anything about multi-named certificates in that post. Did I miss something there? Would I just separate the host names by commas?
... View more
12-23-2012
03:49 PM
|
0
|
0
|
576
|
|
POST
|
Hi - a couple questions regarding SSL certs for ArcGIS for Server 10.1 1. Does ArcGIS for Server 10.1 support CA-signed UCC SSL certs (multiple domain certs)? 2. If so, how would we generate the certificate for the CA to sign using the ArcGIS for Sever Administration utility? Can you specify two names in the "common name" field? 3. What is the recommended method for renewing our certificates when they are about to expire? Do we have to generate another cert from the admin utility and submit to the CA to sign, or just update the root cert in the server store? Thanks for your assistance! Jay
... View more
12-18-2012
07:01 AM
|
0
|
3
|
693
|
|
POST
|
Thanks all - I got it working. The wildcard cert worked by creating a cert from the admin utility specifying the actual hostname, then submitting that to our CA and creating a duplicate using our wildcard cert order. Jay Jay, Are you using the webadaptor to expose your GIS services? If so, you should just be able to import your certificate at the web server level, enabling SSL there (if not already which i'm guessing it already is), then secure your GIS server with SSL using the self-signed certificate as shown in the links above.
... View more
12-18-2012
06:50 AM
|
0
|
0
|
2812
|
|
POST
|
I have a relatively new installation of ArcGIS for Server 10.1. My IT department has provided a wildcard SSL cert from digicert to use on the server. However, the instructions to install a CA-signed certificate on the server are different: http://resources.arcgis.com/en/help/main/10.1/index.html#/Enabling_SSL_using_a_new_CA_signed_certificate/0154000005wr000000/ The instructs say I must generate a cert using the admin interface, then get our CA to sign it. Is that true? Can I not just install a wildcard SSL cert on the server? Jay
... View more
12-10-2012
04:49 AM
|
1
|
3
|
6838
|
|
POST
|
Thanks Shana! This is very informative! In your response, you say "In order to batch geocode using the new World Geocoding Service in ArcGIS Desktop 10.1 SP1, an ArcGIS Online Organization subscription is required." The problem is, I have an ArcGIS Online Organization subscription (at least I think I do, I can access the https://usdot.maps.arcgis.com site). From ArcMap, I sign into ArcGIS Online using those same credentials, but it still won't work. It still says I need an ArcGIS online account. For now I can use the workaround, but once tasks is depreciated, I won't be able to. So I'm curious if I'm doing something wrong (or my account is not what I thought it was), or if there is a bug! Thanks, Jay
... View more
11-26-2012
09:27 AM
|
0
|
0
|
2002
|
|
POST
|
Hi - I would like to know how the REST API returns features to specify drawing order of a polygon layer using a unique value renderer. The JS API must know how (because it does it correctly) but we're querying the REST endpoint directly for use in a mash-up. We're trying to visualize hurricane wind swaths rendered by speed. So we have speeds of 58 mph, 32 mph, 74 mph, and error swaths, and they need to be drawn in a specific order (error, 32, 58, 74). Even when I publish with symbol levels enabled, the web service doesn't exactly return things in a preferred order, so a developer couldn't use a "first in first out" or "last in first out" methodology. The REST API returns json as 74, 58, 32, error, 74, 58, 32, error, 74.... until there is no more polygons left. Instead of returning all the 74 polygons first, and then 58 second, etc. etc. We could of course make specific rules for the hurricane layer, but we want something that is repeatable no matter what kind of polygon layer we use. The way I've worked around this currently is dissolving the layer based on symbol, so it just returns 74, 58, 32, error (since there is only one polygon per symbol), but was curious if there is any other way to specify how the REST API returns features.... Like I said, the JS API does it correctly, so it must know how to do that from somewhere! Thanks for your help! Jay
... View more
11-26-2012
09:19 AM
|
0
|
0
|
758
|
|
POST
|
I've loaded a CSV with a "Location" field that has the full address. When I try to geocode (using Wold Geocode Service from ArcGIS Online) based on this field, I get the following error: "There was an error trying to process this table. ArcGIS Online subsciption is required for geocoding the table of addresses." I have an ArcGIS online account, and I'm logged in through ArcMap. So what gives?
... View more
11-19-2012
11:26 AM
|
0
|
7
|
7657
|
|
POST
|
I am having this same problem! Once I installed the 64 bit background geoprocessing, a lot of my scripts started generating the error ExecuteError: ERROR 000210: Cannot create output..... What I can't understand is your workaround. If I'm running a python script outside of ArcMap, how can I use the "Enable checkbox for Background Processing on Geoprocessing | Geoprocessing Options". Thanks! Jay
... View more
11-13-2012
04:42 AM
|
0
|
0
|
826
|
|
POST
|
To create some custom scripts, I first create what I can in Model Builder, then export to Python and add what custom code I need. One problem I've ran into is when passing other python code into a function. In Model Builder, it is easy to maintain the code block, but once exported to Python, any significant amount of code becomes difficult to read or document. I was curious if arcpy functions accept function names as parameters instead of the actual code. Then I could refer to a separate function in my script instead of stuffing all my code into a single line. This is what an exported function looks like: arcpy.CalculateField_management(ModelAirports_shp__12_, "Zoom", "calcZoom(!FlDaily!, !UseType!, !Part139!, !OEP35!, !Core30!, !Type!)", "PYTHON_9.3", "def calcZoom(flights, use, part139, oep35, core30, type):\\n if (oep35 == 1) or (core30 == 1):\\n return 10000000\\n elif ((oep35 == 0) and (core30 == 0) and (part139 == 1) and (type == \"AIRPORT\") and (use == \"Public\")):\\n return 262144\\n elif ((oep35 == 0) and (part139 == 1) and (type == \"AIRPORT\") and (use == \"Private\")):\\n return 262144\\n elif ((part139 == 1) and (oep35 == 0) and (type == \"AIRPORT\") and (use == \"Military\")):\\n return 262144\\n elif ((part139 == 0) and (type == \"AIRPORT\") and (use == \"Public\") and (flights >= 250)):\\n return 131072\\n elif ((part139 == 0) and (type == \"AIRPORT\") and (use == \"Military\") and (flights >= 100)):\\n return 131072\\n elif ((part139 == 0) and (type == \"AIRPORT\") and (use == \"Public\") and (flights < 250) and (flights >= 100)) :\\n return 65536\\n elif ((part139 == 0) and (type == \"AIRPORT\") and (use == \"Private\") and (flights >= 100)):\\n return 65536\\n elif ((part139 == 0) and (type == \"AIRPORT\") and (use == \"Military\") and (flights < 100)):\\n return 65536\\n elif ((part139 == 0) and (type == \"AIRPORT\") and (use == \"Public\") and (flights < 100)):\\n return 32768\\n elif (((type == \"SEAPLANE BASE\") or (type == \"GLIDERPORT\") or (type == \"ULTRALIGHT\") or (type == \"BALLOONPORT\")) and ((use == \"Public\") or (use == \"Private\"))):\\n return 32768\\n elif ((part139 == 0) and (type == \"AIRPORT\") and (use == \"Private\") and (flights < 100)):\\n return 32768\\n elif ((type == \"HELIPORT\") and ((use == \"Public\") or (use == \"Military\"))):\\n return 16384\\n elif ((type == \"HELIPORT\") and (use == \"Private\")):\\n return 8192\\n else:\\n return 0") Easy to maintain in Model Builder [ATTACH=CONFIG]19251[/ATTACH] Was wondering if I could have something like this: arcpy.CalculateField_management(ModelAirports_shp__12_, "Zoom", "calcZoom(!FlDaily!, !UseType!, !Part139!, !OEP35!, !Core30!, !Type!)", "PYTHON_9.3", calcZoom(!Airports!, !Use!) and then define calcZoom in a different part of the script. Thanks! Jay
... View more
11-13-2012
04:14 AM
|
0
|
2
|
1249
|
|
POST
|
Thanks! I think that is my problem - I would like to use the REST API, however can't figure out how to make the GET request (passing in the filter geometry to the map service and setting the export to KMZ) work for KMZ prgramatically. The reason I can't figure it out is because, as far as I know, GET requests can only be handled as text (json, text, html), but not as binary (zip, kmz). So I was wondering is there was a way around this (or if I have it entirely wrong). It here any ways browsers can handle binary responses from http get requests? The api says to use esri.request but I can't get it to deliver a KMZ. Thanks for your assistance! Jay
... View more
11-08-2012
05:59 AM
|
0
|
0
|
3547
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 10-01-2025 06:52 AM | |
| 5 | 09-08-2025 07:31 AM | |
| 2 | 07-31-2025 08:39 AM | |
| 4 | 07-17-2025 08:06 AM | |
| 1 | 06-26-2025 04:55 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-01-2025
06:48 AM
|