888-898-3404

ROK Blog

AimsServer.exe Crashes

Jason Harris - Tuesday, March 21, 2006
Well, I seem to be able to now crash the the arcims spatial server at will, with this small simple piece of arcxml.

<WORKSPACES>
<IMAGEWORKSPACE directory="D:\ArcIMS\RadarImages\Mosaic" name="jai_ws-5" />
</WORKSPACES>
<LAYER type="image" name="Images" visible="true" id="250">
<DATASET name="anygifimage.gif" type="image" workspace="jai_ws-5" />
<COORDSYS id="4326" />
<IMAGEPROPERTIES transparency="1.0" transcolor="255,255,255" />
</LAYER>


It seems that ANY gif added as a dynamic layer will in fact, crash this ArcIMS spatial server. A jpg or any other image type seems to work just fine. Its quite a mystery, as this has been working just fine, up until a recent reboot.

Basically, the aimsserver.exe successfully creates the image from arcxml getimage request, but then crashes. It recycles itself, but it is 'out of order' for a few, but preciouos seconds after the crash. I'll be calling ESRI DSG this morning in the hopes that they can shed a bit of light on the issue.

If anyone has experienced this issue, please get in touch. I'll post my findings.



Jason Harris

Bizarre ArcXML Issue

Jason Harris - Tuesday, February 21, 2006

In all my years of ArcIMS application development, I have never run into an issue such as this. I know it must be in my code somewhere, but I cannot find it. Its one of those problems that you simply need to walk away from for a while, and answer will simply present itself to you....I hope. In the case, that it does not, have look at these logs....

My issue is simple. ArcIMS 'seems' to be executing the same request, twice. Even stranger you ask? Well, it does it twice in Internet Explorer and only once (correctly) in Firefox. I have never seem anything so weird in all my years of ArcIMS.

All this is a simple drag-to-select-box, and the ONLY difference that I see in the 2 requests is a different MaxY in the envelope. I cannopt tell how or why that being modified. Anyway, check these out and see if you have possibly seen this before...Thing to note is the very bottom of the request, where there are 2 consecutive reponses

Begin Request
[Feb 20, 2006 4:14:28 PM][4520 4644 INFO3] REQUEST: <GET_FEATURES featurelimit="3000" outputmode="newxml" geometry="true" envelope="true" globalenvelope="true" compact="true">
<LAYER id="0">
</LAYER>
<SPATIALQUERY subfields="#SHAPE# objectid" featurelimit="3000" searchorder="spatialfirst" >
<SPATIALFILTER relation="Area_Intersection" >
<ENVELOPE minx="1155766.00771" miny="581953.484089" maxx="1198343.55534" maxy="581953.484089" />
</SPATIALFILTER>
</SPATIALQUERY>
</GET_FEATURES>

[Feb 20, 2006 4:14:28 PM][4520 4644 INFO1] GET_FEATURES: gospatial
[Feb 20, 2006 4:14:28 PM][4520 4644 INFO2] <GET_FEATURES> QS start processing...
[Feb 20, 2006 4:14:28 PM][4520 4652 INFO1] Begin Request
[Feb 20, 2006 4:14:28 PM][4520 4652 INFO3] REQUEST: <GET_FEATURES featurelimit="3000" outputmode="newxml" geometry="true" envelope="true" globalenvelope="true" compact="true">
<LAYER id="0">
</LAYER>
<SPATIALQUERY subfields="#SHAPE# objectid" featurelimit="3000" searchorder="spatialfirst" >
<SPATIALFILTER relation="Area_Intersection" >
<ENVELOPE minx="1155766.00771" miny="581953.484089" maxx="1198343.55534" maxy="615814.368427" />
</SPATIALFILTER>
</SPATIALQUERY>
</GET_FEATURES>

