Monday, November 10, 2008
Open Question: How to query shapes in GE?
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
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
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
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
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
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
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!
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
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
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
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
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
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
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
>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
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
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)
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...