Vector Transformation.

1661
5
01-28-2013 09:58 PM
Santosh_Pavan_KumarNukala
New Contributor III
Hi/Hola/Namaskaaram,

I have a Geo Tiff file and a DGN for the same region. I have applied two point CAD Transformation for the Bottom left and Top right coordinates of DGN file and imported DGN into a Geodatabase feature dataset.  When I Overlay the imported feature dataset on the Geo Tiff Image.. there is a slight tilt at Top left and Bottom right coordinates, not exactly matching the Top left and Bottom right coordinates of Geo TIFF file. Other two coordinates are exactly matching.

Please find the attached image files in Full Extent and Zoomed@TopLeft. Kindly let me know if any Transformation needs to be applied. If yes .. Which Interfaces and Classes ?? I Only have a Developer Kit License and Donot have a Desktop license, so please do not mention any Desktop related tools.

Thanks in Advance,
Santosh
0 Kudos
5 Replies
Santosh_Pavan_KumarNukala
New Contributor III
Please somebody reply..
0 Kudos
by Anonymous User
Not applicable
Original User: rfairhur24

Hi/Hola/Namaskaaram,

I have a Geo Tiff file and a DGN for the same region. I have applied two point CAD Transformation for the Bottom left and Top right coordinates of DGN file and imported DGN into a Geodatabase feature dataset.  When I Overlay the imported feature dataset on the Geo Tiff Image.. there is a slight tilt at Top left and Bottom right coordinates, not exactly matching the Top left and Bottom right coordinates of Geo TIFF file. Other two coordinates are exactly matching.

Please find the attached image files in Full Extent and Zoomed@TopLeft. Kindly let me know if any Transformation needs to be applied. If yes .. Which Interfaces and Classes ?? I Only have a Developer Kit License and Donot have a Desktop license, so please do not mention any Desktop related tools.

Thanks in Advance,
Santosh


I am not sure what kinds of things you can do with just a Developer Kit License and have not really looked at the under the hood ArcObjects interfaces used to do georeferencing transformations.  However, you clearly did your 2 point transformation using diagonal coordinates, which you should never do.  Using diagonal coordinates will always distort your image(s) with an uncontrollable skew.

Always use two coordinates that essentially align in the horizontal plane or vertical plane of the map as the first order transformation to minimize skewing distortions of the image.  Staying on one plane does not prevent the image from rotating, if needed, but it will avoid adding a diagonal skew to the image.  Taking that approach may not result in a great alignment of the uncontrolled image sides without secondary transformations, but it will at least position the original images on your map with the minimum amount of skewing distortion.  Avoiding the skew will also help you evaluate what level of distortion is actually due to differences in source projections as opposed to wasting time trying to undo an arbitrary level of skew your choice of georeferencing coordinates introduced.

Try that and then let us know if you need help doing a secondary transformation.
0 Kudos
Santosh_Pavan_KumarNukala
New Contributor III
I am not sure what kinds of things you can do with just a Developer Kit License and have not really looked at the under the hood ArcObjects interfaces used to do georeferencing transformations.  However, you clearly did your 2 point transformation using diagonal coordinates, which you should never do.  Using diagonal coordinates will always distort your image(s) with an uncontrollable skew.

Always use two coordinates that essentially align in the horizontal plane or vertical plane of the map as the first order transformation to minimize skewing distortions of the image.  Staying on one plane does not prevent the image from rotating, if needed, but it will avoid adding a diagonal skew to the image.  Taking that approach may not result in a great alignment of the uncontrolled image sides without secondary transformations, but it will at least position the original images on your map with the minimum amount of skewing distortion.  Avoiding the skew will also help you evaluate what level of distortion is actually due to differences in source projections as opposed to wasting time trying to undo an arbitrary level of skew your choice of georeferencing coordinates introduced.

Try that and then let us know if you need help doing a secondary transformation.



First of all Thanks a Lot for replying.. I have done what you said. I have applied two point transformation across the horizontal planes by taking Top Left, Top Right coordinates and Bottom Left and Bottom Right coordinates. I have also applied 2 point transformation across vertical planes Top Right, Bottom Right coordinates and Top Left and Bottom Left coordinates .. total of 4 scenarios. In every scenario the coordinates that are not considered for 2 point transformation are getting distorted and going out of bounds.

Please View the Attachments. Waiting for your early reply.
0 Kudos
by Anonymous User
Not applicable
Original User: rfairhur24

First of all Thanks a Lot for replying.. I have done what you said. I have applied two point transformation across the horizontal planes by taking Top Left, Top Right coordinates and Bottom Left and Bottom Right coordinates. I have also applied 2 point transformation across vertical planes Top Right, Bottom Right coordinates and Top Left and Bottom Left coordinates .. total of 4 scenarios. In every scenario the coordinates that are not considered for 2 point transformation are getting distorted and going out of bounds.

Please View the Attachments. Waiting for your early reply.


