Friday 10 May 2019

Create your own Shapefile in Arcgis

Create your own Shapefile in Arcgis
If you wish to map certain points of interest, routes, or polygons but cannot find a shapefile, you can create your own.  This tutorial explains the steps involved in creating and editing a shapefile.

Step 1:  Creating your Shapefile
Open ArcCatalog
Navigate to your project folder
From the menu, click File>New>Shapefile
Give your shapefile a name and select a geometry based on what type of features you are trying to draw
Use the Edit button to select the coordinate system that you are using in your ArcMap project
To have a full details on self training visit www.heroizutech.com.ng and request a copy of A-Z of Arcgis 

Step 2: Editing your Shapefile
Add your shapefile to your ArcMap project
Open the Attribute Table of your shapefile
 Using the Attribute Table Options button, use the Add Field button to add fields you want to keep track of.  For example, if plotting metro stations, you may want to add a field for the name or number of the stop.
Optional: Set the symbology of your fields now.  This will save time later when creating features.
Turn on the Editor toolbar by going to Customize>Toolbars>Editor
Click on the Editor button and push Start Editing
Make sure your shapefile is selected in the Create Features window on the right
The bottom of this window shows the different construction methods available for your shapefile.  Click on one to start drawing.  You’ll notice that your cursor turns into a cross.
Click on your map to place a vertex.  You can place multiple vertexes to trace a route on your map.
https://civli-engineering.blogspot.com/2019/06/create-drawing-template-in-autocad.html

When finished drawing, right click and select Finish Sketch, alternatively you can push F2
To edit the attribute table for the feature you just created push the Attributes icon on the Editor toolbar.
All the editable fields for the feature you just created will appear.  This way you can label your features as you create them
When you’re done creating features click on the Editor button on the Editor toolbar and select Save Edits, and then Stop Editing
The symbology of the shapefile you just created can be manipulated like any other shapefile

Tips
 The snapping tool allows you to create features more accurately.  It will cause your cursor to snap to vertices, edges, and other features that you have created.  This will allow you to accurately place points on routes that you’ve created, or create polygons that do not overlap or have gaps between them.  To turn it on go to Customize>Toolbars>Snapping and turn the tool on in the toolbar that appears.
You can only edit the values in the Attribute Table of your shapefile while in Editing is turned on.
However, you cannot create new fields in the Attribute Table while Editing is turned on.  Create fields before starting an editing session.
If you set your symbology for your shapefile before you start the Edit session ArcMap will automatically create templates for your construction tool.

How to Converting a .jpg map into a shapefile In Arcgis

Converting a .jpg map into a shapefile

First 

There is no direct route to convert an image into a shapefile format. Your jpg map has no spatial reference. You can load it into arcmap but it won't know where to put it. In order to tell arcmap where it belongs in space you have to provide geographic reference points, hence the term 'georeferencing'.

In ArcGIS this is done via the Georeferencing Toolbar, which is turned off by default. To turn it on you just right-click on a toolbar, look for Georeferencing and turn it on. Then you will use the 'Add control points' tool (first button after right of the combo box) to tell arcgis what points on the image correspond to points on a second data source that already has a spatial reference.

Here are the steps I recommend following:

  1. Open a new arcmap document.
  2. Load an existing, vector shapefile of the counties you are interested in
  3. Load the jpg of the map you want to georeference
  4. In the Table of Contents, right click on the map and select 'Zoom to Layer'
  5. Click on the 'Add Control Points' button on the georeferencing toolbar
  6. Find a point on the map that you can match to the shapefile you loaded in step 2 and click on it. I recommend finding places that are easy to identify such as intersections of major roads, sharp corners in boundaries, etc
  7. Then click on the 'Previous Extent' arrow on the toolbar to zoom back to your shapefile and move the map so that you can see the point you picked in the previous step in the shapefile.
  8. Click on the corresponding point in the shapefile. You should see your map appear in the vicinity of where you clicked. It may be very small, or it might be huge, don't worry, you'll fix that with the next step.
  9. Now you are going to repeat the last two steps using a second point on the jpg map, preferably one that is relatively far from the first one, but just go with what you can for now.
  10. Repeat the process a few times and try to get the jpg as closely matched to the shapefile as possible. You'll never get it 100 percent accurate, but you can get pretty close if you try. If something goes crazy and the map gets really distorted you can either start over entirely or delete the last control point you added using the 'View Link table' button on the georeferencing toolbar.

Then it's just a matter of either editing your existing shapefile or creating a new one using the jpg map as a background. You'll probably have to assign some attribute data such as "Damaged" or "County Name" to the polygons you draw but that is a whole other issue.

I'm sure it sounds complicated if you've never done it before but it's really pretty easy once you get your head around the concept. Just remember that there are three fundamental steps here 1) Georeference the jpg so your GIS knows where it is in space, 2) Create a new dataset from the jpg in vector format, 3) Use the attribute table from your new dataset to conduct your analysis.

Here are some links that may be helpful: Get A - Z of Arcgis text book from HeroizuTech Services Ltd

http://www.heroizutech.com.ng 

For the second phase you will have to create a new shapefile. You will use the editing tools inside arcmap to digitize the affected areas as new polygons.

1) Create a new shapefile. Open up arcCatalog and navigate to the folder you are working in. Right click and select New --> Shapefile...

2) Give your shapefile a name and under feature type select 'Polygon'

3) Click the Edit... button in the lower right and select the coordinate system you want to work with, this should probably be the same as the one used by the county base file you used to georef the map jpg.

4) Open your arcmap document with the georeferenced jpg map and add your new shapefile to the document.

5) Right click on your new shapefile in the Table of Contents, got to 'Edit Features' and select 'Start Editing'.

6) Now you can use the 'Create Features' window to digitize the affected areas on your jpg map. Make sure to save your edits often using the Editing Toolbar.

7) Once you have drawn/digitized over all the affected areas save your edits and click on the 'stop editing' button.

8) Right click on your shapefile in the table of contents and select 'Open Attribute Table'. In the window that pops up, click on the drop-down button in the upper left and select "Add Field"

9) Name your field 'Area' and select 'Double' under type.

10) You should see your new field show up as a column on the right of your attribute table, right click on its heading and select 'Calculate Geometry', choose area and the units you want, this will tell you the area of each of the polygons you digitized.

That should give you everything you need to show the affected areas on a map and calculated the total area. Again, if you need further details or more instructions these steps have been heavily documented all over the web and a search for 'arcgis create shapefile' or something similar will give you lots of results with pictures/video that will be more descriptive than my summary.


Regarding your last comment: You should now have three items in your table of contents. One should be the jpg map you georeferenced, a second should be the county map you used to georeference the jpg map, and the third should be the polygons of affected areas you just digitized.

To make a map that you can export and use as an image or figure somewhere else (ie a report or webpage) you will need to switch ArcMap over to 'Layout' view. (Go to the 'View' menu and choose 'Layout View') This is where you can add items like a legend, north arrow, and scale (via the Insert menu). Once you have things looking the way you would like them go to File, Export Map..., and choose the location, format, and resolution for the file you want to export. Then you will have an image file of the map you just laid out that you can use elsewhere.

I realize those instructions are pretty bare bones - if you need more help than that then that should really be a separate question, or the focus on how to get my book A-Z of Arcgis