Monday, November 10, 2008

Open Question: How to query shapes in GE?

I know there are plenty of sophisticated ways to bring your GIS
shapefiles into Google Earth but I am kind a wondering if there is a
way to open attribute tables and do some basic queries within GE.
There is some sort of a solution to it using Mapwindow GIS and GE
opened at the same time, but still, what about a person that is sent a
.kml file and want to take look at a specific value within say
hundreds of records?

Wednesday, October 8, 2008

Ripping information from ArcIMS databases - Legally, of course

So, you're surfing the web, you find an ArcIMS database that has all kinds of neat GIS data that you would just love to get your hands on. They offer it for free online, but you have to use there IMS server. Now, I love ArcIMS as much as the next guy, but sometimes it is frustratingly slow. And not to mention poorly designed. Also, most of the time, you just want to manipulate the data for yourself!


1) you should contact the database administrator and kindly ask him if you can have access to the data for your own copy of ArcMap

2) You could manually digitize the data (ugh), by finding and using a series of control points on the map ie. landmarks that you are familiar with

3) Get it by some other means. I would never condone stealing from an ArcIMS database, but I would like to know if there is a way to do it.

I want to compile a guide that helps with this! So, please contact me with the comment section if you have any information that could lead to my getting ArcIMS info.

Friday, February 22, 2008

ArcGIS Annoyance: Arc Map Crashes or Hangs when Plotting or Printing to PDF or a printer

ArcMAP will repeatedly crash when you try to print your map sometimes, usually when you are dealing with a large amount of on-screen data (in terms of both space it occupies on the hard drive as well as how complex the polygons are). If you are attempting to print or PDF a file that has, let's say a huge raster background and a very complex polygon layer draped over it, often ArcMAP will hang or crash. It may or may not give a memory message.

The reason for this is usually memory related. ArcMap manages memory poorly by comparison to some other software. Generally, as a rule of thumb, when you have a document open and it takes a long time to draw the layers when you pan, you might have this issue when you try to print your MXD.

The solution: Since it is usually memory related, there are a number of memory related fixes you can try to get ArcGIS to print or plot your document.

1) Try restarting your PC and immediately, once it has booted, go into the ArcMAP document and try to print/ export to PDF. This may work because on a fresh boot your RAM is clear, for the most part. Any actions you do after a fresh reboot slows your computer because the clean space in your RAM never fully recovers. More RAM will give the PC more space to create a PDF or make a file to be sent to the printer.

2) Reduce the output resolution DPI. Do this only if the quality level is acceptable, if you need the quality to be ultra high try one of the other solutions. Lower print qualities, especially for rasters, can really diminish the appearance of your mapping output.

3) Increase your pagefile size. If your document is failing to print for memory reasons, there may be no other solution than making your windows page file size larger so ArcMAP can handle the memory load. You can set page file size (maximum) in your control panel. This may fix this annoying ArcGIS 9.2/9.x issue.

Tuesday, February 19, 2008

AutoCAD Annoyance: Can't Select Some Text - SOLUTION!

AutoCAD 2008 (as well as 2007 to the best of my knowledge) features an annoying bug where you can select some of the Mtext on the page, but not others. There does not seem to be a rhyme or reason as to which text you can or can't select. It generally occurs in paper space, but I have had it happen in model space. You just can't select some of the words you have written. I have no solution to this issue, but I do have a work-around.

When you can't select some of the things you have written as mtext in autoCAD, simply type the command QSAVE (which is short for quick save). This saves you document and, inexplicably, enables you to select all text again. If this doesn't work for some reason, save your DWG document, close AutoCAD and re-open your DWG. This is a surefire way to 'fix' this bug.

Using Masks in AutoCAD to cover underlying features (hiding transparency)

In most programs, hiding underlying features is easy, but, in AutoCAD’s polygon/polyline based interface it is less easy. This article will outline three methods for whiteing out backgrounds in AutoCAD.

1) Text Masking: If you want text to have a black background (ie. White), enter the mtext properties, select “background mask” and click to select a mask that matches your background color (which may or may not be white). You can also use this command to select a colour of your choice to mask the text. Background masking can also work for other types of features and will be discussed at length in a future article.

2) The ‘wipeout’ command: this works well for an areal feature, like a polygon that surrounds text ie. Text in a box. Type the command wipeout, hit p for polyline, select the box surrounding your text in AutoCAD, then choose not to erase the box (obviously). What this will do is cover all of the features behind the feature you have selected. One draw back to this command, I find, is that when you re-open the document later, a bug often shifts the layer ordering, messing up what you have done. Silly AutoCAD!

3) Finally, when all else fails, a simple hatch can cure your AutoCAD woes. Select the polyline you wish to hide the interior of, type hatch (or h for short), choose solid color, then select the colour that matches your background by default.

Well, these three somewhat annoying to use commands are the only way, that I know of, to grey out background items in AutoCAD 2008. You should now be able to do away with transparencies in all of your CAD .dwg files. Hopefully.

Friday, February 15, 2008

AutoCAD Quirk: Escaping a Viewport in Paper Space

Normally you can just escape a viewport in paperspace by double clicking on the paperspace margin, but what if you were zoomed in too closely when you entered the simulated model space from paper space?

There is a button that exists just for such occasions and it is located with your snapping tools on the bottom toolbar. Unfortunately, a bug often prevents this button from appearing. So, in AutoCAD you need to click the tray settings dropdown in the bottom right hand corner and enable the "Model/Paper Space" button.

Arg, my paper space looks like model space!

Thursday, February 14, 2008

Time Saving ArcGIS tip: Stopping Redrawing of large Rasters or Polygons

Doesn't it annoy you when you move the data pane slightly in ArcGIS and the whole image redraws?! I know it annoys me,

When you move the data pane and a large layer starts to redraw, simple punch ESC and the redraw will be cancelled. You may not be able to see the layer anymore, but rest assured, it's still there, it just hasnt been drawn on the screen.

Wednesday, February 13, 2008

Free Canadian GIS Data Sources - Complete List, will be Updated Periodically

The following list is a list I have compiled of Free Canadian GIS data. Before you rush out and buy expensive data, why not see if they have it here for free? The list has a lot of national data, but I apologize if it is a bit Ontario Centric. Since Ontario is where I do the majority of my work....

http://www.geobase.ca - Fairly updated, provides SPOT radarsat data for all of Canada. This is incomplete - should be completed by 2010. Also provides an up to date national road network, a hydro network for Canada. Landsat 7 10-30 m cell size satellite imagery for all of Canada.

http://www.geographynetwork.ca/ is a site published by ESRI Canada that provides free obm data for all of Ontario. You can find the free Ontario OBM data at : http://www.geographynetwork.ca/website/obm/viewer.htm specifically. All you need to do is sign up to get layers like forest, drainage, contours, roads and more. I should not that the data is often outdated and temporally sensitive features, like roads, may be quite out of date (circa 1998)

http://geogratis.cgdi.gc.ca/geogratis/en/index.html provides a whole gamut of Canadian geospatial data. There is simply too much to indicate here, you need to check it out for yourself. Some of the things I have used in the past are vegetation indices, population maps and more!

http://geodepot.statcan.ca/Diss2006/DataProducts/RNF2006_e.jsp - Statscan only provides road networks for free and I have yet to explore the data. However, I have heard they are fairly up-to-date and provide street names in the attributes. The data apparently is as recent as 2007, which beats the geographynetwork hands down

More is coming soon on this topic.

Tuesday, February 12, 2008

Matching Object Locations in AutoCAD

Moving and rotating features is easy in AutoCAD, if you do not need to be precise.... However, if you precisely need to match one feature to another spatially. eg. you have an updating drawing that needs to go in the exact same space that the old version does (and youve moved the old version). Or; you may need to line up two different objects. With this guide, it will be a snap (no pun intended)

You can do this with two relatively easy steps:

1) Use the Move commands and set osnap on endpoint. Choose an endpoint on the new object that corresponds exactly with an end point on the other object... If you just want to align the two features and not overlap them, skip this step.

2) Once you have moved one point of the new object to match the old object, you will likely need to rotate the new object to fit in the same constraints. This next portion will tell you what to do at each prompt.
>Use the ROTATE command.
Specify base point:>Select a base point on the object you are moving TOO rather than the object you are moving.
Specify rotation angle or [Reference]>Choose the Reference Sub command "type reference"
Specify the reference angle <0>Select the corresponding point on the new object that you wish to rotate by (eg. the same endpoint)
Specify second point:> Select a point that, when combined with the previous point, specifies the angle that you want the new feature to occupy
Specify the new angle: > Choose a final point that specifies the angle of rotation

I realize that these directions may seem confusing, but experiment if you don't get it right on the first try. This seems to be the only way to do this in AutoCAD. In GIS, this type of a proceedure might be called georeferencing (if we were dealing with rasters), in AutoCAD this sort of 'georeferencing' can be referred to as 'frustrating'.

Friday, February 8, 2008

Dealing with an AutoCAD file that has not been scaled: Improper Scale in a DWG!

Have you ever been handed a drawing done by someone else? Have you ever been handed a drawing done by someone else who doesn't seem to have the faintest clue about layouts, scales, or plotting? Where I work, we get handed DWG files from many different consultants. Each of them is inept or dinosaurish in some way. One difficult problem that I frequently encounter is CAD documents that are not properly scaled or dimensioned and won't print to a standard layout!

Assuming you don't know the size of the paper it was originally printed on,

One way to overcome this is to follow this proceedure:

1) find a feature on the document that has a known length and measure it using the distance tool (di is the short cut)
2) divide this length by the scale
3) this number is to be used when you plot
4) Select plot, plot window (drag a box over the entire drawing), choose a ratio for scale (eg. 1 mm = 10 mm), then
5) Hopefully plotting should work!

Monday, February 4, 2008

ArcGIS Tutorial: Giving Legend Elements the Same Transparency as the Polygons in the Data View

If you're like me and you often have to digitize landuse areas and have to overlay them on an orthoimage, then this guide might help you with a common issue in ArcGIS. When you edit a polygonal layer and manually digitize a land use (with heads up digitization), you usually want to make it transparent so you can see the airphoto/satellite image underneath it. The problem with ArcGIS 9.2 (and 9.0, 9.1) is when you generate a legend, the legend items do not show the same transparency.

