Archive for the 'Map 3D how do' Category

Points to Blocks

With the survey tab of the map task pane we can bring points into a map and style them with our blocks to get the look that we may need, or when we import a point type shape file or any other format we can assign a block to the points on the import. (provide block name matches the attributes) But what if you have existing drawings that you have been using for the past few years that have AutoCAD points or they are standard AutoCAD drawing, or from some one else. ? What is the easy and quick way to insert blocks at those points? Well if those points are on there respective layers the Display Manger maybe the quick and easy way. Here is how.

Looking at my sample waterline map we have points that represent wells, both active and abandoned that reside on their own layers. 

points

First we start by creating a few new “Map Layers” in the display manager. To do this switch to the Display Manager tab, and select ” Add Drawing Data > Drawing Layer”. 

AddDWGLayer

Select one of drawing layers the points reside.

Layer1

Then click OK, we want to create the map layers separately so when we assign a block to the points we can control what blocks goes to what points. repeat to create all the new map layers as needed.

 

mapLayers

Once we have the map layers created we style them with a symbol by right clicking on the map layer and select “Add Style > Symbol”.

AddStyle

The symbol used is a default symbol of a square with and X inside it. To change it to the block we want we select the “Symbol Style” element in the display manager under the map layer and select properties.

StyleProperties

In the property palette for that element we chose the block to use for that map layer.

SetBlock

You can also set the scale of the block to your scale, leaving the scale at the default of (* 20 (VIEWSCALE)) will scale the block 20 times the view scale. The default scale will scale the block up/down as you zoom in and out of the drawing and regenerate. Change the name of the element to represent the blocks. Repeat the steps for the remaining map layers.

To go a another step further in the display manager we can change the symbol shown in the display manger and for a legend if you decide to create one later on.   Do this by selecting the map layer in the display manager and go to it’s properties in the property palette.

setSymbol_legend

 

In the property palette, change the Thumbnail Preview to Block and select your block.

Thumbnail LegendBlocks

Repeat for your remaining map layer.

Now your points display as your blocks.

blocks

If you need to share the map to standard AutoCAD users you can use the tool icon and Save Current Map to DWG.

Raster, Raster, Who has a Raster

From time to time I see users asking what is the best method to insert a raster file into Map3D or Civil 3D. There are a 4 known methods to insert a raster file into a drawing. First the standard AutoCAD insert, then there is the Map image insert command, and now with FDO there is the data connect method. Last we can use the Object Link and Embedding (OLE) method.  So what method do I suggest? My standard reply is what format and type is the raster and what do you want to do with the raster afterwards?

First lets review on what a raster file is and how they advanced over the years. A raster file contains cells or grids called pixels. The number of pixels is determined by the resolution of the raster.   A simple 300 x 300 resolution raster has 300 pixels on the X axis or horizontal and 300 on the Y axis or vertical for a total of 90,000 pixels. Each pixel has values or attributes assigned to it. One of the attribute is the location or pixel number in the file. It may be as simple as 1,1 for column 1 row 1, or 1 for the first location in the file.  Another attribute is the display value for that pixel. In the beginning the value was either 1 or 0 for on or off.  This is know as a bi-tonal raster. As technology progressed so did the values and attributes of the pixels, where today we have a color attribute and even elevation attributes along with a host of other attributes assigned to a pixel.  Just like vector objects in a dwg have attributes known as object properties like Layer, Color and custom properties such as object data, pixels have data attached to them.

Wow lets back up, did I say elevation, as in 3D? Yes I did. The technology has advance from the old DOS bmp days to create 3D raster. ESRI has been doing it for a few years now with their 3D analysis add-on for the ArcGIS programs. Some DEM files are nothing more that raster files with an elevation assigned to pixels. Same for the newer TIFF and Jpeg formats. Now when we throw multi-spectral images, know as remote sensing into this pot we not only have another a different ballgame but also a whole different ball field to play on. Multi-spectral images are made up of multiple files with each file being from a different spectrum of the light range.

The kicker to all this is not only can the pixels in a raster contain various attributes but the file extensions can all be the same. A TIFF is a TIFF. Example,  a picture we take with our Kodak Easy Share camera can have the same file extension as a image taken from a satellite orbiting the earth miles away. It is not until we open the image or raster file in the application or software that the attributes are exposed, then only part of them depending on the application used to open the file.

Using Windows Photo Galley works good to edit those family pictures from the Kodak to remove red eye, adjust the colors and print a 8 x10  photograph, but using the same application to work with a raster file that contains an elevation attributes to display as 3D will not work. It also works the other way around. Using a high end application designed for working with multi-spectral images to crop and print the Kodak Easy Share file is not only over kill but the results may not be what you expect and performance will suffer with the program stumbling over the simple attributes. To use a metaphor example of this lets say we have an acre of grass to mow with our little Briggs & Stratton powered mover. We know that if we use a high octane gasoline in an internal combustion engine the performance is increased. However if we use gasoline with 106 octane in the mower we may not get a very well cut yard. Either the engine is running too fast to get a good even cut of the grass or by the time we get half way done the engine locks up and we end up with the job half way complete. We need to use the right tool with the right material to complete the job successfully. 

So if you are still reading here are my suggestions on how to add that raster file to you drawing/map.

OLE - Only use it if you working in AutoCAD LT
AutoCAD Insert – For adding your company logo to a title block or to add simple images (including renderings) as a detail to your project, where placement and scale may not be of importance.
AutoCAD Map3D Image Insert – Simple aerial images that are geo-referenced and you need them to align with your line work.
AutoCAD Map Data Connect (FDO) – Raster files that contain elevations, Multi-spectral images or high end aerials images.

Now how do you tell if the raster file is a simple aerial or a high end aerial? Most likely if you downloaded it from the Internet and it’s over 3 years old it is a good chance it’s a simple aerial unless you get the meta-data with it and it states otherwise.

Transparency of Images

If you tried to set an image transparent with the normal transparent tools you found out it only works with one color. If fact all it does is turn off that color you select and is not really making anything transparent. Transparent as defined by Merriam-Webster is “fine or sheer enough to be seen through”. There is no see though when you just turn off a color. Using the data connect with FDO we can make polygon features transparent should we be able to do the same for images? Well we can with a little trick.

First we need to use the data connect to add the image to our map. Then save the image layer to “LAYER” file. When you save the layer it creates a file with an extension of layer,  If you are not aware of what a layer file is, it’s an xml file that contains information on the data file as to how it is connected to the map, the data it contains (spatial & data),  and how it is displayed or theme. Once you saved the image file to a Layer remove that image layer from the display manager and disconnect from the file(s) in the data connect palette.

Now browse to the image.layer file you created and open it in “Notepad”. Scroll down until you see the tags;

 “<FeatureName>rasters:Name</FeatureName>”  “<Geometry>Image</Geometry> “

Now insert between the two tags

<Opacity>0.5</Opacity>

layer_edit

Save the file after you edited it. The number 0.5 is the amount of transparency with the larger the number the more transparent the image will be. 0.9 is almost translucent and 0.1 is of little transparency. Now use the Load Layer tool from the Data Icon in the Display Manager to add the image to the map.

So why would anyone need an image to be transparent to start with when we can place it at the bottom of the draw order and make all the other layers transparent?  First off, how often have you reopened the map to find out the draw order was not as you had it set when you closed the map drawing? Another reason you may want to set an image to be transparent would be if you have overlapping images in the map. Maybe you have an current aerial image and an aerial of the same are that is 10 yeas ago and you need to do a time lapse study of the area. Toggling the images on and off can get frustrating after a while, where as having one transparent will allow you to see though it to do the analysis a lot easier.

Here are a few before and after screen captures of the results.

Normal 

How we normally do it with the image layer at the bottom of the display draw order and the polygon with transparency.

image_Transparency

Here is with the image with transparency at 0.5 and the image layer at the top of the display draw order.

closer_look

A closer look of the above. Notice how the street centerlines show though the image file.

If you look close enough you will see a grid pattern in the image after we make it transparent, I only guess that is the way Map3D renders the image but after a test print of the map the grid is not getting plotted so I see no harm in it being there. Also do not forget about the MAPPLOTTRANSPARENCY command if you want to plot with transparency.

Putting 3D back in Map3D

A few days ago there was a question in the Autodesk news group about using a linked data source to drive the Z coordinate of polylines. The original poster wanted something that looked like the “Causeway in Ireland”. My first thought was if you have the data in Excel why not use the 3D graph tools in MS Office to create this. Then I thought,  that only gives you 3D columns, not the shape of the polylines of a map, and you would have to create a number of graphs to show all the values.  The user wanted to click once and have the new data displayed. So why not try it in Map3D?

Here’s a little information on the data and what I assumed they wanted. The drawing is of polylines that represent areas of a school district. The user is wanting to display each area in a 3D view with the height based on the ages of the population of that area. For those on this side of the Atlantic think TIGER data and the US census data.

