CityOfPhiladelphia / arc-open

An ArcGIS Desktop toolbox for exporting feature classes to open data formats
BSD 3-Clause "New" or "Revised" License
43 stars 7 forks source link

Unable to convert WKID 3365 to 4326 #8

Open davewalk opened 10 years ago

davewalk commented 10 years ago

First experienced by GIS at the Water Dept.:

Did not have a temp_layer feature class to delete
Converting spatial reference to WGS84... 

Traceback (most recent call last):
  File "C:\Python27\ArcGIS10.1\lib\site-packages\arc_open\convert.py", line 242, in execute
    arcpy.Project_management(temp_shapefile, shapefile, "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]]", "WGS_1984_(ITRF00)_To_NAD_1983", "PROJCS['NAD_1983_StatePlane_Pennsylvania_South_FIPS_3702_Feet',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['False_Easting',1968500.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-77.75],PARAMETER['Standard_Parallel_1',39.93333333333333],PARAMETER['Standard_Parallel_2',40.96666666666667],PARAMETER['Latitude_Of_Origin',39.33333333333334],UNIT['Foot_US',0.3048006096012192]]")
  File "c:\program files\arcgis\desktop10.1\arcpy\arcpy\management.py", line 7822, in Project
    raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000365: Invalid geographic transformation.
Failed to execute (Project). 

Failed to execute (Convert).
Failed at Wed Mar 05 12:45:04 2014 (Elapsed Time: 3.00 seconds)

At the very least the tool should return a more informative error message if it is standard that ArcGIS cannot do this transformation.

talllguy commented 10 years ago

I believe I have the same issue as #8 with another projection. NAD_1983_HARN_StatePlane_Maryland_FIPS_1900_Feet

Code:

Executing: Convert CULTURAL.BaltcoHistoricDistricts "OBJECTID OBJECTID VISIBLE NONE;DISTRICT DISTRICT VISIBLE NONE;DATE_LISTE DATE_LISTE VISIBLE NONE;DATE_SHAPE DATE_SHAPE VISIBLE NONE;SHAPE SHAPE HIDDEN NONE;SHAPE.AREA SHAPE.AREA HIDDEN NONE;SHAPE.LEN SHAPE.LEN HIDDEN NONE" C:\Users\eplack\Documents\GitHub\Historic-Districts BaltimoreCountyHistoricDistricts true true true # true #
Start Time: Wed Mar 26 16:15:18 2014
Running script Convert...
Converting spatial reference to WGS84...

Traceback (most recent call last):
  File "C:\Python27\ArcGIS10.2\lib\site-packages\arc_open\convert.py", line 242, in execute
    arcpy.Project_management(temp_shapefile, shapefile, "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]]", "WGS_1984_(ITRF00)_To_NAD_1983", "PROJCS['NAD_1983_StatePlane_Pennsylvania_South_FIPS_3702_Feet',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['False_Easting',1968500.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-77.75],PARAMETER['Standard_Parallel_1',39.93333333333333],PARAMETER['Standard_Parallel_2',40.96666666666667],PARAMETER['Latitude_Of_Origin',39.33333333333334],UNIT['Foot_US',0.3048006096012192]]")
  File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\management.py", line 7833, in Project
    raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000365: Invalid geographic transformation.
Failed to execute (Project).

Failed to execute (Convert).
Failed at Wed Mar 26 16:15:21 2014 (Elapsed Time: 2.68 seconds)
talllguy commented 10 years ago

Update: I transformed the data by switching the data frame in ArcMap to EPSG 4326 and then exported layer as shapefile. Ran tool that shapefile (and unchecked convert to WGS84), and that worked. Here is the live commit.

davewalk commented 10 years ago

Sweet. If it isn't possible for the tool to do the conversion it should at least give a better error message so that the user knows what to resolve. I have to work on that.

Thanks for using and I hope it helped!