So, for instance, if you use red to indicated a black parking lot in ArcGIS, then give the red shapefile 50% transparency. The actual, on screen, colour is kind of a very dark red. However, in the Legend you see bright red, as if there was no transparency.

To fix this, here is the solution:

1) Make sure you have the transparencies and colors as you want them, this ArcGIS procedure is semi-permanent (ie. time consuming and difficult to undo).
2) First, you make sure the eye dropper tool is enabled and on a toolbar (go to customize> commands > page layout to add it to a tool menu).
3) Use the eye dropper to select the color in the ArcMap viewport that you wish to change the legend item to. It will save it to your colour palette as a standard ArcGIS color (but only for the .mxd document you are working on). Do the same for all the layers you wish to correct the color for.
4) Now you have the colour information stored for each of the transparent layers you wish to update in the legend. Click on the legend, right click and select "Convert to Graphics". This will break the legend into individual editable units
5) Select the Box of color that you wish to correct to the transparent color.
6) Use the bucket fill tool - found in the drawing menu - to change the colour of each box to their respective corrected transparent colors.
7) At this point, each legend item should be corrected and we have succesfully worked around this annoying ArcGIS issue.

Friday, February 1, 2008

ArcGIS Tutorial: Manually Editing the Legend in ArcGIS/ArcMAP

The automatically generated legends in ArcGIS often get the job done, but when a level of customization is required, the default level of customization just isn't enough. This Post will attempt to give you some general insight into how to go about customizing ArcGIS legends.

1) First, you need to make the legend box into individual editable items. You do this by right clicking on the legend and selecting "Convert to Graphics". This breaks the ArcGIS legend format into its base parts.

2) You now need to select the legend as a whole and select ungroup (from the right click menu). You may also need to select each individual legend item and click ungroup again as they are often bound together

3) Now that your ArcMap legend is unbound, you can move each element around like as if they were drawn individually by you. ie. you can use the usual editing/drawing tools on them

Thursday, January 31, 2008

How to Add the Date and the time to an ArcGIS layout

ArcGIS does not have a built in feature to add date, time, filepath and filename to you ArcGIS drawings (as you can in AutoCAD). I find this very annoying. Thankfully, you can find easy tutorials on how to program your own button to do this task at:

http://arcscripts.esri.com/scripts.asp?eLang=&eProd=28&perPage=10&eQuery=date

Most professionals make sure that this filename is on every drawing. One thing you should note: the time stamp that this program produces is not dynamic. ie. it is just static text.... it will not update automatically. If you come back to the drawing 3 weeks later, it will still have the old date and filepath. You need to use the button everytime you publish/print your ArcGIS mxd document.

Option 2: If you are ready to dive right in to VBA (alt+f11)

Option Explicit

Private WithEvents m_pActiveViewEvents As Map
Private Function MxDocument_BeforeCloseDocument() As Boolean
UnSetEvents
End Function

Private Function MxDocument_OpenDocument() As Boolean
SetEvents
End Function

Public Sub SetEvents()
Dim pMxDoc As IMxDocument
Set pMxDoc = ThisDocument
Set m_pActiveViewEvents = pMxDoc.PageLayout
End Sub

Public Sub UnSetEvents()
Set m_pActiveViewEvents = Nothing
End Sub

' add time and by whom map printed
' date/time changes when layout refreshed -- you usually have to actually refresh it yourself to get the time to change correctly
' add a textbox that says something like pTextElement.Text below

Private Sub m_pActiveViewEvents_ViewRefreshed(ByVal pView As IActiveView, _
ByVal phase As esriViewDrawPhase, _
ByVal data As Variant, _
ByVal Envelope As IEnvelope)

Dim pGC As IGraphicsContainer
Set pGC = pView
pGC.Reset
Dim pElement As IElement
Set pElement = pGC.Next
Do While Not pElement Is Nothing
If TypeOf pElement Is ITextElement Then
Dim pTextElement As ITextElement
Set pTextElement = pElement
If Mid(pTextElement.Text, 1, 8) = "Printed:" Then ' look for the textelement to be refreshed
pTextElement.Text = "Printed: " & Format(Time, "h:nn AM/PM") & " on " & Format(Date, "mm/dd/yyyy") & " by Chuck Norris" '& _
'vbNewLine & put whatever else you want here on a new line - uncomment line continuer on above line at end too ...
End If
End If
Set pElement = pGC.Next
Loop

End Sub




Other Tags: Adding date/time to MXD documents, Adding filenames to MXD documents, making a button to add date/time to ArcGIS

Wednesday, January 30, 2008

Changing the Colors in an xref without modifying the External Reference - an AutoCAD guide

Depending on the nature of the layers in the External Reference .dwg file (xref), there are a couple of ways you can change the colours/lineweight of different layers/features in AutoCAD 200x.

Method 1)
-Insert the xref into the document
-open the layers property manager
-click select all... layers or press Ctrl+a (or select as many layers whos colours you want to change)
-select a colour

Keep in mind that Method 1 is the easy way, it will not work unless the layers in the xref have colour "by layer" selected. There is no way to change the colour in an xref in this situation without altering the original external reference file.

Method 2) Breaks all the rules
-open the xref as a seperate document
-select everything in the model space
-in the color selection drop down menu choose "by layer"
- now you should be able to xref into your document and use Method 1 to change the colours of the layers

