Select to view content in your preferred language

UTM to Latitude and Longitude

2244
14
05-14-2011 10:06 AM
MichaelAquilina
Emerging Contributor
Hi everyone, id really appreciate some help understanding how to place the data in these shape files onto the ArcGIS control. The values are in utm but the ArcGIS control with Bing Imagery uses Web Mercator (i assume these are not the same?)

Also, is there some form of way of placing objects over the map without using a canvas?

Thanks in Advance!
0 Kudos
14 Replies
MichaelAquilina
Emerging Contributor
At this time, my best bet is still that you reversed the coordinates (Latitude/Longitude instead of Longitude/Latitude).
Did you check this point?

Can you share how look the input coordinates when you call 'GeographicToWebMercator'?


This is the code i am using to place the coordinates on the screen. The ShapeFile class was implemented by myself and basically loads the data into appropriate shapes. In this case we are dealing with PolyLines so i iterate through the coordinates in each polyline and transform them with the GeographicToWebMercator().

ShapeFile File = new ShapeFile();
            File.Read(ShapeFile);

            int count = 0;

            foreach (PolyLine Line in File.Data)
            {
                count++;
                Polyline Polyline = new Polyline();

                for (int i = 0; i < Line.NumParts; i++)
                {
                    int End = (i == Line.NumParts - 1) ? Line.NumPoints : Line.Parts[i + 1];
                    PointCollection Collection = new PointCollection();

                    for (int j = Line.Parts; j < End; j++)
                    {
                        MapPoint GeographicPoint = new MapPoint(Line.Points.X, Line.Points.Y);
                        Collection.Add(GeographicPoint.GeographicToWebMercator());
                    }
                    Polyline.Paths.Add(Collection);
                }
                AddToMap(Polyline);
            }


I do not think i am swapping the two coordinates because the data itself follows the same shape but is displaced and skewed. Its for this reason that i suspect it has to do with a map projection. I have included images as well to show what i am refering to:




Notice how it is not simply the case that the positions are offset by a constant X,Y amount, but rather the lines are simply distorted as if they have been affected by a map projection.

Could it be that the TIGER data i am using simply isnt good for use with Bing's Imagery?
0 Kudos
MichaelAquilina
Emerging Contributor
Anyone?

sorry for the large images by the way, but i cant seem to find the edit button on my post :S
0 Kudos
DominiqueBroux
Esri Frequent Contributor
At this time, my best bet is still that you reversed the coordinates (Latitude/Longitude instead of Longitude/Latitude).

Seeing the screenshot, I lost my bet for sure:o


but rather the lines are simply distorted as if they have been affected by a map projection.


At this scale, I don't think the map projection can explain the distorsion. Likely a data accuracy matter.


Notice how it is not simply the case that the positions are offset by a constant X,Y amount

Yeah. Accuracy of data or projection issue (not the same spheroid?) ? I will avoid to lose a second bet on that question:).
0 Kudos
LanceCrumbliss
Frequent Contributor
At this scale, I don't think the map projection can explain the distorsion. Likely a data accuracy matter.


yeah, i'm going to have to agree with dbroux; TIGER data is notoriously inaccurate at such scales.
0 Kudos
MichaelAquilina
Emerging Contributor
Thanks for all the replies, all very helpful! 🙂

would anyone of you happen to know of freely available shapefiles that contains US road data then?

I need the data to be accurate enough to use as a reference inevaluation (which means i definitely cannot use the data found in the TIGER shapefiles)
0 Kudos