ROK Blog

How to manually delete references to an ArcSDE layer

Jason Harris - Monday, April 17, 2006

Have you (or one of you users) ever deleted an ArcSDE layer through something other than ArcCatalog or the command line? Well then, you probably figured pretty quickly out that you shouldn't be doing that.

The problem with using other deletion methods is that the ArcSDE does not 'know' remove references to the missing tables.. There are several references to the deleted tables stored in various places inside the SDE database. So, if you made the mistake of deleting those tables on your own, you'll need to maually remove these references.

Now, I do not recommend playing around in the SDE database. I have hosed up more than one installation playing around in there. However, these command are pretty safe, and shouldnt give you any trouble....But, I cannot stree enough the importance of BACKING UP YOUR SDE DATABASE before you do this. Ok, so that means you cant send me nasty emails if it breaks.

While this script is for SQL server, you can adapt it for Oracle as well. Run this in Query Analyser (or sql+) against your SDE database (where your SDE metadata is stored if you are using the multigdb model). Just change dbname to the name of the database where your layer was, and layername to the name of the layer.

DELETE FROM sde.SDE_geometry_columns
WHERE (f_table_catalog IN ('dbname') AND f_table_name IN ('layername'))

DELETE FROM sde.SDE_layers
WHERE (database_name IN ('dbname') AND table_name IN ('layername'))

DELETE FROM sde.SDE_table_registry
WHERE (database_name IN ('dbname') AND table_name IN ('layername'))

WHERE (databasename IN ('dbname') AND name IN ('layername'))

Jason Harris

Looking for a Flex with Coldfusion tutorial

Jason Harris - Thursday, March 30, 2006
Hey all. I'm looking to take my mapping apps up a notch and try some Flex (I really like those yahoo maps beta overview map). Anyone out there know a good tutorial/book for Flex development? I know zero flash and I primarily use Coldfusion as my development language, but the tutorial doesnt need to be CF specific. Any help? Thanks....

Jason Harris

Economic Development GIS site

Jason Harris - Wednesday, March 29, 2006
Hey all, just thought I'd share this nice site that we recently did for Georgia Power / Southern Company economic development. It gives the ability to search for building and property throughout the state of Georgia. It was done with .Net and ArcIMS. Here is the link if you want to check it out: https://grc.southernco.com/GPEDC/

Jason Harris

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.

<IMAGEWORKSPACE directory="D:\ArcIMS\RadarImages\Mosaic" name="jai_ws-5" />
<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" />

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">
<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" />

[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">
<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" />

[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.

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 = "";
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);
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;

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

Recent Posts



All content © ROK / Website by Hazel Digital Media