Method 3) Colours STILL won't change
- the only time colors still will not change in the xref is when they are locked into a custom
block in the xreference
- the ONLY way to fix this is to edit the blocks individually in the xref document, i'm afraid.

You can repeat these same methods for altering lineweight, line type and any other property features posses in AutoCAD.

I have heard rumor that sopmeone has written some code that can do these tasks/bypass them. If anyone has heard anything, please, please let me know.

With this guide, I have hopefully helped you to override xref colors. Overriding xrefs can be very annoying!

Monday, January 28, 2008

Ripping and Georectifying Google Earth Images into ArcGIS

This article, of course, is for entertainment purposes only - Google Earth data is not to be used for any commercial purposes. I will try to describe how to move images from Google Earth to ArcGIS as seamlessly as possible. Google earth is great, but you cant perform any real or lasting analysis with it. So, how does an imagery enthusiast get the images from GE to Arc?

Methodology

1. Place 3 or more placemarks at the edge of the portion of the Google Earth image you wish to move to ArcGIS


2. Save each of them in Google Earth (they can be found listed in the My Places folder).


3. Import the points to ArcGIS with ET Geowizards

You can find a more detailed article about importing and exporting to/from Google EArth to ArcGIS

here : exporting from GE
and
here : importing GE points into ArcGIS 9.2

One you have added each of your points as a point feature in ArcGIS, you now need to import the Google Earth Image itself. The only way to do this - that I currently know of - is the following:

- Turn off all layers in Google EArth so you just see the satellite image/air photo
- press alt+print screen to dump your screen's image to the clipboard
- paste the image into a paint/image program
-save the image as an ESRI compatible format (be sure to leave the Google Earth Copyright information on the image as well as the company who provided the data to Google).
- Add the image into ArcMAP

Once you have the image in ArcMAP, it does not have any coordinates. In this situation you need to georectify it to fit the 3+ points you recorded earlier in GE. If you do not know how to georectify an image, be sure to follow my guide at:

ArcGIS Tutorial: Labelling contours effectively

Labeling contours in ArcGIS is easy. Labeling them so they look good and stand out against the background is not as easy. First off, if you have contours on your map, make sure they are brown with a line weight of 1px. This is just cartographic standard... any other colour will confuse the map reader.


Here is the methodology :

Go to the layers property menu for your contour Shapefile in ArcMAP. For the test string label select your zvalue attribute (z value is the cartesian coordinate for elevation/altitude). This layer may not be named in the same way as you see in the image below. But it will most likely carry a name such as Z value, elev, elevation etc... This is the attribute you want the line to show . eg. 250 meters
For the symbol select brown and a sans serif fonts (another mapping convention). The most important part now, is to select the placement properties...

Select the following setup: Orientation curved; Postion Above(check), On the Line (check)

Friday, January 25, 2008

ArcGIS Tutorial: Combining/Merging Polygons in ArcGIS

Merging Polygons in ArcGIS 9.2 is easy. To combine two or more polygons into one using ArcView, all you need to do is the following:

>start editing with the editor toolbar...
>hold shift and select the polygons you would like to merge
>click the editor drop down menu on the editor toolbar
> select merge
>then select the polygon whos properties/attributes you would like the new polygon to preserve.

Then, you are done.

Thursday, January 24, 2008

Google Earth to ArcGIS: Exporting KMZ, KML from GE successfully

This ties in with an earlier post of mine. I thought that it didn't give enough details about how to export each of the different types of digitized areas you can create in Google Earth.

The intention, for me, to export this data, is to get it into ArcGIS. If you are looking for methodology for moving Google Earth data to ArcGIS, please read my other post about it.

Saving Google Earth Data as KML or KMZ


Saving and individual point is very straightforward. Right click on the point, click save as, then choose where you would like to save the KMZ file.

To save a polygon or a line - go to the Places pane, expand My Places..., then right click on the feature you wish to save, click save as... and you're done.

If you wish to save multiple features into one KML data set (so you can import them into ArcGIS as one layer), there is currently no methodology for this.

Google Earth to ArcGIS: Importing Google Earth into ArcGIS 9.2

This is the first of a series of articles I will be publishing on data interoperability between Google Earth and ArcGIS 9.2 (9.1 and possibly earlier as well)

Bringing Stuff from Google Earth to ArcGIS...

If you have made a placemark or a polygon, or a polyline in Google Earth, it is easy to import them into ArcGIS. All you need to do to bring points/lines/polygons from GE to ArcMap is to do the following:

-Create feature in Google EArth
-Right click on it
-Click Save as....
-Save the KMZ/KML file
-Download ET geowizards (if you haven't already, its an amazing ArcGIS toolset)
-on the in/out tab in ET, select import from Google Earth
-select the parameters

There, you have successfully brought google earth data into ArcView!

My wishlist for future versions of ArcGIS (ArcGIS 9.3, ArcGIS 10.X)

No, my wishlist does not include Vista support (I think they plan on it anyway), I honestly could care less if I have to switch to Vista.

Wishlist
- Different Scale for layout view and data view. It's so annoying having to set a bookmark for the layout view so you can get back to the display scale you want. Otherwise, if you have to zoom in to your map in data view, the layout gets all messed up. So annoying. ArcGIS could learn a lesson (somewhat) from AutoCAD's viewport system.

- Lockable features in Layout view (without having to use VBA codes). When you have 1000 elements in your layout view, clicking on one of them can sometimes be maddening.

-Fewer menus for text/feature symbology. Isnt it extremely annoying when you want to add a halo to some types you text or lines, you have to go through about 4-5 screens. Couldnt editing a feature be more streamlined?

-A text editor that feels like it wasn't made in 1995. This goes without being said.

More Soon...

ArcMap: Editing the Entire Field in the ArcGIS Attribute table

Here is the methodology for editing an entire field in ArcGIS (rather than editing each row individually). It can be done as follows:

1) Click Start EDiting on the editing tools
2) Click the attributes icon on the editor toolbar
3) Right click the layer which contains the attribute that you wish to mass edit at once
4) go to Select > Select All Features
5) Return to the attributes window and select the field you wish to edit (ensuring that you have selected the entire feature rather than just one entry)
6) insert the value you want

Now every shape in the shapefile should have the same attribute in the same field.

Wednesday, January 23, 2008

FREE DATA: Good Sources of Free Canadian GIS Data

Free data is always great (even if you can already bill it to you client). This is my first post of many that lists some good sources for free data all over the world. We will start with Canada.

With regards to Ontario, you can find a number of OBMs (Ontario Base Maps/Ontario Base Data) for free all over the net. The best source for general data, in my opinion, is:

http://www.geographynetwork.ca

You can select the layers you want, the extent of your study area, the projection and the datum you want the data in. Then you download ESRI shapefiles with exactly what you are looking for.
Some others:
Free Map data For the Guelph, Kitchener Waterloo Cambridge Area:
http://grims.grandriver.ca/imf/imf.jsp?site=grca_datadis&ddsid=25aa6
- download watershed information, and usual boundaries. As well as free ortho imagery! If you love it, and want the whole water shed quickly, you can pay them a small fee for the entire data set on a DVD.

For DEM information for all of Ontario, check out
www.geobase.ca for Ontario DEMs
They dont have the highest pixel resolution size (30 meters if i remember correctly). But they are good for a general or key map/site plan elevation.

More coming soon...

One caveat for any free data - make sure it is accurate and up to date! You dont want to get burned for digitizing a forest that is no longer there.

Monday, January 21, 2008

Printing Issues in ArcGIS: If your layout won't print some layers here is the solution

If you have a layout in ArcGIS that wont export/ print some or all of your layers, it is most likely a problem with projections. One or more of your layers does not have a projection assigned to it. I am not sure why this prevents the printer from drawing the layer in layout view, but assigning a projection seems to fix the issue.

To assign a projection, in case you do not know, in ArcGIS 9.X, you do the following:

-right click on the data frame
-properties
-then coordinate systems
-check under predefined and pick a coordinate system for your area

This is more of a bugfix than it is anything else. Sometimes ArcEditor can be quite annoying.

This is a solution for Invisible layers in ArcGIS. Or for Hidden Layers in ArcGIS layout view

Scaling AutoCAD viewports to common Geographical scales

So, you have your AutoCad drawing completed, you have your layout drawn, and view ports of the drawing added. Now that all of this is done, you want the viewports to be scaled to a nice, round scale for your legend.

The way you do this is the Zoom XP command. Type Zoom (shortcut Z) then> XP and enter one of the values listed in the chart below for the corresponding scale:

Zoom XP

Scale

Zoom XP

Scale

0.200 xp

1:5 000

4.000 xp

1:250

0.333 xp

1:3 000

5.000 xp

1:200

0.500 xp

1:2 000

6.667xp

1:150

0.666 xp

1:1 500

10.00 xp

1:100

1.000 xp

1:1 000

20.00 xp

1:50

1.333 xp

1:750

25.00 xp

1:40

1.666 xp

1:600

33.33 xp

1:30

2.000 xp

1:500

40.00 xp

1:25

2.500 xp

1:400

50.00 xp

1:20

3.333 xp

1:300

100.0 xp

1:10

Converting AutoCAD blocks/polygons (DWG) to fonts (TTF)

Theoretically, this should be an easy task. AutoCAD is vector based, true type fonts are vector based, so, where is the conversion tool? Unfortunately, there isn't one.

The only way to convert between the two is to do it somewhat manually. I've looked and even tried to program this myself, it just isnt within my capability. Incidentally, if some enterprising young programmer out there was willing to do this, I would be very appreciative!

So, anyhow, this is my methodology for converting AutoCAD polygons/blocks to fonts (in my case, so they can be used as markers in ArcGIS).

1) Save your CAD file as a BMP or a TIF, or some other uncompressed raster image. I would recommend saving it at a scale that you feel you will use the most as a font (even though fonts are scalable).

2) You need a font creation program. There is currently no way around this. If you have the money, there are several programs you can buy for 50-700 USD. If, like me, you dont have this kind of budget for a piece of software you will not be frequently using, then there is a fairly good free software option out there. It has one major drawback, however....

It's not windows software! Which is a drawback when you are clearly using both ESRI ArcGIS and AutoDesk AutoCAD in a Windows environment.

Anyhow, the software is called Font Forge (Google it, it should be at Sourceforge). To even get this program to work and start making your ArcGIS compatible fonts, you need to install Cygwin, which is an application that simulates a UNIX environment.

