POST
|
No, that also seems to fail, but with Error 999999: [arcengine@nimbus engine10.1]$ ./python27/bin/python
Python 2.7.2 (default, Feb 23 2012, 12:21:12)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import arcengine
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcengine.py", line 18, in <module>
gp.setProduct("Engine")
RuntimeError: ERROR 999999: Error executing function.
>>> The same error also appears of I try to "import arcview" or "import arcinfo".
... View more
06-04-2013
05:28 AM
|
0
|
1
|
1009
|
POST
|
I have an ArcGIS Engine Runtime 10.1 SP1 for Linux installation on RHEL 6 x86_64, and while I am able to run Java ArcObjects code without problems, I cannot seem to get arcpy to import using the packaged python interpreter. My $DISPLAY variable is set correctly and I believe I am sourcing the required files ($ENGINE_HOME/vmw/setenv_mw.sh and $ENGINE_HOME/python27/setenv_python.sh). I'm using the python interpreter packaged with arcpy: $ENGINE_HOME/python27/bin/python. I have all the required packages installed (the ones listed under the "Linux" link at the bottom of this page: http://resources.arcgis.com/en/help/system-requirements/10.1/index.html#//015100000068000000). Here is the output: [arcengine@nimbus engine10.1]$ ./python27/bin/python
Python 2.7.2 (default, Feb 23 2012, 12:21:12)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import arcpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/__init__.py", line 21, in <module>
from arcpy.geoprocessing import gp
File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/geoprocessing/__init__.py", line 14, in <module>
from _base import *
File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/geoprocessing/_base.py", line 592, in <module>
env = GPEnvironments(gp)
File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/geoprocessing/_base.py", line 589, in GPEnvironments
return GPEnvironment(geoprocessor)
File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/geoprocessing/_base.py", line 545, in __init__
self._refresh()
File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/geoprocessing/_base.py", line 547, in _refresh
envset = (set(env for env in self._gp.listEnvironments()))
RuntimeError: NotInitialized Importing arcpy works fine for ArcGIS Server 10.1 for Linux, but I can't get it to work for Engine. Has anyone gotten arcpy to import properly in Linux ArcGIS Engine Runtime 10.1? Thanks Jason
... View more
06-03-2013
01:31 PM
|
0
|
4
|
4337
|
POST
|
Actually not too bad on resources. All I have to do is a little reprojection and add rasters to/remove rasters from the mosaic dataset along with some SQL magic. I have several other similar routines running even more frequently (every 5 minutes), and so far everything seems to work pretty well. The code is running on a beefy Linux ArcGIS Server machine. I did some more searching but it does not sound like it's possible to automate calling the Mask function via ArcPy (correct me if I'm wrong), so I believe I am left with two options: 1) Crop the image to remove the transparent regions, or 2) Add a "Best" field to the mosaic dataset (which I will have to populate/update manually based on validtime and region) and use that as the default mosaic sorting operation.
... View more
05-10-2013
12:15 PM
|
0
|
0
|
2048
|
POST
|
Thanks for the suggestion. One thing I forgot to mention, though, is that this all has to be automated. This mosaic dataset will be updated several times per hour with new versions of each regional image, and I will be maintaining about 3 hours of imagery at any one time. Each time I import a new raster, I would have to apply the mask, correct? Is there an ArcPy function I can execute to mask an individual Mosaic Dataset item? Thanks for the help, Jason
... View more
05-10-2013
11:57 AM
|
0
|
0
|
2048
|
POST
|
I have a mosaic dataset that stores two regional single-band (grayscale) images. In one of the images, there are areas where the pixel value is zero. I don't want to display these pixels, so I have tried both 1) setting the NoData value of the Mosaic Dataset to 0 (and displaying NoData as transparent), and 2) selecting "Display background value [0] as [transparent]". Both methods properly set the pixels to transparent, but unfortunately, these transparent areas overlap my second image, obscuring it. I have enabled time on the mosaic dataset, set the default mosaic operator to "FIRST" and configured it to sort in descending order of the time field (i.e., more recent images have higher priority). So, whenever the first regional image (with the transparent areas) is the newest image, it is mosaicked over the second image, which obscures the second image's pixels, even when the higher-priority image's pixels are NoData/transparent. Does anyone have a suggestion as to how to resolve this? I realize I could clip the first image, but would prefer to avoid that. Is my only other option to configure my mosaic operator/sort order to always prefer the second image, or is there a way to avoid mosaicking transparent pixels? Thanks, Jason
... View more
05-10-2013
08:44 AM
|
0
|
6
|
6411
|
POST
|
Thanks - I just found an old thread that answered the same question as well. http://forums.arcgis.com/threads/79662-All-tiles-are-mixed-up
... View more
03-21-2013
08:01 AM
|
0
|
0
|
730
|
POST
|
Having some strange behavior when trying to upgrade my viewer to version 3.3 of the JS API. This seems to occur whether I'm using dojo 1.8 AMD-style loading or the old dojo.require syntax. No errors are produced (other than the normal CORS and MIME warnings from arcgisonline), but the map is a motley of blank tiles and real imagery, the normal controls and credits are not drawn correctly, and it is unusable. I can pan/zoom but the tiles get switched around...really bizarre. I have a JSFiddle example illustrating the problem using the old dojo.require syntax, while the code below illustrates the problem using the new AMD syntax. Both produce similar results. Anyone experiencing the same problem or have any suggestions? <!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>JavaScript API 3.3 Test</title> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dijit/themes/claro/claro.css"/> <style> html, body, #container { width: 100%; height: 100%; } #top { height: 100px; background-color: #3f76ab; } #trailing { padding-left: 20px; width: 200px; background-color: #3f76ab; } </style> <script type="text/javascript"> var dojoConfig = { parseOnLoad: false }; </script> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.3"></script> <script type="text/javascript"> require( [ "dojo/parser", "esri/map", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!" ], function( parser ) { // BEGIN dojo require parser.parse(); var initExtent = new esri.geometry.Extent({ "xmin": -14471533.80312532, "ymin": 2273030.9269876485, "xmax": -6901808.429182845, "ymax": 7170156.293999778, "spatialReference": { "wkid": 3857 } }); var themap = new esri.Map("map_canvas", { extent: initExtent, wrapAround180: true }); // Default basemap configuration: var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"); themap.addLayer(basemap); }); </script> </head> <body class="claro"> <div id="container" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props='gutters:false'> <div id="top"data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'top', layoutPriority: 1"> top stuff </div> <div id="trailing" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="region: 'trailing', layoutPriority: 2"> layer list </div> <div id="center" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'center'"> <div id="map_canvas" data-dojo-type="dijit/layout/ContentPane"></div> </div> </div> </body> </html>
... View more
03-21-2013
07:48 AM
|
0
|
2
|
1402
|
POST
|
It's possible that JavaScript is not supported in ArcGIS Server (though I can't find any documentation to confirm that). Perhaps try changing the parser to Python and rewrite it. Here's what a more efficient version would look like in Python:
def FindLabel( [NPC_CATEGORY_ID] ):
npcId = [NPC_CATEGORY_ID]
idCodes = {
"231": "WPn53",
"371": "WMs83",
"372": "WMs92",
"375": "WPn53",
"376": "WPn53"
}
if npcId in idCodes:
return idCodes[npcId]
return npcId
or, here's what your original function looks like in Python without modification:
def FindLabel( [NPC_CATEGORY_ID] ):
idArray = ["231","371","372","375","376"]
codeArray = ["WPn53","WMs83","WMs92","WPn53","WPn53"]
labelValue = [NPC_CATEGORY_ID]
for i in range(len(idArray)):
if idArray == [NPC_CATEGORY_ID]:
labelValue = codeArray
return labelValue
... View more
02-14-2013
04:50 AM
|
0
|
0
|
1607
|
POST
|
FYI, I was able to solve my problem by upgrading Tomcat to version 7 (I was previously using 6). Even though ESRI had been testing with Tomcat 6 and it was working on their end (and Tomcat 6 worked fine with 10.1 Final), it was causing unforeseen problems for me at SP1. It's possible Tomcat 6 was being run with an unsupported version of Java, but the exact cause is uncertain.
... View more
12-11-2012
04:34 AM
|
0
|
0
|
1481
|
POST
|
For me, server and web adaptor are both SP1. I'm also running on Linux, so I don't have .NET installed.
... View more
11-13-2012
09:32 AM
|
0
|
0
|
1481
|
POST
|
Well I just took a look and my shared keys already match, so I guess that's not it. Hopefully your solution helps Dan though.
... View more
11-07-2012
11:35 AM
|
0
|
0
|
1481
|
POST
|
I am using 10.1 SP1 and cannot seem to apply a Unique Values renderer to any of my Mosaic Datasets. I see that the bug report indicates it was added at 10.1 but can anyone confirm that this functionality is actually available? I've found that I need to run Calculate Statistics on a Mosaic Dataset before I can select a Classified Renderer, but that doesn't seem to be the case for Unique Values renderer. Even after running Calculate Statistics I cannot select a Unique Values renderer (see attached image). My rasters are single-band 32-bit floating point, and I can apply a Unique Values renderer when they are not inside a Mosaic Dataset.
... View more
11-07-2012
10:30 AM
|
0
|
1
|
2424
|
POST
|
No, I never found the cause. I'm sure it's just internal to arcpy, and perhaps specific to Linux and/or PostgreSQL connections. As far as I can tell there's no way to suppress it from STDERR. It's not as big of an issue for me any more though -- now I'm running all arcpy functions in a new process (using subprocess.check_output) and capturing both STDERR and STDOUT output, which I don't print out unless I'm debugging, so it's hidden from view most of the time.
... View more
11-07-2012
08:19 AM
|
0
|
0
|
548
|
POST
|
I'm also getting an error when trying to register it, but it's a bit different (see attached image). I have an open ticket with ESRI, but no useful information yet. The adaptor does appear in the adaptor list in the Manager webapp, but gives me a different (proxy-related) error whenever I try to access the REST directory with it. I'm using Linux and deploying the adaptor to Tomcat. The web adaptor worked fine at 10.1 final, but can't even be registered properly at SP1.
... View more
11-06-2012
11:44 AM
|
0
|
0
|
1481
|
POST
|
Just to follow up on this - I was able to resolve the problem using bob_carr's meta tag solution. As he mentioned, it appears that the content must be set to "IE=7" for setOpacity() to work properly in IE8. However, this solution doesn't work when using the Javascript API in a jsFiddle, so that was the reason for my earlier tests failing.
... View more
09-10-2012
06:00 AM
|
0
|
0
|
1242
|
Title | Kudos | Posted |
---|---|---|
1 | 02-10-2014 12:46 PM | |
1 | 02-11-2014 04:54 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|