[Feb 20, 2006 4:14:28 PM][4520 4652 INFO1] GET_FEATURES: gospatial
[Feb 20, 2006 4:14:28 PM][4520 4652 INFO2] <GET_FEATURES> QS start processing...
[Feb 20, 2006 4:14:28 PM][4520 4644 INFO2] Features sent: 0
[Feb 20, 2006 4:14:28 PM][4520 4644 INFO1] Total Request Time: 0.140000s
[Feb 20, 2006 4:14:28 PM][4520 4644 INFO1] End Request
[Feb 20, 2006 4:14:29 PM][4520 4652 INFO2] Features sent: 1
[Feb 20, 2006 4:14:29 PM][4520 4652 INFO1] Total Request Time: 0.260000s
[Feb 20, 2006 4:14:29 PM][4520 4652 INFO1] End Request


Jason Harris

Cool maps and data at Zillow.com

Jason Harris - Tuesday, February 14, 2006

Have any of my fellow GIS folks seen Zillow.com yet? I must say, its quite impressive. The map functions are pretty cool, using some AJax for the googlemaps effect and appear to be outputing the maps in a flash swf format, ala arcweb services. Pretty slick.

However, thats not the most impressive part. The amount of tax assesor data (mostly recent sales) they have amassed along with their estimated sales comps is pretty amazing. They basically assign a value to just about every residental structure and display it on the map. Lots of graphs and charts to look at, and its all quite easy to use. Check it out.


Jason Harris

Projection Help

Jason Harris - Thursday, February 02, 2006

I'm the first to admit, I know nothing about projections. Ok, good that is out of the way. Now someone take a look at this and see if you can help me out.

I have a string of Lat Lon 's that make up a nice long poly line that need to be projected in North America Lambert Conformal Conic. I set up ArcIMS to reproject the map data, its just these acetates layers (the line) that are giving me an ulcer.

I am using this code below, graciously shared by Jim Welch, to go the conversion. However, it looks like my calculations are off slightly. Does this look righ to you? Should I be figuring in the Standard Parallel 1 and Standard Parallel 2 anywhere or does that matter at all?

Also, I am getting passed a map 'width' and a map 'height' which is just how many degrees wide the map needs to be. Lets say they are both 2 degrees. Whats the best way to calculate my new envelope?

Any help would be appreciated. Thanks.


