代写Exploring Map Projections and Geographic Coordinates in ArcGIS Pro调试SPSS

- 首页 >> Python编程

Session #5: Exploring Map Projections and Geographic Coordinates in ArcGIS Pro

Investigating and defining projections in ArcGIS Pro.

Download the Projections.zip file form. the HW data folder on Canvas. The project deals with Coconino County, Arizona which includes Flagstaff, Arizona and the Grand Canyon. You are faced with three GIS data layers in three different spatial references (Projections). Your job will be to get them all to register in the same map frame. The map in the left shows the general area of Coconino County, while the map on the right shows what is expected to appear when you open the Projections ArcGIS Pro Project. At present, only the yellow county layer itself is in the Coconino County map.

Open the Projections project from the aprx file in the project folder, “Projections”, that extracted from projections.zip.

Open the properties for the county layer by right clicking on the name of the layer in the Contents pane, then selecting properties. Click the source tab on the left and look over the data source, extent, and spatial reference properties. This layer has a spatial reference defined and will be the one we use as a base for getting the other  layers to register in the correct location in our map.

Question 1: What is name of the Projected Coordinate System (spatial reference) of the county map layer?

Close the properties window. Using the Catalog, drag the roads layer into your Coconino County map.  You will see it added to the Contents Pane, but does it appear on the map?  This is usually bad news and suggests that the projection (spatial reference - SR) is either not defined or is defined incorrectly.  Even if this layer was in a different SR from the one you identified for the county layer, if it were defined correctly, it would be projected “on-the-fly” to fit with the existing projection. Unfortunately, it did not do that, so, let’s investigate.

Open the properties for this layer (roads) as you did earlier when looking at the county layer.

Question 2: What is the spatial reference of the roads layer?

Question 3: What is the numeric value for the top extent of the roads layer? (You can view this by viewing the “extent” section of the “source” section within the layer properties)

Finally, add the places layer from the Geodatabase. It too appears in the Contents pane, but not in the map, so we must worry that this one is also not correct.

Question 4: What is the spatial reference of the places layer?

Question 5: What is the numeric value for the top extent of the places layer?

Use the zoom to full extent and see if you can find where the three parts are each located.  They are located where their “extents” say they are located, so they may or may not be easy to see.  I expect that you will see the places and county, but likely not the roads. You can return to the properties for each of the layers to answer the questions below if that helps you find them. You may also open the Roads attribute table to select several rows within the roads layer – the selection may help to make them more visible within the map view after zooming to full extent a second time (make sure to clear any selections when done) .

Question 6: The places layer appears to be far ________   of the county layer     (North, South, East, West)

Question 7: The roads layer appears to be far ________ of the county layer      (North, South, East, West - this layer will be the most difficult to see)

Finally, use the right-click - zoom to layer option in the Contents pane on each of the layers to see that they are indeed drawing on the screen, just not together, as we need for GIS analytical work. When you move the mouse around each layer, note the coordinates at the bottom of your screen. This display is converting the numbers in each file to latitude and longitude coordinates, but clearly the roads and places layer do not appear where they should. Remember that the coordinate system we want is the one used by the county layer, so we will consider the coordinates and location of the county layer as “correct”.

As it is clear that the three layers are not going to work together in our project, we need to get a little more information about how coordinate systems work in ArcGIS, tie it to the lectures and lab on projections we just finished, make educated guesses about the projections of the roads and places (since the county is the only projection we know to be correct), then try to confirm them as correct, and set them to get them to overlap.

Basic Rules for Georeferencing in ArcGIS

To be used in analyses, ArcGIS Pro layers must have a file (or information inside the file itself in geodatabase) that defines the spatial reference of the native coordinates in the layer. The native coordinates are those hidden inside the field called “Shape” (where it says Polyline at right) in the table for a feature class. You cannot see them, but they determine where the map draws in space. These data are called Metadata: data on data.

An example of a Geographic Spatial reference file is below on the left, the image on the right shows the same spatial reference file, but it has been modified into the separate parts to help illustrate how the information is delimited by brackets and commas. The parts should be intelligible to you from the lectures we just completed. The spatial reference has a GEOGCS – a geographic coordinate system, a DATUM which defines the SPHEROID name, radius and flattening, a starting point PRIMEM and a UNIT of measurement.


Question 8: According to the spatial reference file above, what is the flattening in the WGS_84 SPHEROID? (Include up to 4 decimal places)