Well, I at the very least the remaining transformation with any of these four overlays would now just be in the plane that you did not do the transformation in.  The distortion does seem to be proportional in the opposing plane and no offset appears to be needed in the plane that you set with the transformation.  This is the situation you want.  A proportional mathematical relationship would have been very difficult to work out with your original diagonal transformation.  But for these new transformations a formula can be determined that is limited to the plane that is not set.  The formula to determine these distortions is basically: position as a % of total geo-TIFF width (or height) * measured distortion at furthest offset edge from set point.  I.e, if at the furthest side from the set points the distance of distortion was say 500 feet, than the mid-point the distortion would be half of that distance or 250 feet.

I have only just recently been dealing with line work that relies on georeferenced positioning to align to an existing mapped area (as opposed to just georefencing images and not linework), and so far I have only learned how to do the first order transformation in the single plane, like you have now done.  It resists doing the second order transformation on lines that works on an image.  As a result, so far I not been able to do the second transformation once the data has been set as CAD linework, but the distortions I see in my own work are comparable to what you are now seeing. 

I probably could create a script that used the formula I describe to reposition each vertex in each line in the distorted plane now, but I have to believe this type of secondary transformation can be done with the tools ESRI provides.  It looks like the kind of transformation that may require Survey Analyst or a Parcel Fabric to apply the correction, neither of which I know anything about.  However, if I find out about any Geoprocessing tools that would do the second order transformation in Desktop, then you could possibly you could use the ArcObjects Geoprocessor to access those tools.  However, if you can't do any kind of geoprocessing with your license, then the Transform2D ArcObject interface could do the transformation work vertex by vertex.
0 Kudos
Santosh_Pavan_KumarNukala
New Contributor III
Well, I at the very least the remaining transformation with any of these four overlays would now just be in the plane that you did not do the transformation in.  The distortion does seem to be proportional in the opposing plane and no offset appears to be needed in the plane that you set with the transformation.  This is the situation you want.  A proportional mathematical relationship would have been very difficult to work out with your original diagonal transformation.  But for these new transformations a formula can be determined that is limited to the plane that is not set.  The formula to determine these distortions is basically: position as a % of total geo-TIFF width (or height) * measured distortion at furthest offset edge from set point.  I.e, if at the furthest side from the set points the distance of distortion was say 500 feet, than the mid-point the distortion would be half of that distance or 250 feet.

I have only just recently been dealing with line work that relies on georeferenced positioning to align to an existing mapped area (as opposed to just georefencing images and not linework), and so far I have only learned how to do the first order transformation in the single plane, like you have now done.  It resists doing the second order transformation on lines that works on an image.  As a result, so far I not been able to do the second transformation once the data has been set as CAD linework, but the distortions I see in my own work are comparable to what you are now seeing. 

I probably could create a script that used the formula I describe to reposition each vertex in each line in the distorted plane now, but I have to believe this type of secondary transformation can be done with the tools ESRI provides.  It looks like the kind of transformation that may require Survey Analyst or a Parcel Fabric to apply the correction, neither of which I know anything about.  However, if I find out about any Geoprocessing tools that would do the second order transformation in Desktop, then you could possibly you could use the ArcObjects Geoprocessor to access those tools.  However, if you can't do any kind of geoprocessing with your license, then the Transform2D ArcObject interface could do the transformation work vertex by vertex.







First of all Thanks a Lot for replying. I have somehow found a way to overlay my vector DGN file onto my raster
image. Here is how i have done.

- I have programatically created a WLD file and assigned the from and To coordinates to the DGN file.
- After applying two point transformation, the DGN file did not overlay exactly on my geo-tiff raster image. I Then Imported DGN to a feature dataset in Geodatabase. Using CadToGeodatabase class.
- I have decided to apply a spatial reference to the feature dataset using a prj file.
- I managed to know values of GCS datum, spheroid, Prime meridian, Polyconic Projection for maps of my country.
- Assuming these values remain constant for all the maps that i use. The only values I had to manipulate in the prj
file that differ from map to map are - Central Meridian and Latitude of Origin. assuming Polyconic proj.
- I programatically changed these two parameters in prj files and saved it with map name ( abc.dgn --> abc.prj )
- Later I used the below script in python to Define Projection for imported the feature dataset.

*****************************
import arcpy
import os

arcpy.env.workspace = "D:/"
arcpy.env.overwriteOutput = True
spatialRef = arcpy.SpatialReference("D:/abc.prj")
arcpy.DefineProjection_management(imported_dataset, spatialRef)
******************************

After applying spatial reference to the Imported feature dataset, the feature dataset exactly overlaps on  my geo-tiff image.
I am not sure if this is the actual solution but I was somehow able to see what i wanted. I considered applying transformation after importing to geodatabase. There are SpatialAdjustment Tools which do the transformation like Piecewise, Edgematching, Affine etc.. but all these classes were found in ESRi.ArcGIS.EditorExt namespace which can be used in Desktop applications and ArcMap Edit sessions. Since I was working on stand alone application with Developer license only, I could not use these Spatial Adjustment classes and if there was a way.. I did not know how to use them.

Now my next goal is to use symbology for various 63 geographic layers imported from DGN map. There is a Level Code assigned to each of the 63 layers. I need to segregate each layer based on LEVEL_CODE and assign line styles and Symbology to each layer. Please Help ..


Thanks/ Gracias
Santosh
0 Kudos