My arcpy (python)

Summary for myself Updated from time to time ** I just need to know myself, so the terms may be wrong in some places **

!! View

#command
    #Argument option description

Module loading


import arcpy

operation

Read

#Loading shapefile properties
arcpy.Describe() #The return value is a describe object

Structural manipulation of class tables

#Add field
arcpy.AddField_management()
    #First argument: Table to add fields(Shapefile)
    #Second argument: Name of the field to add
    #Third argument: Data type of the field to be added

Creating a class

#Copy of shape file etc.
arcpy.Copy_management()
    #Files to be copied
    #Copy destination path

#Creating a feature class
arcpy.management.CreateFeatureclass()
    #First argument: Output path
    #Second argument: Output class name
    #geometrytype=type
    #spatial_reference=Spatial object to use

Writing etc.



#Field arithmetic
arcpy.CalculateField()
    #First argument: table to calculate
    #Second argument: Field to calculate
    #Third argument: arithmetic expression

#Create a feature class from table point data
arcpy.management.XYTableToPoin()
    #First argument: Table to read
    #Second argument: Path to create
    #Third argument: X
    #Third argument: y

#Add field to class
arcpy.AddField_management()
    #First argument: Addition destination class
    #Second argument: field name
    #Third argument: Type of field to add
    #field_length =Field width
    #field_alias =alias

#Convert field to date field

arcpy.ConvertTimeField_management()
    #First argument: Target class
    #Second argument: Target field
    #input_time_format=Date format. If you make a slight mistake, you will make a mistake in reading.
    #output_time_field=Output destination field. You can make a new one.


#Process point data into line data
arcpy.PointsToLine_management()
    #First argument: input class
    #Second argument: output class
    #linefield=Fields that connect as lines
    #sortfield=Field to sort

#Field arithmetic
arcpy.AddField_management()
    #First argument: File to perform operation
    #Second argument: Field to perform operation
    #Third argument: SQL formula

#Add geometry attributes
arcpy.AddFeometryAttributes()
    #First argument: Feature class to add attributes
    #Second argument: attribute or shape property
    Length_Unit = #Unit of length


Recommended Posts

My arcpy (python)
My Numpy (Python)
My sys (python)
My pyproj (python)
My str (python)
My PySide (Python)
My shutil (python)
My matplotlib (python)
My urllib (python)
My sklearn (python)
[My memo] python
My ConfigParser (Python)
My win32gui (Python)
My os (python)
My python environment memo
My Beautiful Soup (Python)
Python Tips (my memo)
My python data analysis container
Python
My python data analytics environment
[Python] My stock price forecast [HFT]
My favorite boto3 (Python) API sample
Python My Number verification module released
kafka python
Python basics ⑤
python + lottery 6
Built-in python
Python comprehension
Python technique
Studying python
Python 2.7 Countdown
Python memorandum
Python FlowFishMaster
Python service
python function ①
Python basics
Python memo
ufo-> python (3)
Python comprehension
install python
Python Singleton
Python basics ④
Python Memorandum 2
python memo
Python Jinja2
Python increment
python tips
Installing Python 3.4.3.
Try python
Python memo
Python iterative
Python algorithm
[Python] Variables
Python functions
Python sys.intern ()
Python decimals
python underscore
Python summary
Start python
[Python] Sort
Note: Python