An example of a Projection Spatial reference file is below.  It contains the PROJCS (projected coordinate system) which includes the GEOGCS as well as we must know what GEOGCS we used to measure the original data.  The standard lines are also defined in the description as PARAMETER. The file below can be read in separate parts delimited by the brackets and commas like the first example above.

Question 9: According to the spatial reference file immediately above, what is the latitude of northern standard parallel for the USA_Continguous_Albers_Equal_Area_Conic_USGS_Version (Include the decimals places)

If you download a file from the internet and there are no metadata, the spatial reference is considered “unknown” .  How would you determine what it should be?  In a Geodatabase, the metadata are stored (in a proprietary format) inside a folder (file Geodatabase) so you cannot look for a file.   Instead, you need to look up the properties of the layer in as you already did above.  You can always look up the properties for all types of map data in ArcGIS:

If your spatial reference is “unknown” when you add the layer to the map, then ArcGIS will add the layer, but  it may appear in the wrong place, at the wrong scale, or not at all.  You just saw that problem when you added the Roads and Places layers to the map earlier in this assignment.  Unless you just need to look at the appearance of the “map” which you can do with right click - zoom to layer as you did above, you must correctly define the projection using a tool in ArcToolBox. If you plan to use your data for any form of analysis it is critical that you do not pass these issues by without fixing it!!  It will bite you badly later on.  The following pages will guide you through the process of investigating and fixing the problem.

If a spatial reference is attached to the file but is incorrect, then what?  The only time this is likely is if YOU set the reference wrong due to a lack of understanding of how ArcGIS works with spatial references.  This happens a lot at the beginning of your getting comfortable with ArcGIS, so we will look at setting up spatial references in this homework.

Setting up a Spatial Reference

2 steps:

•     Step 1: The first one is the hard one  decide what the spatial  reference is (remember that geographic coordinates (lat/long - GCS) are also spatial references) and make an intelligent guess. Most data for local areas in the US are either geographic (NAD83, WGS84, etc.) or in one of the common projection systems we just discussed in the lectures:

•     Universal Transverse Mercator (UTM)

     State Plane Coordinates

•     Foreign layers may be in a national grid for that country, UTM, or in Geographic.

You can rarely be certain about a spatial reference but can make smart guesses and then test those guesses to confirm they are reasonable. This assignment will guide you both parts of that process, making a guess and testing it.

•     Step 2: The second step is the easy one - use the Define

Projection tool to define the projection. This tool is in the Data Management - Projections and Transformations toolbox as seen at right.  Using this tool this too quickly, before you are reasonably sure of what coordinate system to choose, is the biggest mistake early GIS users make. So, we will experiment a bit with this map of Flagstaff, AZ and the vicinity.


A few clues to look for in guessing well:

The systems are quite different in the coordinates they use: (These differences are worth knowing well)

-    Geographic coordinates use angular units (degrees) that have a very limited range of values, and they are the only common ones with small numbers like that.  A map in a Geographic Coordinate System (GCS) will show a small variance of values within the range of values listed below:

•     X (longitude) must range from -180 to +180

•     Y (latitude) must range from -90 to +90

-    UTM: the next easiest to apply as all zones are standard.

•     X range is usually 0 - 1,000,000 (500,000m E occurs at the Central Meridian and we know where the central meridians are located by longitude)

•     In the northern hemisphere (the US for example), Y measures meters north of the

equator and there are 10,000,000 meters from the equator to the pole (the definition of a meter!).  So, a rough estimate is that 5,000,000 would be halfway to the pole - about  equal to latitude 45°N.

-    SPC – hardest to tell because there are no specific origin placements like in UTM, but

traditionally the values are in feet and may be larger than for UTM, especially in eastings.  Make this your third guess generally only after you have eliminated the other options.

Investigation in ArcGIS

For feature data (vector), simply look at the extent properties as you did above for the roads and the places.  It will tell you the range of values in the file’s native coordinates.

Right click on the county layer in the Contents pane.  Select properties, then the source tab. The units of the coordinates for the county layer are defined.  We will use this spatial reference as the projection we want in the end with the goal of making the other two layers match it when our process is complete.

Fill in the table below: Write the extent coordinate range for “county” in the table below so you have a   record of their current values. Repeat for the places and roads layers.   Note that they are not the same at all (Filling in this table will make it significantly easier to identify the ranges of each layer and the differences between them):

Find the three layers on the map to get an idea of how they differ, and by how much:

Now that you have all the numbers in one place, think through the differences while considering the clues given at the top of this page. The goal is to identify how the location of the layers in the map are incorrect while you can also look at the numbers, eventually making a reasonable guess at the units used by each of the layers. Panning to/from each layer while doing this may help.


