Overview
This topic discusses the JSON representation of geodata transformation objects. The image service's Add and Update operations support a geodata
parameter. This parameter is an array of geodata
objects.
A geodataTransform object has the following JSON syntax:
Syntax
{
"geodataTransform": "<geodataTransformName>",
"geodataTransformArguments": {<geodataTransformArguments>}
}
The structure of the geodata
object varies based on the geodata
type. There are three types of geodata
objects, which are listed below:
- Polynomial transformation
- Projective transformation
- Identity transformation
Polynomial transformation
{
"geodataTransform": "Polynomial",
"geodataTransformArguments": {
"sourcePoints": [<sourcePoint1>, <sourcePoint2>, <sourcePoint3> ...], //array of points
"targetPoints": [<targetPoint1>, <targetPoint2>, <targetPoint3> ...], //array of points
"coeffx": [<coeffx11>, <coeffx12>], //array of doubles
"coeffy": [<coeffy11>, <coeffy12>], //array of doubles
"inverseCoeffx": [<inverseCoeffx11>, <inverseCoeffx12>], //array of doubles
"inverseCoeffy": [<inverseCoeffy11>, <inverseCoeffy12>], //array of doubles
"spatialReference": {<spatialReference1>},
"polynomialOrder": <polynomialOrder1> //integer: 1, 2, or 3. First order requires at least 3 pairs of control points; second order requires at least 6 pairs of control points; third order requires at least 10 pairs of control points; use more control points to get better fit (smaller RMS)
}
}
{
"geodataTransform": "Polynomial",
"geodataTransformArguments": {
"sourcePoints": [{"x":0.0, "y":0.0}, {"x":0.0, "y":200.0}, {"x":200.0, "y":0}],
"targetPoints": [{"x":100.0, "y":100.0}, {"x":100.0, "y":300.0}, {"x":300.0, "y":100.0}],
"polynomialOrder": 1,
"spatialReference": {"wkid" : 54004}
}
}
Projective transformation
{
"geodataTransform": "Projective",
"geodataTransformArguments": {
"sourcePoints": [<sourcePoint1>, <sourcePoint2>, <sourcePoint3> ...], //array of points
"targetPoints": [<targetPoint1>, <targetPoint2>, <targetPoint3> ...], //array of points
"coeffx": [<coeffx11>, <coeffx12>...], //array of doubles
"coeffy": [<coeffy11>, <coeffy12>...], //array of doubles
"inverseCoeffx": [<inverseCoeffx11>, <inverseCoeffx12>], //array of doubles
"inverseCoeffy": [<inverseCoeffy11>, <inverseCoeffy12>], //array of doubles
"spatialReference": {<spatialReference1>}
}
}
{
"geodataTransform": "Projective",
"geodataTransformArguments": {
"sourcePoints": [ {"x":551.18, "y":817.09}, {"x":653.84, "y":714.43}, {"x":819.49, "y":712.10}, {"x":895.71, "y":789.87} ],
"targetPoints": [ {"x":596.29, "y":878.53}, {"x":655.39, "y":815.54}, {"x":733.94, "y":806.21}, {"x":765.05, "y":850.54} ],
"spatialReference": {"wkid" : 54004}
}
}
Identity transformation
{
"geodataTransform": "Identity",
"geodataTransformArguments": {
"spatialReference": {<spatialReference1>}
}
}
{
"geodataTransform": "Identity",
"geodataTransformArguments": {
"spatialReference": {"wkid": 54004}
}
}