var image = new BitmapImage(new Uri(filePath)); var newLayer = new ElementLayer(); var rect = new Rectangle(); rect.SetValue(ESRI.ArcGIS.Client.ElementLayer.EnvelopeProperty, convertedEnvelope); rect.Fill = new ImageBrush(image); newLayer.Children.Add(rect); _esriMap.Layers.Add(newLayer);
i have top left and bottom right , latitude and longitude . can i envelope and show it?
is there any tool in wpf sdk that i can use to convert normal image files to georeferenced ones?
Hi,..
If you have the coordinates of the corners, can you create world file? World files for raster datasets—Help | ArcGIS for Desktop
Cheers
i prefer not to create additional files , since i am a programmer not a gis expert.
is there already written formulas based on raster size and lat/long of corners?
Hi,
This is the basic formula:
It's just a text file based on the file extension of the image e.g. tfw, pgw, etc. Google will help there.
The contents of the file are 6 lines:
5.000000000000 (size of pixel in x direction)
0.000000000000 (rotation term for row)
0.000000000000 (rotation term for column)
-5.000000000000 (size of pixel in y direction)
492169.690845528910 (x coordinate of centre of upper left pixel in map units)
5426523.318065105000 (y coordinate of centre of upper left pixel in map units)
Cheers
Mike
thank you very much indeed, it worked!!