Select to view content in your preferred language

arcpy.management.Project() thinks feature class is in feature dataset, won't run correctly.

990
5
Jump to solution
10-04-2023 01:14 PM
AlfredBaldenweck
MVP Regular Contributor

Pro 2.9.5

Pretty much the label.

I'm trying to automate a process, using several tables and feature classes in memory (r'memory\exampleFC'). At the very end, I want to project one of these feature classes into a different coordinate system.  (Edit for clarity: the destination for the results of Project() is a file geodatabase, not another in-memory table)

I keep getting the error 001489: Cannot project a feature class that participates in more advanced capabilities (such as topo.... The weird thing is I can use this in-memory table in the Project tool with the GUI, and it worked fine. However, even if I straight-up copied the Python command from it, I keep getting this error.

As suggested by the help doc, I've used CopyFeatures() instead. This works, but it is slowwwwwwwwwww.  I'd like to use Project because I think it'll be faster and it's also more intuitive.

Why do I keep getting this error?

 

Edit: I realized an insert cursor, which I was already using the step before reprojecting, will reproject for me. But my question still stands.

0 Kudos
1 Solution

Accepted Solutions
BlakeTerhune
MVP Regular Contributor

The memory workspace is not supported as a location to write the output dataset.

Project (Data Management)—ArcGIS Pro | Documentation

I think the same applies to input as well.

View solution in original post

5 Replies
BlakeTerhune
MVP Regular Contributor

The memory workspace is not supported as a location to write the output dataset.

Project (Data Management)—ArcGIS Pro | Documentation

I think the same applies to input as well.

AlfredBaldenweck
MVP Regular Contributor

The memory workspace is the input, the output is a file gdb

0 Kudos
BlakeTerhune
MVP Regular Contributor

If you change your input to be from a geodatabase on disk rather than in memory workspace, does that work?

0 Kudos
AlfredBaldenweck
MVP Regular Contributor

...It does. Weird. 

Yet another thing today that isn't documented.

0 Kudos
DanPatterson
MVP Esteemed Contributor

Project (Data Management)—ArcGIS Pro | Documentation

  • The memory workspace is not supported as a location to write the output dataset.

maybe that accounts for what you are seeing?


... sort of retired...