Change feature dataset's XY Tolerance/Resolution settings in Modelbuilder

1482
2
02-07-2020 09:32 AM
JeremySmith1
New Contributor II

I'm trying to use ArcGIS Modelbuilder to streamline the construction of a new, empty file geodatabase.  In the model I first use the Create File GDB GP tool, then I import the data model xml (schema only) in that new File GDB.  This new File GDB now contains a feature dataset- but I want the user to be able to specify the coordinate system and change the xy tolerance & resolution.  So I apply an Iterate Datasets iterator to locate the feature dataset in the new File GDB, and I then use the Define Projection GP tool to specify the coordinate system I want that feature dataset to be in.  However, the XY tolerance and XY resolution setting need to be changed for this new feature dataset.  I've tried adding Linear Unit variables to the Define Projection and Import XML Workspace Document processes but with no luck.  Here is my model:

Any help would be greatly appreciated. Thank You!

0 Kudos
2 Replies
curtvprice
MVP Esteemed Contributor

If Define Projection works on a Feature Dataset I would be surprised. If it did, I wouldn't recommend it because if you change the units, the baked in resolution and xy domain is probably no longer a good fit for the new coordinate system. 

The only way around this I can think of is to not use the import XML but instead create the feature datasets using the Create Feature Dataset tool, which allows you to specify resolution in the environment settings.

Instead of importing a workspace document, I would just run all the tools to generate the schema, relationships, and topology you want, in the coordinate system and resolution you want.

JeremySmith1
New Contributor II

Thank you for your recommendations, Curtis-- much appreciated.  You were right- the Define Projection route was not the way to go-- the model just wasn't changing the resolution and tolerance settings as required.  Having a user-supplied XML is important to us though because we do update our schema periodically and I don't have the time to create that robust of a model.

However, I have found that the Project tool gives me what I'm looking for.  Of course the Project tool requires a new output feature dataset, but I've incorporated a temporary FGDB in the process so I don't run into the issue of having "_1" appended to the end of the new feature class names by being in the same FGDB as the imported feature dataset from the XML.  Here's my model now: