# -*- coding: utf-8 -*-
import subprocess
import sys
import arcpy

# 4326(wg84) --> cgs2000
import importlib, sys

importlib.reload(sys)
sys.setdefaultencoding('utf8')
arcpy.Project_management('D:/test/test.shp', 'D:/test/test4326.shp',
                         "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433],METADATA['World',-180.0,-90.0,180.0,90.0,0.0,0.0174532925199433,0.0,1262]]",
                         'CGCS2000_WGS84',
                         "PROJCS['CGCS2000_GK_CM_117E',GEOGCS['GCS_China_Geodetic_Coordinate_System_2000',DATUM['D_China_2000',SPHEROID['CGCS2000',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Gauss_Kruger'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',117.0],PARAMETER['Scale_Factor',1.0],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")

arcpy.BatchProject_management(Input_Feature_Class_or_Dataset="E:/99project/demo/4326.gdb/Mian",
                              Output_Workspace="E:/99project/demo/2000.gdb",
                              Output_Coordinate_System="GEOGCS['GCS_CGCS_2000',DATUM['D_CGCS_2000',SPHEROID['CGCS_2000',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]",
                              Template_dataset="", Transformation="")

# cgs2000 --> 4326(wg84)
# arcpy.BatchProject_management(Input_Feature_Class_or_Dataset="E:/99project/demo/2000.gdb/Mian", Output_Workspace="E:/99project/demo/4326.gdb", Output_Coordinate_System="GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]", Template_dataset="", Transformation="")