Once you have gone though the headache of installing that program - there is a very good guide on their website - you are ready to start converting AutoCAD into a font. From within cygwin type:

$ twm &

$ fontforge -new

Read the fontforge guide on how to create fonts. I would highly recommend the autotrace program - if it will work on your system - it will streamline the conversion process somewhat. Once you have created a new .font be sure to import it into your control panel>font folder. Windows will now have a new font that, hopefully, has characters that resemble your original AutoCAD file.

Be sure to read my upcoming article on using these newly created fonts to create ArcGIS markers.

Saturday, January 19, 2008

Implementing Mobile GIS

Implementing Portable GIS : the Guide

Terminology

Spatial Data: any form of data that is or can be located with some form of geographic coordinates.

GIS Geographic Information Systems: (not to be confused with GPS) are a means for creating, storing, and analyzing spatial data.

GPS Global Positioning System: (not to be confused with GIS) is a satellite-based navigation system that can be extremely useful for collecting spatial data.

dGPS Differential GPS: An extremely accurate, but usually more expensive, base station based GPS.

Mobile GIS: essentially allows one to perform GIS tasks in the field with GPS, handheld computers, and/or any other portable electronic device available. This could include data collection, data storage and/or data analysis.

Data Collection

GPS is the obvious means of in the field data collection. Other means of electronic data collection – Total Station, theodilite – are unwieldy, relatively slow, often more expensive, and over-accurate for the type of work we do. The only viable competition to the GPS is to not implement anything if a cost/benefit analysis indicates as much.

GPS Implementation

What is required:

- An accurate handheld GPS or dGPS…

…with mobile GIS software (preferably)

…with USB access

- Necessary training

Data Collection WITH Mobile GIS

There are several mobile GIS applications on the market; that being said, ESRI’s ArcPAD is the most used and most directly compatible with the GIS software we have (ArcView 9.2).

What is ArcPad?

It is, essentially, a scaled down, mobile version of ArcMap. It allows the user to store, view and record geographic information on a handheld computer at any location. For instance, an air photo can be underlayed in background while tree points are recorded in real time.

Possible Methodology for Data Collection WITH Mobile GIS

1) Record point, line, or polygon features on the fly

2) Assign them to a layer of your choice or create a new layer

3) Add annotation on screen via keypad or by freehand drawing with stylus

4) Plug the unit into an ArcMap enabled PC and directly import the recorded layers to a GIS

5) Symbolize the data appropriately for use in map outputs, geodatabases, etc…

Possible Methodology for Data Collection without Mobile GIS (but with a GPS)

1) Record point or area in the field with GPS

2) Record some kind of annotation, be it on paper or on a PDA, that indicates what feature is at each point location

3) Import recorded points into ArcGIS. Create layers for each of the points (e.g. tree species, shrubs), while attaching annotated data from handwritten notes/PDA.

4) Symbolize the data appropriately for use in map outputs, geodatabases, etc…

Draw backs

1) Recording separate notes can be both time consuming and awkward in sordid weather (if notes are on paper).

2) A missed or misplaced point can be very difficult to identify without returning to the field

3) Can not save data as layers or symbolize data

4) Can not underlay existing data/imagery

Bottom line: if mobile GIS can create efficiency that outweighs its price, then it is worthwhile.


Portable GIS for Navigation

A portable GPS that is mobile GIS capable could help navigate to features in the field more quickly. The rough average of ten meters of accuracy that our current GPS possesses is appropriate to locate large features (e.g. a river), but when the goal is to find an individual piece of vegetation it can be a detriment. In addition, ten meters of accuracy can be even lower when in dense forest growth.

Current Technology

- inaccurate handheld GPS

- HP iPAQ hx2000 series with possible GPS integration

- ArcView 9.2

Possible Technology

- Trimble GeoXH handheld GPS (or equivalent GPS)

- ArcPad software


Friday, January 18, 2008

Dealing with VERY large Raster images in ArcGIS

When dealing with very big raster files in ArcGIS (like jpeg, TIFF, MrSID, GeoTIFF etc..), there are several considerations/things you can do to make life easier. So, without further ado, my guide to dealing with giant images in ESRI ArcGIS:

Before you begin:

1) Set up your layouts, ie. how your map will look, before you even begin. Remember, once the raster has been added, everything will slowwwwwww dowwwwwwwn.

Adding the Raster to the ESRI ArcGIS data view

1)In Data view add the raster image. BUILD PYRAMIDS! Do not ignore this step, it can make matters go from extremely awful to merely agrivating when it comes to speed. Remember, the pyramids were not built in a day, sometimes building pyramids takes a while. So be patient, you might even think the system is hanging, it will take so long.

2) Choose your actions carefully. You may wish to plot out on paper what you are going to do. This is because doing anything really slows you down. Even using the pan tool in ArcView can take 3-5 seconds or even more!

3) In layout view click on the data view pane, right click and select - Draft mode - just show name (unless you need to see the view for adding labels etc...). This will speed things up extremely

4) Don't fret ArcGIS is just a program.

5) Do not run screaming from the room.

Simple AutoCAD to ArcGIS 9.2 Guide (.dwg - > .shp)