We all know you can create a map theme based on data but it’s only 2D or a flat map.  How can you create a 3D map from the data? After getting a copy of the dwg and Excel file I made a few edits to the user’s drawing, created a few queries, and  created a few maps in the map display tab of the task pane. Here is a screen shot of the original dwg with the data linked.

Original_DWG

First thing I did was assign a color to each layer, then hatched each closed polyline.  I then linked each hatch to the same record as the polylines. I did this manually seeing there were only 10 it wasn’t too much of a task.

My edits are below.

Editted_DWG

After saving the dwg, I opened a new dwg, attached the original dwg along with making the data source connection to the Excel file. Next after doing a saveas on the new dwg I started writing some queries and saving the queries to two different categories, one for the polylines and one for that hatches. The queries are just simple alter-property queries.

Here is the start of the queries.

Define_queries

1. The query type is Property, and object type equals LWPOLYLINE.

2. The query mode is Draw.

3. The Alter Properties is as;

4. The Thickness (of the polyline)

5. I use the expression from the Link Table field.

6. Next I needed to add a little LISP expression to the expression. (explained later)

7. I save the query.

When I saved the query I created a category for it to make it easier to keep track of it later.

QuerySaves

Once I saved the query and OK out of the Define Query dialog. I did not run the query just yet. I repeat the steps to create more queries on the remaining fields in the linked table. Saving each to the same query category we created.

Note: the LISP expression I used with the expression

&”Aged 1 year”@001 in the alter property is to multiple the field value by 100. The purpose is to exaggerate the height (thickness)  of the  polylines when Map3D creates the new map display.

The final expression looked like this: (* 100 &”Aged 1 year”@001)

Next I created queries for the hatches in the drawing.  The query mode will still be property object type but this time I use Hatch instead of LWPolyline. In the property alter section I select Elevation instead of Thickness.  The expression for it will be the same. The other differences is when I save them I created a new category for the hatch queries.

When I was done creating all the queries, I have them listed in the Map Explorer tab of the task pane.

TheQueries

If you noticed the way I named the queries based on the field values, also the names for the polylines (Ages) category are a slight different than the ones for the Hatch category. The reason I used a different name is to keep Map3D from getting confused on the queries.  Yes I cheated a little bit, if I had created ALL the queries for this set of data I would have over 80 queries in each category.

The next step is creating new maps in the Display Manager. I switch to the DM of the task pane and create a new map.

CreateNewMap

I named the new map on the age group that will be displayed. Now that I have a new map I add drawing data to it by querying the source drawing (the original drawing that is attached).

Query_Source_DWG

In the Define Query of Attached drawings dialog I select Load query and select the query for the age group I saved in the category for the polylines and click OK. Switch to the 3D view (click on the 3D icon above the status bar or command line). The polylines now appear as 3D. However they do not look like a solid polygon.

display_plines

In order to make them appear as solid polygons is where the hatches and their queries come into play. Again I used the Add drawing data by querying source drawing and load the hatch query for the age group from the hatch category.  Now the polylines look as solid objects.

display_hatch

Another function I tinker with was the visual style, the default style is Conceptual. I opened the visual style manager (VSM at command line) and play with the settings until I got the results I liked. Hint: make a copy of the conceptual style and paste as a new style to tinker with.

Last I created more new maps and add drawing data by loading the appropriate  save queries for each map and it’s age group.   Once all the maps were created I able to change the display by opening one of the maps from the drop down list for the maps on the display manager.

maps

There you have it, a simple way of putting some 3D into your maps and drawings.

Here is a short animation of the finished product. 3D maps

(click on the image to see the animation)

Negative Buffer Values

A while back the question came up if anyone used negative values to create a buffer in another forum. I thought WHAT? Most of  the buffers I create are with point or line type objects, if you do a -10 distance buffer of a point or line object what do you get? Nothing! However you can create a negative buffer from a polygon object. Michael Schlosser from  the Autodesk north of the border team shows how to use it and provides a good example of why you might want to here on his blog.

Where is the Standard AutoCAD Ribbon?

