Arcgis Python Read Csv File and Create Point Features
Data that is spatial in nature is not always stored in a spatial data format. For example, street addresses and breadth-longitude coordinates identify geographic locations only are often stored in spreadsheets, databases, or text files. If you take geographic data stored every bit a tabular array, ArcGIS Pro can display information technology on a map and convert information technology to spatial data.
Overview
- Video length: 9:24.
- This video was created with ArcGIS Pro 2.8.
In this tutorial, you'll create spatial data from a table containing the breadth-longitude coordinates of huts in a New Zealand national park. Huts in New Zealand are equivalent to cabins in the United states of america—they may or may not have sleeping bunks, kitchen facilities, electricity, and running water. The table of hut locations is stored as a comma-separated values file (.csv). CSV is a common, nonproprietary file format for tabular information.
- Estimated time: 45 minutes
- Software requirements: ArcGIS Pro
Open the projection
Your written report area is Egmont National Park in the Taranaki region of New Zealand.
- First ArcGIS Pro and sign in if necessary.
-               On the start page, nether your contempo projects, click                Open another project.              If you already have a project open, click the Project tab on the ribbon. In the list of carte du jour items on the left, click Open. On the Open up page, click Portal and click Open up another project at the bottom of the page. 
-               On the                Open up Project                dialog box, under                Portal                 , click                ArcGIS Online , click                ArcGIS Online . .
- At the top of the dialog box, in the Search box, type Create points from a table tutorial and press the Enter key.
-               In the list of search results, click                Create points from a table                to select the project package.              If there is more one project package with this proper noun, look at the Owner column. Select the item with the owner name ArcGISProTutorials. If y'all don't go any results, see No search results are returned. 
-               Click                OK.              The projection opens to the Taranaki region on New Zealand's North Island. The boundary of Egmont National Park is drawn with an orange outline. Mount Taranaki is in the heart of the park. The active view is a second map named Egmont. There is also a 3D scene named Egmont 3D.   
-               On the ribbon, click the                View                tab. In the                Windows                group, click                Reset Panes                 and click                Reset Panes for Mapping (Default). and click                Reset Panes for Mapping (Default).This ensures that the Contents and Catalog panes are open and that other panes are closed. 
-               On the ribbon, click the                Map                tab. In the                Navigate                group, click                Bookmarks                 . Under                Egmont Bookmarks, click                Egmont National Park                to zoom in to the park. . Under                Egmont Bookmarks, click                Egmont National Park                to zoom in to the park.
Brand a feature grade from a .csv file
The .csv file is stored every bit an attachment in your project parcel. Y'all'll add information technology to the map as a table and catechumen it to a feature course with a geoprocessing tool.
-               On the                Map                tab, in the                Layer                group, click                Add Data                 . .
-               On the scan dialog box, in the list of quick links, under                Projection                 , click                Folders , click                Folders . .
-               In the window on the correct, browse to                Create_points_from_a_table_1                  >                  commondata                  >                  userdata.                The userdata folder contains a .csv file and a text file with metadata. 
-                               Click                Egmont_National_Park_Huts.csv                to select information technology and click                OK.              The .csv file is added to the Contents pane under Standalone Tables. In a project package, files that tin can't exist stored in a geodatabase, such as shapefiles, .csv files, and text files, are included as attachments. In the project package folder structure, attachments are stored in the commondata > userdata binder. 
-                               In the                Contents                pane, right-click                Egmont_National_Park_Huts.csv                and click                Open                 . .  The table'south attributes include the proper name and type of hut, the number of people it accommodates, and its latitude-longitude coordinates in decimal degrees. Latitude-longitude coordinates, or some other set of x,y coordinate organization values, are needed to create a feature class from a table. 
- Close the table.
-                               In the                Contents                pane, right-click                Egmont_National_Park_Huts.csv                and click                Display XY Information                 . .The Display XY Data window appears. The Input Table parameter is correctly ready to the .csv file. The Ten Field and Y Field parameters are also correctly set to LONGITUDE and Breadth, respectively. For convenience, some geoprocessing tools open up in a floating window. These tools can also be opened in the Geoprocessing pane. 
-               Change the                Output Characteristic Class                name to                ENP_Lodgings.              ENP stands for Egmont National Park. 
-               Exit  the                Z Field                parameter empty. The table doesn't contain elevation values for the huts.              The Coordinate Organization parameter is fix to GCS_WGS_1984. This coordinate arrangement is used past default considering it is a common one for breadth-longitude values. In fact, it is the correct coordinate system for this data. (Y'all tin can confirm this past opening the Egmont_National_Park_Huts_metadata.txt file.)   
-               Click                OK.                When the operation finishes, a new feature class is created in the project geodatabase. A layer named ENP_Lodgings, representing the hut locations, is added to the map. 
-                               In the                Catalog                pane, aggrandize                Databases                and expand                create_points_from_a_table.gdb                to meet the new feature class.                
Add together metadata
You can add together item description metadata to the feature class. An item description includes a championship, summary, description, and tags. Information technology may as well include credits and utilise limitations. Metadata provides important background information well-nigh your information. It is indexed by ArcGIS Pro to generate search results when y'all search for information.
-                               In the                Catalog                pane (not the                Contents                pane), right-click the                ENP_Lodgings                feature course and click                Edit Metadata                 . .A metadata view opens for the ENP_Lodgings feature class. In the Contents pane, the elements of the metadata fashion are displayed.   If you're using the default Item Description metadata mode, the only element listed in the Contents pane is Item Description. The metadata chemical element is currently invalid  because required information is missing. If you lot're using a different metadata style, you'll see other metadata elements likewise.                    Item Clarification                    is the only element you lot'll edit in this tutorial. because required information is missing. If you lot're using a different metadata style, you'll see other metadata elements likewise.                    Item Clarification                    is the only element you lot'll edit in this tutorial.
- In the metadata view, in the Title box, blazon Egmont National Park Lodgings.
-               In the                Tags                box, blazon (or copy and paste) the following keywords:                cabins, hotels, huts, Egmont National Park, Taranaki, New Zealand.              Brand sure the keywords are separated by commas. 
- In the Summary (Purpose) box, add the following text: Locations of huts, lodges, and hotels in Egmont National Park for planning hiking and ski trips.
-                               In the                Description (Abstruse)                box,  add the following text:                Features were created from a CSV file with latitude-longitude coordinates and projected to NZTM. The source coordinates were derived from measurements made by Peter Scott. Peter Scott'southward data was published on May 13, 2015, and is shared under a Creative Commons Attribution 3.0 New Zealand license. Peter Scott's dataset is more accurate than this dataset. For more data, see the online dataset Egmont National Park - Huts, accessible at https://koordinates.com. Additional features in this dataset were digitized on the Esri World Imagery basemap.                            In the Contents pane, the Item Description element is now marked valid  because the required data is present. because the required data is present.
- In the Credits box, add together the following text: Peter Scott (peter@zoneblue.org); koordinates.com.
-                               Under                Credits, click                New Utilize Limitation                 . In the                Employ Limitation                box,  add the following text:                Creative Commons Attribution 3.0 New Zealand. . In the                Employ Limitation                box,  add the following text:                Creative Commons Attribution 3.0 New Zealand.If spell-checking is enabled on the settings page (as it is by default), unrecognized words are marked with wavy underlines. Run into Proofing options for data on spell-checking. 
-                               On the ribbon, on the                Metadata                tab, in the                Manage Metadata                group, click                Salvage                 . .
- Close the ENP_Lodgings metadata view.
-               On the                Quick Access Toolbar, click                Save                 to salvage the project. to salvage the project.
Examine the layer
Y'all'll zoom in on a couple of features in the ENP_Lodgings layer to make sure they are actually located on buildings. Y'all'll also change the layer's name.
-                               On the Egmont map, zoom in close on any point feature.                
- Optionally, examine one or two other features.
-                               In the                Contents                pane, right-click the                ENP_Lodgings                layer and click                Properties                 . .
-                               On the                Layer Properties                dialog box, on the                General                tab, modify the layer name to                Lodgings. Click                OK.              The layer proper noun is updated in the Contents pane. 
-               On the ribbon, click the                Map                tab if necessary. In the                Navigate                grouping, click                Bookmarks                 . Under                Egmont Bookmarks, click                Egmont National Park. . Under                Egmont Bookmarks, click                Egmont National Park.
-                               On the                Quick Access Toolbar, click                Save                 . .
Symbolize the layer
You'll set a visibility range for the layer and then the huts don't brandish at small scales. You'll besides set scale-based sizing for the layer so the symbols get larger as you zoom in. Finally, you'll choose a symbol that shows up well on the imagery basemap.
- In the Contents pane, click the Lodgings layer to select it if necessary. On the ribbon, under Feature Layer, click the Appearance tab.
-                               In the                Visibility Range                group, click the drop-down arrow next to                Out Beyond                 and click                i:500,000. and click                i:500,000.Tip:If 1:500,000 is not in the drop-down listing, type the value directly into the input box or choose a different value. 
-                               In the                Contents                pane, click the symbol for the                Lodgings                layer.              The Symbology pane appears and displays options to format bespeak symbols. 
- At the tiptop of the pane, click the Gallery tab, if necessary. In the scrolling box of symbols, under ArcGIS second, click Square 1. (Choose the solid black symbol, not Square 1 xl%, which is partially transparent.)
-                               At the superlative of the pane, click the                Backdrop                tab. Confirm that the                Symbol                tab                 is selected under it. is selected under it.
-               Check the                Enable scale-based sizing                check box.              A slider appears under the Size property. Information technology has ii size stops (short vertical bars) that represent the minimum and maximum map scales for which symbol sizes can be fix. 
-                               Hover over the leftmost size stop.                The commencement stop is set at 1:500,000. This is the smallest calibration at which the layer is visible because of your visibility range setting. 
-                               Hover over the other size stop.              This stop is gear up at 1:1,000, the largest scale to which yous tin can assign a symbol size. You can zoom in closer than ane:1,000 on the map, simply the symbol size won't increment. The second stop is currently selected (blue). Above the slider, the size value for the selected stop is x pt. 
-                               Change                Size                to                12 pt.              This volition be the maximum size of your symbol. 
- Click the first size stop to select it. The size value for this stop is currently 10 pt.
-                               Change                Size                to                2 pt.              When the map scale is one:500,000, the Lodgings symbol will be 2 points in size. Equally you lot zoom in, the symbol size will gradually increase until it reaches a maximum size of 12 points. 
-               At the tiptop of the pane, under                Backdrop, click the                Layers                tab                 . .
-                               Under                Appearance, click the                Color                drib-down arrow. On the color palette, click                Anemone Violet.                
-                               Change                Outline colour                to                Gray 30%. Change                Outline width                to                1.5                pt and press the                Enter                key. Click                Apply.                At the current map calibration, the symbol outline may not be noticeable. In ArcGIS Pro, sparse lines are false with transparency when antialiasing is turned on (every bit it is by default). If you need to run across a thin line, such equally a symbol outline, at all scales, plow off antialiasing. 
-               On the ribbon, click the                Map                tab. In the                Navigate                group, click                Bookmarks                 . Under                Egmont Bookmarks, click                Taranaki Region. . Under                Egmont Bookmarks, click                Taranaki Region.The map zooms out to a regional scale and the symbols exercise not display on the map. 
-                               In the map scale box in the lower left corner of the map view, click the drib-downwards arrow and click                1:500,000.              The layer displays and the features appear at their minimum size. 
-                               Zoom in gradually and notice that the symbol size increases.                
- Go to the Egmont National Park bookmark.
-                               On the                Quick Admission Toolbar, click                Salvage                 . .
Add a feature interactively
The Lodgings layer has 13 features: 10 huts that belong to the Department of Conservation and 3 that belong to alpine clubs. In addition, there are 2 resort hotels within the park that aren't in the .csv file. In this section, you'll locate the first of these hotels, Dawson Falls Mountain Lodge, and add together a feature to the layer. When you add together the feature to the layer, you lot are really adding it to the ENP_Lodgings characteristic grade that is the layer's data source.
-                               On the ribbon, on the                Map                tab, in the                Inquiry                group, click                Locate                 . .The Locate pane appears. 
-                               In the                Locate                pane, click the                Options                drop-downwards pointer                 to come across your locate providers. Confirm that                ArcGIS Earth Geocoding Service                is included in the list and that it is enabled. to come across your locate providers. Confirm that                ArcGIS Earth Geocoding Service                is included in the list and that it is enabled.A locate provider finds map locations from text descriptions or spatial coordinates. Your locate providers should include XY provider and ArcGIS World Geocoding Service. 
-               Click                Options                 once more to collapse the list. once more to collapse the list.The website for Dawson Falls Mountain Lodge describes the order every bit being at the terminate of Manaia Road in Egmont National Park. Information technology doesn't provide a street address. 
-                               In the                Locate                pane, in the search box, type                Manaia Route. Exercise non press the                Enter                key.              Caution:You must type the address—not copy and paste it—to run into the list of suggestions described in the adjacent step. 
-                               In the driblet-down list of suggestions, under                ArcGIS World Geocoding Service, click                Manaia Rd, Egmont National Park, 4391, NZL.              The map zooms in and a marker is placed at the end of Manaia Route. The complex of buildings side by side to the road is Dawson Falls Mountain Social club.   
-               In the                Locate                pane, right-click the mark and click                Add To Feature Class                 . .
-               In the                Add To Characteristic Form                dialog box, aggrandize                Lodgings                and click the                Lodgings                feature template.                
- Click OK.
-               In the                Locate                pane, in the search box, click                Delete                 to clear the address. to clear the address.The temporary marker is removed from the map. The new feature in the Lodgings layer is selected. You'll add attribute values to the feature. 
-                               On the ribbon, click the                Edit                tab. In the                Selection                group, click                Attributes                 . .The Attributes pane appears and displays attributes for the selected feature. 
- In the lower half of the Attributes pane, on the Attributes tab, click next to NAME and type Dawson Falls Mountain Guild. Press Tab.
- For TYPE, type Hotel and press Tab.
-                               For                CAPACITY, type                24. Click                Utilize.              You can exit <Nothing> values in the LATITUDE and LONGITUDE fields. 
-                               On the                Edit                tab, in the                Selection                group, click                Articulate                 . .
Add together another feature
The 2nd hotel in the park is the Stratford Mountain House. It'southward located on Pembroke Road but not at a well-defined office of the route. You lot'll locate information technology by its latitude-longitude coordinates.
-                               In the                Locate                pane, in the search box, type (or copy and paste)                174.12248, -39.306201                and press the                Enter                key.              Results are found by both the ArcGIS World Geocoding Service and the XY provider.   The map zooms to the ArcGIS World Geocoding Service location highlighted in the pane and a mark is added. 
-                               In the                Locate                pane, right-click the highlighted candidate and click                Add To Feature Class                 . .
- In the Add To Feature Class dialog box, aggrandize the Lodgings heading and click the Lodgings feature template. Click OK.
-               In the                Locate                pane, in the search box, click                Delete                 to remove the temporary mark. to remove the temporary mark.You meet the new, selected feature representing Stratford Mountain House. 
- In the Attributes pane, click side by side to Name and type Stratford Mount House. Printing Tab.
- For TYPE, type Hotel and press Tab.
- For CAPACITY, type 22. Click Use.
-                               On the ribbon, on the                Edit                tab, in the                Selection                group, click                Clear                 . .  
-               In the                Manage Edits                group, click                Save                 . On the                Salvage Edits                prompt, click                Yes. . On the                Salvage Edits                prompt, click                Yes.
-               In the                Contents                pane, right-click the                Lodgings                layer and click                Attribute Table                 .  Scroll to the bottom of the table. .  Scroll to the bottom of the table.  The table should have xv records, including records for the two features yous just created. 
- Close the tabular array.
- On the ribbon, click the Map tab and go to the Egmont National Park bookmark.
-                               On the                Quick Access Toolbar, click                Save                 . .
View the layer in the 3D scene
You can display 2nd layers in 3D scenes. The scene's elevation surface correctly positions the 2nd features in a 3D landscape.
-                               In the                Contents                pane, right-click the                Lodgings                layer and click                Copy                 . .
- Click the view tab of the Egmont 3D local scene to brand the scene agile.
-                               In the                Contents                pane, right-click the scene name,                Egmont 3D, and click                Paste                 . .
-               On the                Map                tab, in the                Navigate                group, click                Explore                 . .
-               Utilize the mouse buttons and wheel push to zoom, pan, tilt, and rotate the scene. Alternatively, use the on-screen navigator                 in the scene. in the scene.The features display in their correct locations on the 3D surface, but the symbols lie flat—like bits of paper stuck to the mountain. 
-                               In the                Contents                pane, elevate the                Lodgings                layer from the                2nd Layers                category to the                3D Layers                category.              The layer now uses 3D drawing properties and the symbols stand on the surface. This upshot is called billboarding. It's an comeback, but a symbol designed for 3D viewing volition look better. 
- In the Contents pane, click the symbol for the Lodgings layer.
- In the Symbology pane, under Format Point Symbol, click the Gallery tab if necessary.
- In the search box, type cube and press the Enter primal.
- In the list of symbols, under ArcGIS 3D, click Continuing Cube.
-               At the top of the pane, click the                Properties                tab. Click the                Symbol                tab                 under it if necessary. under it if necessary.
-               Click the                Color                drop-down arrow and click a color. Change the                Size                setting to                5 pt                and click                Apply.              Scale-based sizing is not bachelor in scenes. For this scene, a five- or 6-point symbol size works well at nearly scales merely may be too small or besides large at some scales. 
-               Continue to explore the scene using navigation tools and Egmont 3D bookmarks.                
-                               On the                Quick Access Toolbar, click                Save                 . .
You can catechumen a tabular dataset, such as a Microsoft Excel file or a .csv file, to spatial data in ArcGIS Pro every bit long as the tabular array includes street addresses or spatial coordinates. This allows you to visualize and spatially analyze a wide diversity of information—from customer lists to tables scraped from websites—that is spatial in nature but not nevertheless spatially enabled.
Related topics
- ArcGIS Pro quick-start tutorials
- Add x,y coordinate data as a layer
- View and edit metadata
- Writer a multiscale map
- Create signal and multipoint features
- Common questions about maps in ArcGIS Pro
Feedback on this topic?
Source: https://pro.arcgis.com/en/pro-app/2.8/get-started/create-points-from-a-table.htm
0 Response to "Arcgis Python Read Csv File and Create Point Features"
Post a Comment