If you do a lot of work in both ArcGIS and AutoCAD, as i do, you will know the difficulties of converting between the two. Although AutoCAD files can be directly imported into ArcGIS and ArcGIS can export to DWF files (which are directly compatible with AutoCAD), jumping between the two can have extremely annoying hidden difficulties.

This post, as well as this blog, will focus on working in the two environments and making your work mesh together in concert. This post is a guide for to simply add Autodesk Autocad DWG drawings into ArcGIS 9.2. So, without further ado...

As with any ArcGIS document, you need to make sure that you .DWG file is saved in a directory that is no further than two folders from the root drive. In addition, you must make sure that there are no spaces in the folder or filenames. eg. c:\Arc\GIS\cadfile.dwg

Next open and save a ArcMap document in the same folder. There can be spaces in this filename. Add data to the data frame > select the autoCAD document you wish to import. If the CAD is simplistic and is only one layer, you are done! However, since 99% of CAD documents do not fall within this description, you are not done.

The CAD document, by default, combines all the layers, annotation, etc... into one group layer in ArcGIS. You can expand this group layer and see the nonsensical way it displays the 5 layers within it by default - complete with annoying ArcGIS random colours and and strange coordinate/range descriptions. They will fall under categories like annotation, point, polygon, polyline etc... These are the filetypes that ArcGIS is most familiar with, but who wants them in one layer!? And the descriptions of the symbology is equally confusing. eg. continuous 4,62 etc...

Your goal is most likely to seperate the layers back to the point that they used to be when you had them in AutoCAD 2008 (or whatever version you are using). You may want all of the layers or you may want a select few. The process, as of right now, is somewhat confusing. I am currently working on a more streamlined process and will be blogging about it soon. But for now here is the method for extracting autocad layers from ArcGIS:

To do this, we must first right click on the CADD layer within the group layer > properties > drawing layers tab > then click disable all > then click the first of the layers you want to isolate (only one unless you want to combine several layers into one layer).

Close the window > right click again on the layer > go to data > expand it > click export data...
> chose a place to save the file and a file name and voila!

You have a layer that is an ESRI shape file (.shp). You can repeat this conversion process for each of the AutoCAD layers you want made into ESRI ArcGIS layers.

As I said, I am currently writing code to streamline this process and it will be done and posted on these forums soon!

Thursday, January 17, 2008

Georeferencing and Georectifying AutoCAD documents

Preamble: AutoCAD 2008 and previous versions (all the way back to the '80s) do not have the capability to use a geographical coordinate system. So, how do you get these points into ArcGIS (which uses coordinates)? In addition, once you have them in there, how do you georectify them (if necessary).

The answer is simple:

Wednesday, January 16, 2008

Copying and Pasting Groups of Text Elements in ArcGIS

If you are copying and pasting groups or just selected groups of text elements in an ArcGIS 9.2 layout, then you might think it is completely straightforward and does not need a blog article about it. You are wrong, it does, it is another of ArcGIS's many bugs that have yet to be fixed. There is an easy workaround, so you are in luck.

The problem: when you select and copy/paste large groups of ArcGIS text, they lose their formatting and become askew.

Solution: When you copy the text, you need to note the percentage of zoom on the layout. eg. 25%. When you paste to another area, layout in a different ArcGIS mxd document, make sure that the percentage is the same. You should have few problems then.

AutoCAD Lesson: Matching the style of one feature to other features

If you have an object or objects in AutoCAD that you wish to have the same properties as another object that you have in your drawing, there is a painless way to do it (without manually changing the properties).

1) type the command MA
2) click the input feature (with the properties you wish to transfer)
3) click the feature(s) in CAD that you want to give new properties to

There! Your feature should all have the same colours, line weights, line types, scale and any other property you can image.

AutoCAD lesson: Moving an object from paper space to model space without changing the scale and/or location

You can move an object from paper space to model space (or vice versa) in AutoCAD 2008 by simply copy + paste. But what if the object is scaled and you want to maintain the scale in the conversion? The scale of paper space is 99.9% of the time a different from the scale in model space/your viewport. So, to preserve that relative scale in the conversion you need to do the following:

In AutoCAD…

1) select all the features you wish to convert

2) click the modify drop down > then click change space.

The features you have selected should move from the paper space to your viewport.

Conversely, if you wish to bring a feature from a CAD drawing’s model space back to the paper space, then you need to do the following:

In AutoCAD

1) Double click on the viewport that contains the features you wish to bring back (first make sure the viewport is not locked)

2) Click the features you wish to bring to the paper space

3) click the modify drop down > then click change space.

The features should now be back into your paper space with their scale and location intact.

Converting ArcGIS to Autocad: the easy way

This is a simple methodology for converting ESRI ArcGIS shapefiles to AutoCAD dxf format. This post will be very brief, because this process is relatively simple. There are two methods of doing this that I use depending on the ArcGIS version:

Method 1: For ArcView and ArcEditor
If you are stuck with either of the lesser licences, use this method. If you have ArcInfo (the top licence), skip to method 2.

1) Open ArcCatalogue
2) Select the shapefile you wish to convert.
3) right click on it and select export... then shapefile to DXF...
4) Select an output path (dont worry about decimals for now)

You can repeat this process in ArcGIS the same way and select batch if you wish to do this to multiple shapefiles at once.

Method 2: For those of us with ArcInfo