Right click on county in the TOC and “zoom to layer” .  As this one is defined, this is the view we want, but for GIS we require that the roads and the places align with the county.

Right click and “zoom to layer” for each of the other two to be sure they appear OK.

Finally, click the zoom to full extent button (globe on the Map ribbon). What happens?

Remember this full extent view!!!  You will likely make this mistake at some point this semester. Zoom to full extent is an excellent tool to help you identify the source of a problem in the future.

Match the two unknown layers to their correct projections.

Though you would not normally know this without knowing more about the source of the data, each of the two unknown projections are either a correct UTM (NAD_1983_UTM_Zone_xxN) or GCS (GCS_North_American_1983.) This task makes your task is a lot easier by narrowing down the potential options, you just have to decide which is which.  As mentioned earlier, guessing is the first step and proving likelihood/reasonableness of the guess is the second.

How to find the Geographic Layer:

Start out by determining the appropriate latitude and longitude for this part of the US.  To do that, pick a place in the county area.  Open a web browser and search for “Flagstaff, AZ latitude” .  That will give you a good idea of where we are looking to be. Since you will define the coordinates for each of the undefined maps, it is IMPERATIVE that you are very confident of your guesses before you define them.  As noted above, if you define them incorrectly, you must go back and correct the issue– nothing will fit as it should in the map!!!, or worse they will sort of fit, well enough that you may not notice the error, and all your results will be wrong.

ArcGIS does not know (or care) if you are right when you define a spatial reference, but you certainly do!!!  Since geographic is the easiest to determine, begin with the roads.  These numbers (look back at your table you filled in above) look like they might be a GCS (due to the small range of values) .  They are relatively small values and in the appropriate range around Flagstaff’s latitude and longitude.  Since I told you that was one of two choices, you already know this is true, but let’s do the work to be sure so we could do this when on our own in the future.  So, let’s test that hypothesis.

Zoom to the roads layer and find the intersection of US Hwy 180 (W Fort Valley Ranch Rd) and AZ 64 (State Rte 64), right click the roads layer in the TOC and turn on the labels, to help find it.

Enter the “latitude and longitude” at that intersection from your cursor in ArcGIS – read the display at the bottom center of the map view (the numbers in the example to the right illustrate what you are looking for, the values in the example to the right are not correct )

Latitude?? From ArcGIS

Longitude?? From ArcGIS

 

 

This appears to be geographic, and it is near the Googled location of Flagstaff, so we are still fairly confident.  To confirm, we need a comparison from a known map source.  Let’s try Google maps.

Search Google maps (http://maps.google.com) for Bedrock City, AZ then pan to the intersection of US 180 and AZ 64.

In google maps, right click to view the coordinates or set a point on the intersection and select what’s here. Compare it to the ArcGIS Pro reading that you entered in the table above (again, the example at right is not the correct location, but shows you what the information google will provide may look like). If the coordinates from the point on google maps and the coordinates from ArcGIS Pro are somewhat close, you can be pretty certain the roads layer is Geographic (NAD83) as opposed to UTM. We’ll go with that.  Make a note that roads are geographic.

Guessing for a UTM layer

We know:

•     latitude is nearly equal in distance per degree (parallels are nearly equally spaced)

•     All northern UTM zone Y coordinates start with 0 at the equator

•     There are 10,000,000 meters from the equator to the pole

Zoom to the Places layer and find Flagstaff, turning on the labels or a basemap may help - click in the polygons and view their popups until you find it - use the map on the front of this assignment if you need a reference for where to look. 

We need to get a coordinate for a point on this map and compare it to a known value as well. Zoom back to Flagstaff on your Google map, and in ArcGIS zoom to layer, then zoom in to see the Flagstaff polygon.

Select a clearly visible corner point on the outline of your Flagstaff polygon in ArcGIS and record the coordinates in ArcGIS Pro (the screen says something we cannot trust, but we know that these are the native units for this layer  and we think they are UTM meters).

Easting?? From ArcGIS Pro

Northing?? From ArcGIS Pro

 

 

So, for the places layer, if you use a Y coordinate from ArcGIS Pro, you could estimate the approximate latitude from this ratio.  If that latitude is somewhat similar to what you looked up earlier for Flagstaff on google maps (35.1°N), then we could corroborate that map is likely UTM.

For example:

IF the ‘y’ value (latitude) you get from google maps for the corner of flagstaff circled in the image above is 35.1 N then since we know that google gives the values in degrees, we can convert this value to meters for comparing with UTM using the following formula “degrees / 90 * 10,000,000 = meters (UTM)”

35.1(dd) / 90 * 10000000 = 3,900,000(m)

Since the projection does alter this a bit and 1° of latitude is not exactly the same all along, we only need to be close at first.

Now that we have decided that we believe that the units are UTM we must identify which UTM zone would be correct for our location. You can search google for maps and images of the UTM zones in the U.S., or use an image such as this one provided by the USGS https://www.usgs.gov/media/images/mapping-utm-grid-conterminous-48-united-states .

Question 10: What is the UTM zone number for the Flagstaff area?

*The tools used in the steps below have very different functions*

-read the tool descriptions in ArcGIS Pro to be sure you are using the correct one

Step 2: the easy one - define the projections (zoom to the County layer to see the results of the following steps)

Now that we are more confident that we know the correct spatial references for the roads and the places layers, step 2 is easy.  In ArcGIS Pro, open Geoprocessing, then type Define Projection in the “Find Tools” search box.

When it is found in the data management tools open the “Define Projectiontool.

Use the information in the two paragraphs below to set up and run the tool. Follow the dialog for the tool to enter the layer name and then the desired spatial reference.  These can be a little hard to find, but you can track them through the lists as follows:

For the Roads we need Geographic: click the globe button and follow the path (similar to what we did in the projections lab): “Geographic Coordinate System” > “North America“ > “USA and Territories” > “NAD 1983”, then click Ok, the “Coordinate System” parameter of the tool may show GCS_North_American_1983”, then click Run

Repeat for the places layer, and work through the menu as: “Projected Coordinate Systems” > “ UTM”  > “North America” > “NAD 1983 (2011)” > “NAD 1983 (2011) UTM Zone xxN” (replace the XX with the appropriate zone #), then click OK, then click Run

Step 3: Set the Map projection so ArcMap knows what the drawing spatial reference should be:

Right Click on the map called Coconino County in the Contents pane and select properties.  On the Coordinate Systems tab, you can use the existing layer “County” to set the projection you want for the entire map: NAD_1983_StatePlane_Arizona_Central_FIPS_0202 (US Feet).  This sets the projection of the map that is on your screen correctly.  This is most likely already correct, but this would be an important check before the final step of storing these layers correctly.

Click “zoom to full extent” (Globe button next to explore tool) and it is “visually” a lot happier now as they all line up!!  BUT, they only look OK, the data are still not projected into the NAD_1983_StatePlane_Arizona_Central_FIPS_0202_Feet coordinate system and thus would not be ready for analysis.   Reopen the properties (source) for roads and note that the extent has not changed!!!

*All three layers should appear to be in the correct location before beginning step 4. If they look good move on to step 4, if the layers do not appear in the correct locations, return to review step 2 (this page) to resolve that issue first.

*Having a backup of your data is always helpful. If you have made an error in step two that you cannot easily fix, you can close the project, delete the project folder (”Projections”), and extract a clean copy from “Projections.zip”. Just add the data to the map and pick back up at step 2 (top of this page).

Step 4 – Physically project the roads and places so the layers match for analysis

The final steps after we made the correct guesses and tested them well is to convert the native coordinates of the files into new layers. We see a good map now as ArcGIS projects to the map spatial reference system on the fly when it knows the correct spatial referencing system for each layer.  The spatial reference metadata are correct from step 2 (Defining the projection).  Our final job is to make new files with native coordinates that are in the desired system.  To do this use the “Projecttool from Geoprocessing to convert the coordinates.

•     Open Geoprocessing and find the Project tool by

searching for “Project” .  This tool is right next to the one you used above in the toolboxes.

•     Open the tool and select the roads layer as the input

•     Name the new file Roads_SPC.  By default it will go in the Projections.gdb Geodatabase (hover your cursor over the output dataset to verify)

•     Select the Current Map option as the spatial

reference for output (we set that a few steps back so that is easy).

•     It will add Roads_SPC to the map, you should remove the old one (Roads) to avoid confusion

•     Repeat for the Places

•     Name them places_SPC

•     Confirm that the new Places_SPC layer appears in the contents pane and remove the original Places layer

•     *If you have run the tool and either layer does not automatically appear in the contents pane, check the home geodatabase, find the SPC layer, and drag the new SPC layer to the map.

•     You do not need to do the County layer, as it was already correct.

Questions 11-22: Now that they are projected, what is the extent of each map layer under the new projections? Fill in the following table (questions 11-22) - integer portions are fine


Enter your answers into the homework assignment quiz on Canvas by the posted due date.


站长地图