Posts Tagged arcview

HOWTO: Multi-Line Labels in Arcview 3.x

A client asked me to provide him with a map that has multi-line labels.  Here’s a picture of what he wants.multiline

Unfortunately, Arcview 3.x doesn’t natively offer labels that span multiple lines.  Here are the solutions I’ve come up with for Arcview 3.2, from the simple to the complex.

Type in the labels

This is the simplest solution. 

  1. Click the Text Tool
  2. Type in the label, putting in line breaks as desired

The trouble with this solution is that if you have a lot of labels, you have to do a lot of typing.  If the label values change periodically, you have to retype the labels.  There is a strong possibility of typos creeping in.  This would work if you have only a few items to label.

Manually split the automatic labels

  1. Set up a label field with the complete multi-line string as one field (e.g. SF-02 15 N / 27 P)
  2. Theme / Auto-label using your label string
  3. Click on each label and hit enter where you want line breaks

As with the typing solution, this requires that you click on each label.  You don’t need to worry about retyping things which cuts down on typos.  This would work if you have a dozen or so items to label (depending on your patience for repetitive work). 

Use Best Placement to simulate multi-line labels

This would work for up labels with up to 3 lines

  1. Theme /  Properties / Text labels / Position of Text – Top Center
  2. Theme / Auto-label using your first label string
  3. Theme /  Properties / Text labels / Position of Text – Center
  4. Theme / Auto-label using your second label string
  5. Theme /  Properties / Text labels / Position of Text – Bottom Center
  6. Theme / Auto-label using your third label string

This can work nicely if your features are fairly uniform in size and shape.  Otherwise you’re likely to wind up with overlapping labels.  The big advantage here is that it’s all automatic so this would work for themes with many features.  Also, each of the three labels is a separate item and will have to be positioned separately. 

Automatically split lines

This is the most complex solution I have. 

  1. Set up a label field with the complete multi-line string as one field.  Use a sequence of characters that will not appear in your labels to mark line breaks.  (e.g. SF-02 ##$$15 N / 27 P)
  2. In Arcview, Theme / Auto-label using your label string
  3. Save and exit Arcview
  4. Open the .apr file with a text editor
  5. Search and replace your sequence of line break characters (e.g. ##$$) with \n.
  6. Re-open the file in Arcview and you should now have lovely multi-line labels.

This will almost certainly require manually moving labels to their correct positions.  It will allow labels with any number of lines and will work for any number and shape of features.  The downside is that every label will have to be re-examined every time the theme is relabeled. 

 

 

From what I’ve read, later versions of Arcview do allow for multi-line labels, so if you’re using one of those, skip all this and use the built-in features.

Tags:

Doing an Import from Farmworks to Arcview

Just a few notes for me.

To import a shapefile from Farmworks to Arcview (BMG Nutrient in particular) switching from decimal degrees to UTM in arcview 3.1
1. Export as shapefile from Framworks (Usually done by BMG)
2. Create a view with units as decimal degrees
3. Add the exported shapefiles as themes
4. Convert the themes to shapefiles (step 3 and 4 help avoid some errors)
5. Use Arcview’s projection utility
a. select converted shapefiles,
b. Coord System is Geographic GCS_North_American_1927
c. Units Degree
d. Next
e. No to saving coord system
f. Projected
g. WGS_1972_UTM_Zone_14N
h. Units Meter
i. Next
j. No
k. Next
l. Finish
6. Close Project
7. Open Project, add new shapefiles

Tags:

ArcView Problems

Note to self – when ArcView starts screwing up out of the blue, don’t panic. Empty the local temporary files directory and try again. Doing this first will save a LOT of time.

Tags:

Crossing UTM zone or boundaries

We’re in UTM zone 14N here, so all our mapping is based on that. We do some soil samples that spill over into Zone 15N, which throws everything off. Here’s what I did to convert from 15 to 14. This doubtless introduced some inaccuracy, but it should be close enough for Tone Ag purposes.
1. In Mapsource, change the coordinate system to decimal degrees (lat/lon hddd.ddddd), export points, close Mapsource
2. Open the resulting text file in Excel, strip out redundant columns (leave only position, elevation), save as tab delimited txt, close Excel
3. Open the resulting text file in your favorite text editor, search and replace ft with nothing, search and replace N with nothing, search and replace (space)W with (tab)-, save and close
4. Open the resulting text file in Excel, insert two columns filled with 1 before elevation, swap lat/long columns, save as txt, close Excel
5. Run my coordshift.pl program on the resulting text file

Alternate method
1. In Mapsource, change the coordinate system to decimal degrees (lat/lon hddd.ddddd), export points, close Mapsource
2. Open the resulting text file in your favorite text editor, search and replace N with nothing, search and replace (space)W with (tab)-, add (tab)position_w header after position header, save and close
3. Open the resulting text file in Excel, save as dbf, close Excel
4. In ArcView, add dbf as event theme in a lat/long view, convert theme to shapefile, close ArcView
5. Use ESRI projection utility to convert shapefile from degrees to zone nad_83_14N
6. In ArcView, add new shapefile

Usual disclaimers – don’t use this in any environment where precision is at all important, I take no responsibility, use at own risk, blah, blah, blah.

You might want to look at this article on crossing UTM zone boundaries.

Tags: ,

Crop Scouting Notes

1. Join Field and Crops into a theme
2. Export that theme as a shapefile
3. Merge Crop scouting points for various days into a shapefile
4. Use Geoprocessing Wizard/Assign data by location to merge Crops and Crop Scouting shapefiles
5. Save the result as a shapefile
6. Exit Arcview
7. Run addnoteid.prg on resulting dbf
8. run notes_merge report
9. re-open arcview, label notes with noteid field

Tags:

Transfering shapefiles from ArcView to Garmin GPS

I wanted to upload shapefiles from ArcView to my Garmin GPS (i.e. change ArcView shapefiles to Garmin tracks).
Here are the steps involved
1. Get and install DNR Garmin extension/program
2. In ArcView activate DNR Garmin Extension
3. Select the theme with the shapefiles you want to export
4. Choose DNR Garmin/Export ArcView Projections to DNR Garmin
5. Close ArcView
6. Ensure GPS is connected to the computer and turned on
7. Using DNR Garmin Program, open the shapefile
8. Using DNR Garmin Program, upload the tracks to the GPS
9. Close DNR Garmin Program,
10. Download tracks from GPS using MapSource
11. Rename tracks so they are not the active tracks using MapSource (e.g. Field1, Field2…)
12. Clear tracks on GPS
13. Upload Track to GPS using MapSource NOTE: Saved tracks can only have 750 points, if your track has more, you may want to delete some excess points.
14. Tracks should show up under Saved Tracks on the Tracks screen

Tags: ,

Manitoba Quarter Section Polygons

Manitoba Land Initiative provides a lot of free GIS data for Manitoba. Unfortunately, one thing they don’t provide is a Polygon theme showing quarter sections.

Here are instructions for creating a quarter section polygon theme from MLI data

  1. Use DNR Arcview tools merge section lines and quarter section lines (output temp.shp)
  2. Use Polylines to polygons extension to create a polygon theme from temp.shp -> (output temp2.shp)
  3. Make sure qsec_num_text.shp is open
  4. Use Geoprocessing wizard to assign data by location to qsec_num_text.shp from temp2.shp
  5. Open qsec_num_text.shp’s table, export to dbase format -> temp3.dbf
  6. Add table temp3.dbf to project
  7. Choose id field in temp3 and temp.shp’s table and do a join
  8. You can now choose convert to shapefile to get a polygon theme showing quarter sections.

Feel free to email me with questions.

Tags: