When you need to convert a GeoRef-projected shapefile to some other projection (like State Plane) for use in QGIS or any other GIS software, it may happen that the GeoRef shapefile is missing the *.prj file. It happens more often than you might expect! When this happens, uDig doesn't know that the shapefile is in GeoRef projection, because it needs the *.prj file to tell it so. Without that information, uDig can't re-project the shapefile in question, because it doesn't know from what projection to re-project to your favorite projection. We need a way to assign a GeoRef *.prj file to that shapefile.
If you examine the set of files that comprise a shapefile, you'll find that one of them has the three-letter file name extension of "prj" . This is the shapefile projection format file, explained in some detail in this Wikipedia article. You might think that copying the *.prj file from another GeoRef-projected shapefile and re-naming the *.prj file to match the file name of the shapefile in question would do the trick. Unfortunately, it doesn't work. (That would be too easy!) This tutorial provides two methods for generating a *.prj file for a GeoRef-projected shapefile that is missing its *.prj file. The first method involves using uDig, and the second involves using QGIS. In both cases, you must be ABSOLUTELY, POSITIVELY sure that the shapefile with the missing *.prj file is indeed a shapefile projected to the Michigan GeoRef projection! Method 1: Using uDig to Generate the PRJ FileThis first method uses uDig to generate the missing *.prj file. Many of the steps will be familiar to those who have used uDig to project from GeoRef to State Plane. This method preserves the attribute table of the file with the missing projection info. You can follow the slide show below (captions are on the slides), or follow the text version after the slide show window. DO NOT click on the big arrow in the middle of the slide screen! Instead, mouse-click along the bottom of the slide screen. A set of slide control buttons will appear. Click on the two vertical bars (the middle button) to stop the auto-play that Google insists on. Use the arrow keys to view the slides at your own pace. If you want to see the slide show full-screen, then click HERE. (You'll be taken to the Picasa site where the slideshow is stored.)
PROJCS["NAD_1983_Hotine_Oblique_Mercator_Azimuth_Natural_Origin",
GEOGCS["GCS_North_American_1983", DATUM["D_North_American_1983", SPHEROID["GRS_1980", 6378137.0, 298.257222101]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Longitude", EAST], AXIS["Latitude", NORTH]], PROJECTION["Hotine_Oblique_Mercator"], PARAMETER["longitude_of_center", -86.0], PARAMETER["latitude_of_center", 45.30916666666666], PARAMETER["azimuth", 337.25555999999995], PARAMETER["scale_factor", 0.9996], PARAMETER["false_easting", 2546731.496], PARAMETER["false_northing", -4354009.816], PARAMETER["rectified_grid_angle", 337.25555999999995], UNIT["m", 1.0], AXIS["x", EAST], AXIS["y", NORTH]] Method 2: Using QGIS to Generate the PRJ File (Lee Mueller Method)Registered forester (MI) Lee Mueller ran into the "missing *.prj file" problem in his work recently. While Lee and I were pondering, via e-mail, how to use uDig to assign a projection (see Method 1 above), he tried and succeeded using the QGIS method. It's a pretty elegant solution to the problem, and hence we describe the method here as well! Its advantage is its simplicity. The main drawback is that you will lose the attribute table of the original file. (You will, however, inherit the attribute table of the "known" file as it applies to the area covered by the GeoRef shapefile with the missing *.prj file. In many cases this is actually desirable --- your mileage may vary!) This method uses QGIS to generate the *.prj file. While QGIS cannot handle Michigan GeoRef correctly, it DOES recognize that two GeoRef files belong in the same projection, and plots them in the correct relative locations. (It simply does not know where exactly that projection takes place on earth.) You can follow the slide show below (captions are on the slides), or follow the text version after the slide show window. DO NOT click on the big arrow in the middle of the slide screen! Instead, mouse-click along the bottom of the slide screen. A set of slide control buttons will appear. Click on the two vertical bars (the middle button) to stop the auto-play that Google insists on. Use the arrow keys to view the slides at your own pace. If you want to see the slide show full-screen, then click HERE. (You'll be taken to the Picasa site where the slideshow is stored.) The method can be summarized as follows:
|
Resources > Project Tutorials >