Geographic Information Systems Asked by Staley on September 13, 2020
This is a general question about how a feature class is stored or can be stored using python/arcpy.
Can a list of created points (a feature class) be saved as a shapefile or in a shapefile, or to create a new feature class do you have to create a gdb and then add the feature class to it, then ultimately convert this to a shapefile using ArcPy?
Yes, a shapefile is considered a Feature Class, which lends it several attributes.
Esri provides this overview about the shapefile <updated link 200828 based on comment by @Rex below>Geoprocessing considerations for shapefile output :
A shapefile is an Esri vector data storage format for storing the location, shape, and attributes of geographic features. It is stored as a set of related files and contains one feature class. Shapefiles often contain large features with a lot of associated data and historically have been used in GIS desktop applications such as ArcGIS for Desktop and ArcGIS Explorer Desktop. If you have a small amount of data in a shapefile—generally fewer than 1,000 features—you can make it available for others to view through a web browser by adding it as a .zip file containing the .shp, .shx, .dbf, and .prj files to a map you create with the map viewer.
When you add a shapefile, the map viewer converts it to a format that web clients can quickly read and display. To help further improve the performance of the display, you can choose to generalize the features in your shapefile. Generalizing reduces the size of the shapefile by simplifying the features and is often appropriate for data at small scales.
To expand further, the Duke University Libraries provides additional insight to both the shapefile and feature classes, providing a good comparison.
Here is a snippet from the article:
Feature datasets store Feature Classes (which are the equivalent to shapefiles) with the same coordinate system. Like shapefiles, users can create points, lines, and polygons with feature classes; feature classes also have the ability to create annotation, and dimension features.
Correct answer by whyzar on September 13, 2020
I found a Spatial Times blog entitled Shapefile vs Feature Class by searching Google:
A Shapefile is a Feature Class. Although the intended question probably wasn’t answered here. But let’s go a little deeper into this before moving on, so what is a Feature Class then (from: http://wiki.gis.com/wiki/index.php/Feature_class)?
Feature classes are homogeneous collections of common features, each having the same spatial representation, such as points, lines, or polygons, and a common set of attribute columns, for example, a line feature class for representing road centerlines.
By this definition, a Shapefile is a Feature Class.
Answered by PolyGeo on September 13, 2020
To put it really simply, a shapefile is a feature class that is not stored within a geodatabase. So you can use a tool like Conversion > Feature Class To Feature Class
(or arcpy.FeatureClassToFeatureClass_conversion
) and convert a feature class or layer to a shapefile.
Modifying the sample script from Feature Class to Feature Class Desktop Help slightly, here is an example of converting a feature class to a shapefile. This takes a feature class called buildings_point
from a geodatabase C:dataGreenvalleyDB.mdbPublicBuildings
and outputs them to a shapefile postoffices.shp
in the folder C:output
# Name: FeatureClassToFeatureClass_Example2.py
# Description: Use FeatureClassToFeatureClass with an expression to create a subset
# of the original feature class.
# Import system modules
import arcpy
# Set environment settings
arcpy.env.workspace = "C:/data/GreenvalleyDB.mdb/PublicBuildings"
# Set local variables
inFeatures = "buildings_point"
outLocation = "C:/output"
outFeatureClass = "postoffices.shp"
expression = ""
# Execute FeatureClassToFeatureClass
arcpy.FeatureClassToFeatureClass_conversion(inFeatures, outLocation, outFeatureClass, expression)
Answered by Midavalo on September 13, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP