Showing posts with label arcGIS. Show all posts
Showing posts with label arcGIS. Show all posts

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

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!

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.

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

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!

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.

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

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