I have a small picture from world map. now i need latitude and longitude at all pixels og that small picture?
how to do that give c# code.
I have a small picture from world map. now i need latitude and longitude at all pixels og that small picture?
how to do that give c# code.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mithilesh TataPosted Mar 11, 2024, 9:32 AM
To accomplish this task in C#, you can use the System.Drawing namespace to load the image and iterate through each pixel to retrieve the latitude and longitude coordinates. You'll need a world map with known latitude and longitude coordinates corresponding to each pixel.
Here's a basic example of how you can achieve this:
Replace
"world_map.jpg"with the path to your world map image file. Make sure the world map image you use has known latitude and longitude coordinates corresponding to each pixel.This code will iterate through each pixel of the image, calculate the latitude and longitude coordinates based on the position of the pixel, and output them along with the color of the pixel.