<cfscript>
lon_center = (-96/57.2958); /* Center longitude (projection center) */
lat_center = (40/57.2958); /* Center latitude (projection center) */
r = 6370997; /* Radius of the earth (sphere) */
sin_lat_o = sin(lat_center); /* Sine of the center latitude */
cos_lat_o = cos(lat_center); /* Cosine of the center latitude */
false_easting = 0; /* x offset in meters */
false_northing = 0; /* y offset in meters */
returncoords = "";
</cfscript>
<cfscript>
longitude = (#LISTGETAT(MarkArray[i],1)#/57.2958);
latitude = (#LISTGETAT(MarkArray[i],2)#/57.2958);
/* Forward equations */
delta_lon = (longitude - lon_center);
sin_lat = sin(latitude);
cos_lat = cos(latitude);
cos_delta_lon = cos(delta_lon);
g = (sin_lat_o * sin_lat) + (cos_lat_o * cos_lat * cos_delta_lon);
</cfscript>
<cfscript>
ksp = R * sqr(2.0 / (1.0 + g));
sin_delta_lon = sin(delta_lon);
Proj_longitude = (ksp * cos_lat * sin_delta_lon) + false_easting;
Proj_latitude = ksp * (cos_lat_o * sin_lat - sin_lat_o * cos_lat * cos_delta_lon) + false_northing;
</cfscript>


Jason Harris

Loading Rasters into ArcSDE

Jason Harris - Wednesday, January 18, 2006

I thought that I would share with you the single best pieces of advice that you can get when loading rasters images into ArcSDE.

1. Use either ArcCatalog or Command Line, but not mix and match 2. If you are mosaicing, load the first image without pyramids and do not build statistics. Load all but one of the remaining ones without pyramids or statistics. Load the last one with pyramids and statistics checked. 3. Never, ever ever ever try to do the smart thing and load them in a big batch. That would be too simple. Instead load them in a maximum of 20 increments. Check back every 4 hours or so and repeat. 4. If you have the raw images (like tif's) load those instead of sids. They will load much quicker.

I seem to struggle with some issue or another every single tiime I try to load new images. These are my new rules to live by. They certainly are a pain, but it is nice when they are done.


Jason Harris

ArcIMS using ArcMap Server - Worth A Second Look?

Jason Harris - Monday, January 09, 2006

I can't even remember how long that ArcMap server has been around. I do remember that it was so full of memory leaks that I vowed I would never use it.

Well, thats not entirely true. I did test it out once with one of my apps, and it worked ok. The problem was that I did way to many things with my AXL Requests that ArcMap server just didn't like. So, I cast it off, never to return. Until now.

I have a project coming starting that will be a fairly high volume site. It also needs really nice looking maps. So, I checked out one of those mxd's from the ESRI data and map cd's and it looks pretty darn good. Good enough to use in this app.

The good news is that there is absolutely nothing fancy about this application - at least nothing that would require any hardcore arcxml. Just a map and a few acetate layers.

So....Can anyone attest to the stability of ArcMap Server these days? Can I safely use it on a high volume site? Any input?


Jason Harris

ArcSDE & SQL Server 2005

Jason Harris - Wednesday, December 28, 2005

This one slipped under my radar. Not only is ArcSDE 9.1 service pack out...it also extends support for SQL Server 2005. While I have not done any testing with 2005, I hear its really quite impressive.

Here it is....ArcSDE 9.1 SP1

Jason Harris

Coldfusion ArcIMS JRUN Configuration

Jason Harris - Wednesday, December 21, 2005

People that use ArcIMS know that we must have a servlet engine for it to work properly. This means that most folks folks either purchase ServletExec or struggle Tomcat. What most people don't realize is that Coldfusion is using JRUN as its own 'internal' servlet engine. So, why not save a step and use that with your ArcIMS configuration? Geez, you can almost purchase Coldfusion outright for what it costs to buy ServletExec.

So, here are the instructions to perform a ArcIMS install using Coldfusion's internal JRUN as your servlet engine. I have also tossed in some of the tricks to get the cfx_esrimap.dll tag registered with Coldfusion 7.

Browse to: \ArcIMS\Connectors\Servlet

Copy the com directory and the three files Esrimap_prop, ServletConnector_Res.properties and ServletConnector_Res_en_US.properties.

C. Paste them into the servlet location at: c:\CFusionMX7\wwwroot\WEB-INF\classes

D. In a text editor; for example, Notepad, open: c:\CFusionMX7\wwwroot\WEB-INF\classes\Esrimap_prop.

E. Edit appServerMachine=APPSMACHINE to point to the machine where the ArcIMS Application Server is installed; for example, change it to appServerMachine=mymachine or appServerMachine=IP. Change appServerClientPort=5300 only if a different port was selected.

F. Close and save the file.

G. In a text editor; for example, Notepad, open: c:\Program Files\ArcGIS\ArcIMS\Connectors\Servlet\Esrimap_prop and make the same changes that you did in step E. Save file.

H. Open up the CFMX administrator, and register the CFX_ESRIMAP.dllTag Name: cfx_esrimap Server Library: C:\CFusionMX7\runtime\bin\cfx_esrimap.dll Procedure: ProcessTagRequest

I. Edit C:\CFMX7\bin\jvm.config file

Change the java.library.path entry to include the two directories containing the ArcIMS shared libraries.

C:/Program Files/ArcGIS/ArcIMS/Middleware/CF_Connector/bin,C:/Program Files/ArcGIS/ArcIMS/Connectors/ColdFusion/Server

Change the java.class.path entry to include the one directory containing the ArcIMS Java classes.

C:/Program Files/ArcGIS/ArcIMS/Connectors/Servlet

Note that forward slashes are used even on Windows, and that the list is comma delimited.

Note that the java.library.path entry and the java.class.path entry are each a single long line.

Restart the CFMX Service from the windows control panel.


Jason Harris

Out_QueryTable

Jason Harris - Monday, October 03, 2005

Us Coldfusion ArcIMS folks have grown to love and hate the Out_Querytable variable. For those of you that don't know what Out_Querytable is, its a query object that gets returned from Coldfusion after you send a query (spatial or attribute) to ArcIMS. This is very handy to have - becasue Coldfusion works so well with these types of objects. For you windows based folks, its essentially the same as a recordset.

The good: You can loop over them, display them, make a nice value list, query them (with coldfusion's ability to query an existing query object). Basically anything that you can do to a coldfusion query object, you can do to the Out_Querytable variable.

The bad: Things tend to get a bit hairy when you use ArcSDE based data. Who uses shapefiles these days anyway...The biggest issue for me are column names that get returned. For example, lets say I query roads. The columns that get returned will be fully qualified - like DBName.Owner.Tablename (in the case of SQl Server). Now try making a nice valuelist with VALUELIST(Out_QueryTable.DBName.Owner.Tablename) and see what evil things happen. Luckily, a few years back, James Welch (where are ya these days James?) created a sweet custom tag called cf_ArcSDEquery, which essentially converts the query to wddx, fixes it, at converts it back to a query object. The tag used to be on ArcScripts, but I haven't seen it there in quite some time. So, I'll attach it for everyone if they don't already use it.

I also do lots of multiple spatial queries right after each other - like in a drill down identify. The problem is that lets say I find a result in the first, but not the second, and then the 3rd returns a result. If, after each query, I test to see IsDefined("Out_QueryTable") then run some processing...Its going to bomb after the 2nd spatial query - becasue it does exist - but not from that query. Of course, you can rename your queries and do all sorts of crazy work arounds to compensate for this. However, I recently discovered a fantastic undocumented function - removeRows:

Queryname.removeRows(startrow,endrow)

So, this means now that I can perform a spatial query, test for the results, do something with the results, and then remove the rows from the Out_querytable object. Then, I can move on to the next operation...Something like this:

<cfoutput>
<cf_arcims action="Request"
servicename="#mapservicename#"
servername="#mapservername#"
serverport="#mapserverport#"
GenerateHTML="false"
ParseResponseAXL="true"
CustomService="Query"
>


<?xml version="1.0"?>
<ARCXML version="1.1">
<REQUEST>
<GET_FEATURES checkesc="true" outputmode="newxml" geometry="false" envelope="true" compact="false" featurelimit="250">
<LAYER type="featureclass" name="Bufferlayer" id="#PARCELLayerID#"/>
<DATASET fromlayer="#PARCELLayerID#" />
<SPATIALQUERY searchorder="attributefirst" where="objectid IN (#featureID#)">
<BUFFER distance="0" bufferunits="FEET" >
<TARGETLAYER id="#SOILSLayerID#" />
</BUFFER>
</SPATIALQUERY>
</GET_FEATURES>
</REQUEST>
</ARCXML>
</cf_arcims>
</cfoutput>


<cfif Out_QueryTable.recordcount GT 0>
<cf_ArcSDEquery query="OUT_QueryTable" output="Out_QueryTable">
<cfset SRCSOILSValueslist = quotedvaluelist(Out_QueryTable.ObjectID)>
<CFQUERY NAME="SOILSResults" DATASOURCE="#dsn#">
SELECT MUName
FROM SRCSOILS
WHERE ObjectID in (#PreserveSingleQuotes(SOILSValueslist)#)
</CFQUERY>
</cfif>
<!--- Use this function to delete all the rows from the query --->
<cfset temp = OUT_QueryTable.removeRows(0,OUT_QueryTable.recordcount)>


Then I can do the next drill down spatial query....Hope that makes sense and or helps someone out. Don't forget, here is the code for the cf_ArcSDEquery which will makle your life sooo much easier when working with SDE data:

<cfsetting enablecfoutputonly="yes">
<cfparam name="attributes.output" default="NewQry">

<cfif not isDefined("caller.#attributes.query#")>
<cfoutput>ArcSDEquery - #attributes.query# is not a valid Query and cannot be returned as #attributes.output#</cfoutput>
<cfabort>
</cfif>

<cfif FindNoCase("OBJECTID", evaluate("caller.#attributes.query#.columnlist"))>
<!--- arcsde --->
<cfset oldCols = Evaluate("caller.#attributes.query#.columnlist")>

<!--- setup new col names --->
<cfset aGoodCols = "">
<cfloop index="c" list="#oldCols#">
<cfset aGoodCols = ListAppend(aGoodCols, ListGetAt(c,ListLen(c,"."),"."))>
<cfif FindNoCase("ObjectID",c)>
<cfset caller.objectid = "#c#">
</cfif>
</cfloop>
<!--- convert to WDDX Packet --->
<cfwddx action="CFML2WDDX" input="#Evaluate("caller.#attributes.query#")#" output="OrigQryWDDX">
<!--- replace invalid names in fieldNames list --->
<cfset goodColWDDX = OrigQryWDDX>
<cfloop index="col" from="1" to="#ListLen(oldCols)#">
<cfset goodColWDDX = ReplaceNoCase(goodColWDDX, "#ListGetAt(oldCols,col)#", "#ListGetAt(aGoodCols,col)#", "all")>
</cfloop>

<!--- Turn the packet back into a query --->
<cfwddx action="WDDX2CFML" input="#goodColWDDX#" output="NewQry">
<cfelse>
<!--- not arcsde --->
<cfset NewQry = Evaluate("caller.#attributes.query#")>
</cfif>
<cfset "caller.#attributes.output#" = NewQry>
<cfsetting enablecfoutputonly="no">



Jason Harris

ArcSDE and Oracle On Different Servers

Jason Harris - Monday, September 19, 2005

Being from the SDE old school, I have had it drilled into my head for years the you should always install ArcSDE and your RDBMS on the same server. The argument is that there is the increase of network traffic between the two boxes would slow everything down. It sounds to me that this is just a leftover from the days of 10-base and 100-base connections. Nowadays, most servers have fiber connections with gigabit+ connections, so, this network traffic argument doesn't mean too terribly much any longer.

Many orgs now are really trying to separate DB's and application servers, so the ability to efficiently install SDE and your flavor of RDBMS is going to become increasingly important.

So armed with a couple of forum posts I was off. While I have done easily a hundred SDE SQL Server installs, I'm no slouch at Oracle these days either. I cut my teeth with Oracle SDE on a Florida Department of Health 8 cpu Sun Box, many years ago now, which is another story completely...

I'm happy to report the install went very very smooth. I only needed to change a couple of things. I used a mix of command line, sql plus and the post-install wizard. I used sql plus, along with the provided install script (in the sdehome\tools dir) to create the SDE user, Schema and set permissions. I then used the post install to 'authorize' SDE and then create the 'repository'. Next was the command line to create the service. The big thing here is the -n option, which tells the sde service not to depend on the Oracle service to start. Since Oracle wasn't on this server, thats obviously pretty important. Now, the only tough part...When I couldn't get the ArcSDE service to start, I went searching. I was luck to find this ESRI Kb article, that outlined the mod in the SDEHOME\etc\dbinit.sde file that I needed to make (set LOCAL=netservicename). Too bad I didnt find that article before, because its quite good.


Jason Harris

Recent Posts


Tags


Archive

All content © ROK / Website by Hazel Digital Media