Select to view content in your preferred language

How to make a script taking Geographic Transformation as parameter?

1207
5
Jump to solution
03-26-2013 02:17 PM
SuiHuang
Frequent Contributor
Hi Everybody:

    I want to make a toolbox script (using a python script as source) that takes a Geographic Transformation as parameter (like the out-of-box Project tool under the toolbox "Projections and Transformations-->Feature").
    However, I couldn't find the data type when I create the new script in toolbox (see attached screenshot). Is there a way for me to make it accept a geographic transformation?
    Thank you!
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
MathewCoyle
Honored Contributor
Geographic Transformation isn't a data type, it is just a string referencing the parameter that is buried in the projection engine DLL or directly in the GTF. The parameter validation that fills out valid transformations (especially in 10.1 where it takes your region into account) is a little more complicated though, if that is what you are asking about. I'm not 100% sure how that one works.

View solution in original post

0 Kudos
5 Replies
MathewCoyle
Honored Contributor
Geographic Transformation isn't a data type, it is just a string referencing the parameter that is buried in the projection engine DLL or directly in the GTF. The parameter validation that fills out valid transformations (especially in 10.1 where it takes your region into account) is a little more complicated though, if that is what you are asking about. I'm not 100% sure how that one works.
0 Kudos
SuiHuang
Frequent Contributor
Forgot important information, I am using ArcGIS 10.0.
Thank you!
0 Kudos
SuiHuang
Frequent Contributor
Hi mzcoyle:

    Seems very complicated, do you know the name of the projection engine DLL and can you give me some start up information of GTF? Thank you!

Geographic Transformation isn't a data type, it is just a string referencing the parameter that is buried in the projection engine DLL or directly in the GTF. The parameter validation that fills out valid transformations (especially in 10.1 where it takes your region into account) is a little more complicated though, if that is what you are asking about. I'm not 100% sure how that one works.
0 Kudos
MathewCoyle
Honored Contributor
GTF is a geographic transformation file. It is used to create custom transformations. I'm not sure where Arc pulls the default transformations from in the projection tool. Is this something you want dynamic that can handle any projection or do you have a set number of projections you want this tool to handle? In the later case you can create a Filter value list that has these built in.
0 Kudos
SuiHuang
Frequent Contributor
Hi mzcoyle:

    Sorry for coming back this later. My purpose was to make a generic ArcGIS toolbox script that can handle any spatial references like the out-of-box tools, but the original task need to be accomplished is to do data conversion on some specific GCS, so I end up hard-coded a GCS string in Python to accomplish the task instead of building generic tool.
    Thank you for your information, such that I didn't do unnecessary work to complete a task.

GTF is a geographic transformation file. It is used to create custom transformations. I'm not sure where Arc pulls the default transformations from in the projection tool. Is this something you want dynamic that can handle any projection or do you have a set number of projections you want this tool to handle? In the later case you can create a Filter value list that has these built in.
0 Kudos