# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# Simplify Polygon simple.py
# Created on: 2023-08-14 09:20:53.00000
#   (generated by ArcGIS/ModelBuilder)
# Description: 
# ---------------------------------------------------------------------------

# Import arcpy module
import arcpy

# Local variables:
inFeature = "C:\\Fast Deal\\gadm_2023.gdb\\adm2"
outFeature = "C:\\Fast Deal\\gadm_simplify_all.gdb\\adm2_class1"

# Simplification Algorithm choice
"""
1) POINT_REMOVE 
2) BEND_SIMPLIFY
"""

# Simplification Toblerance
#  Maximum Allowable Offset unit:
"""
1) Centimeters
2) Decimal degrees
3) Decimeters
4) Feet
5) Inches
6) Kilometers
7) Meters
8) Miles
9) Millimeters
10) Nautical Miles
11) Points
12) Unknow
13) Yards
"""
# Minimum Area (optional) unit:
"""
1) Acres
2) Ares
3) Hectares
4) Square Centimeters
5) Square Decimeters
6) Square Feet
7) Square Inches
8) Square Kilometers
9) Square Meters
10) Square Miles
11) Square Millimeters
12) Square Yards
13) Unknow
"""

# Simplification Toblerance unit set
maxAllow = "20000 Meters"
minArea = "1000000000 SquareMeters"

# Process: Simplify Polygon
arcpy.SimplifyPolygon_cartography(inFeature, outFeature, "BEND_SIMPLIFY", maxAllow, minArea, "NO_CHECK", "NO_KEEP")

print ("Finish!")
