March 27, 2009

MSD: Blocks and Blocking Out?

We’re in the thick of the 2009 March Gladness basketball tournament the equivalent of the State finals for California Home School Basketball, where the lady warriors will be going up against their out of town rivals in the finals if all goes as planned. This is the end of the season and rebounding is going to be our focus. There may be many coaches that disagree with me, but my philosophy on rebounding is that the mysterious act of “blocking out” that eludes many players is nothing more than a continuation of the offensive and defensive flow. The offensive player shouldn’t “block out” 15 feet from the basket anymore than they should post up 15 feet from the basket. Likewise the defensive player needs to deny a cutter to the ball coming off the rim in the same manner they would defending a pass.

Before the Mapping Specification for Drawings the best method for attributing AutoCAD files for use in ArcGIS was to use block attributes for point features. There was really no go way to maintain feature attributes on lines and polygons features. Using blocks with attributes is still a good way to create point features for ArcGIS especially when you are organizing them into MSD feature classes. The block attributes of blocks in MSD features classes are still recognized by ArcGIS like they have been. The question arises when should I use MSD attributes, and when should I continue to use block attributes on POINT features.

The answer is, it depends. MSD attributes are not displayed visually as labels in AutoCAD (this is actually why I did the experiment of using ArcGIS Server Map Services to do thematic mapping on AutoCAD files.) So if you want the attributes to be a form of annotation, blocks with attributes are the way to go. MSD attributes on points have the advantage that they are managed like other attributes according to the mapping specification and can be typed. That is to say they can be INTEGERS, or REALS not just TEXT. All AutoCAD block attributes are of type TEXT. In the future the MSD attributes will likely contain other valuable functionality such as domain constraints.

Good basketball players instinctively block out, and crash the boards for rebounds, teaching players to suddenly block out when a shot goes up as a separate act is rarely understood or successful, because if players can’t anticipate a scoring opportunity offensively or defend their opponent, they are just going to stare at the ball as it bounces mysteriously to another player time after time despite their frustrated efforts.

March 25, 2009

Controlling ArcGIS Map Services with AutoLISP

I’m sitting here at the 2009 ESRI developer summit in Palm Springs. Everyone here is thinking about how to customize ESRI software to do really extraordinary things. I thought it would be a good time to share a little AutoLISP routine that I wrote that manipulates ArcGIS for AutoCAD Map Services to create higher resolution images over a larger area than the current view, as disconnected raster references.

This sample AutoLISP uses ArcGIS for AutoCAD Map Services and creates a mosaic/array of resultant images disconnected as AutoCAD raster references. This sample AutoLISP routine uses a comboination of ArcGIS for AutoCAD commands, ArcGIS for AutoCAD API AutoLISP functions and standard AutoCAD AutoLISP routines.

To use it copy the lisp routine to some location recognized by AutoCAD and load the file. Zoom into the lower left hand corner of an area you want to cover with Raster Reference images. And enter the ESRIMapMosaic command at the command prompt and answer the prompts. The resultant .PNG files will be automatically named after the map service in the same directory as the working drawing file. As with all samples you are encouraged to further customize it to better suit your working environment.

Because ArcGIS for AutoCAD uses the current AutoCAD display view extents to determine the view scale for maps generated by ArcGIS server, to get a higher resolution over a larger area you can use this AutoLISP routine to bring the images local to your desktop. Although they are converted to static .PNG Images, you might find value for the higher resolution images as a backdrop. The effect is laying down a mosaic of an area built from tightly zoomed tiles of a higher resolution than is displayed when you rely on a single Map Service image to cover the same area.

Here is the file on ArcScripts: MapMosiac.lsp.

March 09, 2009

AutoCAD Layers to ArcGIS Feature Classes

Like the Mobius strip, with a little twist what used to have two sides now has one. For those who already use AutoCAD layers as a means to define GIS layers, an ArcGIS for AutoCAD AutoLISP routine can make short work of defining your CAD Standards as GIS feature classes according to the mapping specification for drawings.

The ArcGIS for AutoCAD AutoLISP routine (ESRI_LayerToFC) is a short cut to defining GIS features from your existing drawings. It will make feature classes for each layer containing possible GIS features. If your drawings are primarily organized by Layers this might be a helpful tool to make short work of defining your feature classes in ArcGIS for AutoCAD.

Try typing (ESRI_LayerToFC) at the command prompt of AutoCAD with ArcGIS for AutoCAD loaded and see it work. It is an unsupported sample routine, but it seems useful to me.

March 05, 2009

To Serve CAD

Now and then I come across something that is for lack of a better description just kind of cool. I am not sure if it is practical. Just because you can do something doesn’t necessarily mean you should do something. With that disclaimer… let me share with you something cool. Stay with me because this is a little bit “out there”.

I have AutoCAD, ArcGIS Desktop, ArcGIS Server, and ArcGIS for AutoCAD on my laptop. Doesn’t everyone? See the sign post up ahead…? In the twilight zone everyone does. (My apologies to those reading this in another culture and language, and not familiar with the obscure TV references.)

ArcGIS desktop reads AutoCAD and Microstation files directly. If my AutoCAD file contains feature classes according to the mapping specification for drawings, then I can use those feature classes directly and without conversion as layers in an ArcMap map. I can symbolize the resultant features thematically according to the user defined values that they hold. I can color polygons based off of specific values, or vary the thickness of lines based on a range of attribute values, or use different point symbols… etc. I can also use the attribute values to create text labels that ArcMap knows how to place nicely.

I can serve ArcMap maps that I create as a map services using ArcGIS Server. I can use ArcGIS for AutoCAD to consume map services from ArcGIS Server including maps that reference AutoCAD drawings. In ArcGIS for AutoCAD I can edit AutoCAD entities as well as modify entities according to the mapping specification for drawings. Now it starts to get interesting.

ArcGIS Server map services can be cached or they can be dynamic. Dynamic map services are drawn by ArcGIS Server directly from the data referenced by the map document that is being served. If I open the AutoCAD drawing with ArcGIS for AutoCAD that is referenced by the ArcGIS map document, that is in turn being served by ArcGIS Server, and I use ArcGIS for AutoCAD to connect to that Map Service of the AutoCAD file that I am in… stay with me. ...Then when I make a change to the AutoCAD drawing, such as changing a feature class attribute and save the file and refresh the map service, then I see the map that is thematically drawn by ArcGIS Server which is based on the features and user defined attributes of the AutoCAD entities from the AutoCAD drawing that I am in! ...Whew!

Ok, I’ll wait while you re-read the paragraph above… So, I can use ArcGIS Server to do thematic mapping of my AutoCAD data via a map service while I’m in the same AutoCAD file as long as I save the file before I refresh the map service, and as long as ArcGIS Server and ArcGIS for AutoCAD have access to the same AutoCAD file, and the schema of the AutoCAD file doesn’t change. Granted, this is an extreme use of ArcGIS Server, but it is, I think, an interesting exploration of GIS and CAD interoperability, pieces of which you may find useful.

In light of this blog post the roasted vegetarian from the previous post is even more disturbing.
FREE hit counter and Internet traffic statistics from freestats.com