1) Open ArcCatalogue
2) Select the shapefile you wish to convert.
3) right click on it and select export... then click Export to CAD
4) Then select DWG. You can export directly to a DWG file with ArcInfo. If you dont have ArcInfo use method 1 and cry.

Reading my additional articles on importing ArcGIS into AutoCAD for more information...

Tuesday, January 15, 2008

Dissapearing or moving Custom Toolbars in ArcGIS

If you use a lot of custom/off the beaten path toolbars in ArcGIS, like me, then you must know the frustration of them disapearing or moving around constantly. You can fix both aspects of this annoyance with a little programming and care.

When you make a custom toolbar, make sure you save it to normal.mxt (or the template you normally use). Otherwise, when you load ArcGIS will not see it again unless you load the map document (.mxd) you were working on when you saved the toolbar. If you didnt save the document, then you have completely lost your changes.

If you create you own UIcontrols and save them, they are also attached to the document you choose. Again, if you save your ArcGIS UIcontrol in the mxd document, it will not load in a new document. Also, when scripting, be sure to write all of your codes in the mxt template module, or again, you will lose your changes (you can always copy and paste it over if you forget).

Even more annoying is getting your Toolbars to stay in the location you assign them when you reload ArcMap. This part requires VBA programming:

codes Coming soon

Converting AutoCAD blocks to ArcGIS markers: Can it be done?

I've been asked this question a number of times: Can AutoCAD blocks be transformed into ESRI ArcGIS markers and saved in an ESRI style document?

The answer is yes, sort of. It depends on the application and how loosely you define the word 'convert'. Another person might use the word re-create instead. Just to clarify, this guide only applied to point features in ArcGIS, you can search my other posts for a guide on how to convert AutoCAD blocks into polygons or lines in Arc.

There are two methods I currently use to convert from CAD blocks to GIS markers (points):

Method # 1: Saving as a .bmp (windows bitmap)
This method is only useful if you do not ever need to scale the marker to a size larger or smaller than how you create it. If you do need to scale it, but only to one or two other sizes, you can just repeat this process for two additional symbols.

To begin, you need to export the file you want from AutoCAD to a bitmap document. There are a variety of ways to do this, you can read about it elsewhere in my blog. Or elsewhere on the internet for that matter.

Once this is done, you can import the marker to your ESRI ARcGIS styles manager. There is a guide to use your styles manager also in this blog. However, the quick solution is to go to TOOLS>STYLES>STYLE MANAGER is ArcGIS. In there, go to the style file that you are using (either your user name, ESRI, or another file you have created - this is recommended). In this ESRI ArcMap style file, you need to select 'marker symbols'>right click on the right pane> new...

Then select picture marker symbol> select the bmp you exported from AutoCAD and voila. You are done. The reason I say not to scale is more of a guideline than a rule. ArcGIS is terrible at scaling images (think MS Paint, but worse). A scaled symbol from a bitmap will look completely wrong. So, as I mentioned earlier, if you want to import a CAD to ArcGIS symbol into bmp, make one for each point size you would like for the marker.

If you DO need to scale your marker, then a much more complicated methodology is required...

Method # 2: Creating an ArcGIS marker from a custom TTF (True Type Font)... SEE PART 2

Monday, January 14, 2008

DXF & DWG files in ESRI programs

This article contains information about DXF and DWG files in ArcGIS, (ArcView, ArcEditor, ArcInfo). The info is easy to access and is in point form.

- can’t edit with editor tools

- have weird symbology

- consist of a layer set with 5 layers

o annontation

o point

o polygon

o polyline

o multipatch

- eacgh of these layers can be turned on/off, used for symbology, assigned a coordinate system and any other data type options

- they can be exported as a shapefile

- in the CAD properties menu, different CAD layers can be turned on/off, but not in the table of contents. Here they remain as symbology only

AutoCAD to ArcGIS Conversion Compatibility Report

This post lists the current conversion capability of different versions of AutoCAD and ArcGIS (ArcView, ArcEditor, ArcInfo). To see how to do this, read our guide: Guide to convert ArcGIS to AutoCAD

The following are the versions of AutoCAD that I am certain will import into ArcGIS (older versions may also work, I just have not experimented:
AutoCAD 2008 (Release 22)
AutoCAD 2007 (Release 21)
AutoCAD 2006 (Release 20)
AutoCAD 2005 (Release 19)
AutoCAD 2004 (Release 18)
AutoCAD 2002 (Release 17)
AutoCAD 2000i(Release 16)
AutoCAD 2000 (Release 15)

The following are the versions of ArcGIS that, for sure, support importing

ArcGIS 9.2 ArcGIS 9.1 ArcGIS 9.0 ArcGIS 8.3 ArcGIS 8.2

See our Guide: how to convert ArcGIS to AutoCAD

Thursday, January 10, 2008

Making Attractive layouts in ArcGIS

This article contains general tips for making an attractive layout in ArcGIS 9.2, ArcGIS 9.1 or ArcGIS earlier.

- use rulers on the layout menu. Make sure to set the smallest division to a low number

- also enable snap elements to guides and rulers

- use guides often. Use them to delineate the general area of your ArcGIS layout.

- Be consistent in your layout. Use the same template for all projects that you do. This will make your GIS work look extremely professional

- use alignment to line all of your elements up