0

Not much info out there these days on coverages in PYTHON.

I need to convert a feature class to a coverage but cannot find out how to do it in python.

All I have found is "http://resources.esri.com/help/9.3/ArcGISDesktop/com/Gp_ToolRef/conversion_tools/feature_class_to_coverage_conversion_.htm" but this doesn't get me far.

I have all required licenses.

I have not scripted out the example yet as its formatting doesn't make sense to me.


With help from below, I was able create a coverage. That coverage still needs to have Labels created and the arcpy.CreateLabels_arc is not recognized by arcpy. Not much help out there regarding this either.

I do have ArcINFO installed. I am wondering if I have to create an arcinfo workspace as referenced in http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//0017000000ps000000 .

If this is the case how do I then implement this for my labels?

arcpy.FeatureclassToCoverage_conversion(env.workspace + '\\' + r + ' POLYGON', TEMP + str(FMUNAME) + '_Cov' , "", "DOUBLE")
PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Jan 15, 2015 at 0:30
4
  • 1
    I think the first hurdles will be whether you have an ArcInfo level license and ArcInfo Workstation installed. If you do, then can you edit your question to include precisely what happens when you try to run that tool. Commented Jan 15, 2015 at 0:37
  • Do you have an Advanced license? There's the Feature Class To Coverage tool. I don't think it needs ArcInfo workstation installed. Commented Jan 15, 2015 at 0:39
  • I'll defer to @mkennedy on whether you need ArcInfo Workstation installed. Commented Jan 15, 2015 at 1:11
  • I was just able to run it on a standard polygon shapefile in 10.3 without workstation installed. However, the "label" layer for two different conversions give an error message when trying to draw them in ArcMap. Commented Jan 15, 2015 at 16:52

2 Answers 2

1

The Feature Class to coverage tool is maintained in ArcGis 10.1.

You may need to create an ArcInfo workspace first and then put the coverage there. From memory the tool will break the features down to the requirements of a coverage:

  • 500 vertex limit on lines
  • no overlapping polygons
  • lines cannot intersect

After conversion it may be necessary to Build the coverage to enforce topology and create elements that don't exist (like build for node).

All of these tools require an Advanced (ArcInfo) license level.

If you have ArcInfo workstation installed you can use SHAPEARC to import a shapefile. More advanced data storage (personal/file geodatabase) cannot be accessed/manipulated in workstation but shapefiles and CAD can be imported... If you're not familiar with workstation then I would avoid using (or even installing) it as you're likely to get yourself frustrated very quickly. There are still many on GIS.SE that remember workstation and AML should you have any specific problems.

answered Jan 15, 2015 at 0:38
8
  • Working inside of arcgis I have no trouble with feature class to coverage. I am trying to implement it inside of python code. Commented Jan 15, 2015 at 0:42
  • 1
    If it can be done in model builder then export to python or alternately as PolyGeo showed recently you can export to python script from the results window in catalog. This will give you a template that you can manipulate/modify for scripting. Commented Jan 15, 2015 at 0:47
  • it is late in the day and i forgot to even try exporting my model; I went directly to google and that turned up nothing. Commented Jan 15, 2015 at 0:51
  • 1
    It's hard to find anything about coverages any more. They're not completely depreciated though - the rigid topology has its uses! Commented Jan 15, 2015 at 0:54
  • 1
    @DavidCampbell if "Working inside of arcgis I have no trouble with feature class to coverage" then simply see the python examples in the help that Michael Miles-Stimson linked to in his answer. Commented Jan 15, 2015 at 3:43
0

In order to use the _arc tools, I had to get at the toolbox and alter the alias:

import arcinfo, arcpy, os, sys
from arcpy import env
arcpy.SetProduct("ArcInfo")
tbx = arcpy.ImportToolbox(r"C:\Program Files (x86)\ArcGIS\Desktop10.1\ArcToolbox\Toolboxes\Coverage Tools.tbx", "newalias")
print arcpy.Usage("union_newalias")
if tbx is None:
 print "Toolbox is null"
else:
 tools = arcpy.ListTools("*_arc")
 print "Number of tools found: " + str(len(tools))
 for tool in tools:
 print tool
 #print arcpy.Usage(tool)
env.workspace = "G:\\Projects\\P747\3円_Landbase\\LB1\\temp\\test2\\"
TEMP = "\\\\silver\\clients\\Projects\\P747\3円_Landbase\\LB1\\TEMP\\"
print 'Loaded Data....'
if arcpy.Exists(TEMP + "airworkspace3"):
 arcpy.Delete_management(TEMP + "airworkspace3")
arcpy.CreateArcInfoWorkspace_management(TEMP, "airworkspace3")
r = 1
for fc in arcpy.ListFeatureClasses():
 print 'Working on ' + fc
 OutName3 = TEMP + "TSA_EX2_" + OutName + ".shp"
 CovName = TEMP + "airworkspace3\\" + "Layer"
 CovName3 = TEMP + "airworkspace3\\" + "Success"
 if arcpy.Exists(CovName + str(r)):
 arcpy.Delete_management(CovName + str(r))
 arcpy.FeatureclassToCoverage_conversion(fc + " POLYGON", CovName + str(r), "", "DOUBLE")
 r += 1
print 'Working on Union' 
arcpy.Union_newalias(CovName + "1", CovName+ "2", CovName3)
answered Jan 30, 2015 at 18:05

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.