One thing that’s is missing from AutoCAD Map3D 2010 is the Ribbon interface for standard AutoCAD functions. Sure we have the Map Classic Workspace still, but do you see the new parametric tools under any of the menus? How about the Constraint tools or the the tools that let you drive the design by the dimensions? Looks like the developers on the Geospatial team forgot that most  Map users or the GIS guy still have to do some drafting now and then.  I remember in my days of being  the “Map” guy at a electric utility co. that once or twice a month I would have to draft up some new piece of equipment or something. Either a concrete pad for a UG transformer or doing simple one line drawings for the substations. The new features in AutoCAD 2010 would of make it a lot easier back then. So why was a quick and easy access to those tools left out of Map3D 2010?  Who knows? To fix it is an easy little task that you can take on. All you need to do is create a new workspace and add the correct ribbon panels to the ribbon. Here’s how I did it. Start by opening up the Customize User Interface, entering CUI on the command line will do that part. Now if you hear all the horror stories about the CUI and workspaces from others rest assure it has improved since it was introduced in 2006.

Now that you have the CUI open go ahead and resize it to where you can see both sides, the left and right panes. In the left pane highlight Workspaces and right click then select New Workspace. Provide a name for the new workspace, I used “Standard AutoCAD 2D” for mine.

NewWorkspace

Now over on the right pane of the CUI it should be listed under the Workspace Contents. Click on the Customize Workspace button.

Customize

Now all we need to do is go back to the left pane and select the Ribbon Tabs we want in the workspace. Expand the Ribbon and Tab tree then start checking the tabs to place on the ribbon, as you check them on the left pane they will appear in the right pane under your new workspace.

Ribbon_Tabs

The tabs you choose is up to you the ones I selected are in line with Standard AutoCAD. Once you select the tabs click on the Done button then the apply button at the bottom.

Done

Now you should have all the tools in standard AutoCAD with in quick reach by switching to that workspace. You can also create another workspace for 3D AutoCAD commands if you do 3D designs and rendering.

Rotation of Blocks or Text

Do you need to export text or blocks to a GIS format and then try to data connect to that exported data and fine that if the blocks or text features are rotated that the rotated value you used on the export does not match the rotation for the features in the original drawing? The reason is when you export with the rotation property it is in Radians not Degrees. So if you need to rotate the symbols in the data connect to  the original rotation angle the rotation value in the data table needs to be converted.

Here is a dwg with the text as AutoCAD text objects.

TheDWG

Here what happens when you label those features with no expression in the style editor for the data connect.

NoRotation

Here they are using the default “ROTATION” property from the data table.

Rotation_Property

Not what we expected, is it?
So how can you convert them from the radians to degrees? Simple an expression in the expression builder will do it.

( 180.0 * ( ROTATION  /  3.14))

Expression

Now when they get labeled the rotation is the same as the original drawing objects was.

Rotation_by_Expression

This also works with blocks you have rotated in a drawing that you later connect to with data connect. If you find yourself with a lot of features from different files that need this expression, don’t forget about the option to export that expression allowing you to later import it to use for any feature file that has the “ROTATION” property.

Good Looking Annotation Blocks

Tired of the plain looking annotation blocks used for labels? Annotation blocks can contain geometry along with the data tags or attributes. A lot of users forget the annotation blocks are blocks and do not think about adding complex objects to them.

So if you want your labels to stand out and look more like “That Other Software” then think about creating your blocks with some symbols.

In my example I have a road map that has an Interstate highway in it. Instead of having a text label of “I-24” I created my annotation block with the interstate shield and the data value as the number.  The Red and Blue colors are solid hatch and the INTERSTATE letters are polylines. The Express Tools “Explode Text” works good for creating the letters.

clip_image002

The Interstate Shield Marker

Start with your marker or shield in this case, create it as you would a normal block and save the block definition. Hint, I create all my blocks and symbols in one file then use the design center to drag and drop as need in my maps.

Once you have the shield/marker created then go about creating the annotation template as you normally would.

clip_image004

Once you get into the block editor, before you create the Annotation Text, insert and explode the shield block you create. Do not forget you have all the AutoCAD commands and tools in the block editor, you can create layers, insert blocks, create text or most anything else you would do in AutoCAD. Now with the marker placed you where need it, go ahead and create the annotation text.

clip_image006

You need to keep in mind the text style, height, justification and the color for the annotation text. To simulate a white color I use color 255, a light gray, this way if I use a white/black background scheme in the drawing editor the color will stay.

clip_image008

With the annotation text placed, you may need to set the draw order of it to the front to ensure it is always over top of the hatching in the marker.

Now save and close the block editor then label away.

clip_image010

The finished Annotation Block in used, getting the text value from my OD table and using a nice symbol to label my Interstate Highways. You are not limited to just the interstate marker there’s plenty of road sign markers you can use in your maps. US Route or State signs can be created also, or how about speed limit signs or even city street signs.

For a refresher on getting some symbols to use and not having to start from nothing, http://map3d.wordpress.com/2006/02/25/want-those-esri-symbols-in-your-autocad-map/

Create a 3D Surface from a SHP File. (with survey extension)

Do you have the need to create a surface from a ESRI contour file, and that shape file is just 2D with the elevation as an attribute? The new released Survey Extension For Map3D will do it. It is as easy as 1, 2, 3.

Step 1. Use the data connect to connect to the shape file.

Connect_Shape

Note: all you need is to connect to it there is no need to add it to the map.

Step 2. Use the “Mapcreatesurface” command to open the Create Surface dialog.

Create_Icon

The Create surface tool is on the Input and Inquiry toolbar. if not just type the command at the command line.

Select_Connection

In the Create Surface Dialog, select “Connection” for the source and select the shp connection you made in the data connect.

Set_Z

Step 3. Provide a name and location for the Raster TIFF that will be created. Then select the field that contains the Elevation value in the attribute table.

Now press the OK button.

Now the results after setting a style to the surface feature layer and placing the original contours above it in the draw order.

Finished

OK if you count all the mouse clicks it may be more than 3 steps but, its quicker than firing up ArcInfo and using the tools to create the surface there then  connect to it.

To those that may want to question the accurately of this compared to ESRI software, well I took the same shp file in ArcMAP created a TIN from it and converted that into a Raster.  I then added that to this dwg and compared them in both 2D and 3D views. To me I didn’t see any difference between the two.

Label Those Lot Lines

Do you ever have the need to label lot lines in Map3D? Civil3D users have the parcel labels but with just Map3D it was always the old text command. Try using the map annotation block features instead. Here’s how you can create a annotation template that makes it a little easier. First the lot or parcel lines need to be lines or single element plines. So if you need to use the drawing cleanup tool first to break those polygons or closed plines into single element plines.
We start with creating an annotation template then use the property value “Length” for the value for our length tag. But we need to add a few extras to make it look right. First thing we don’t want all the labels to be 8 decimal places long, two is the standard most places, and second we need to add the FT (single quote) mark at the end.

length_tag

So to accomplish this the value should look like this
(STRCAT (RTOS .LENGTH 2 2) “‘ ” )
The RTOS converts the real (Length) value to a string value with the first 2 being the units type as Decimal and the second 2 as the precision. The STRCAT and the “‘ ” (double quote, single quote, double quote) then takes that length value and adds the single quote mark at the end. If you work in Meters you can replace the single quote with Meters, just make sure you keep it inside the double quotes. For the text options use your text style you need and for the height use the value that will meets your standards. Keep the rotation at 0 but set the justification at Middle Center. Use you own standards on the object properties for layer,, color and lineweight. 
When you click OK and are asked for” Specify middle-center of text: ” go with 0, “your text height” this places the tag at it’s proper location with the justification at middle center.
Now for the bearings part of the annotation. Start a new annotation tag and for the value we use the angle property of the line but convert it to a string.

Bearing_tag

We do this because the angle property returns the angle in Radians not in degrees. So the value will be (ANGTOS .ANGLE 4 3).
The ANGTOS converts the radian value to a string and the 4 tells it what angle type to use in this case Surveyors and the 3 is the precision, taking it all the way down to seconds. Set the text options the same as for the length tag and the object options to your standards. This time when you are asked “Specify middle-center of text:” use 0, – “your text height”, to place it below the length tag.
Save your template and use the annotation tools in Map3D to label your lot lines. When you insert the annotation blocks is when you need to set the rotation value so use the expression .ANGLE to set it. Doing it here makes for cleaner labels and keeps the two lines aligned.

Rotation

 

Now for a couple of disclaimers: The annotation angle will be in the direction that the line was created. Most surveys start at the POB and go around in one continuous path. The labels need to follow that rule, that’s the way I was taught years ago and that’s the way I taught for years. However if your drawing is from a source that doesn’t follow that rule or you used the drawing cleanup tools the line may not be drawn in the proper order and will need to be adjusted. Another thing is the text may be upside down or on some of them the length is on the inside with the bearing on the outside while others are vise-versa. By setting grips enable for blocks and using the two tags instead of a multiline attribute tag allows you to move and adjust the placement as needed.

Labels

The Finished project.

Next Page »


Archives

Readers Locations

 

November 2009
S M T W T F S
« Oct    
1234567
891011121314
15161718192021
22232425262728
2930