0

I have 2 datasets of the same object but both obtained in different coordinate systems. One is in the coordinates obtained from an image [pixel data] so the coordinates are relative to the image. The other system is the WGS84 system.

I need to convert the points in the image pixel system by mapping them to their corresponding relative points in the WGS84 system using python.

The information I have is as follows:

The image data is in this format:

    pixIndex       X       Y    R    G    B
           1       0       0  227  227  227
           2       1       0  237  237  237
           3       2       0   0     0    0
           4       3       0  232  232  232
           5       4       0  233  233  233
...        ...     ...     ...  ...  ...  ...

The original data:

Original data XY WGS84

How should I go about with calculating the mapping the points in the pixel dataset to it's equivalent in the WGS84 format? I am assuming a simple addition would do? How would the code look like? This is how I am loading my file

import pandas as pd
df = pd.read_csv("imagedata.txt", header=None, names =["pixIndex","X","Y","R","G","B"] )
print(df)

I was looking at this but not sure how to use it for my case: Convert X,Y pixel to Longitude and Latitude

From loading the 2 datasets in cloud compare, I know that the bounding box dim for the original dataset is
bounding box cooords

And for the image dataset the box dimensions are as follows:
image dataset bounding box
which would give us the max and min of the coord system for each dataset, I suppose after looking at the linked article~

Need help with generating the code in python to do this mapping.

Appreciate the help! thank you!!

Megan Darcy
  • 468
  • 1
  • 13

0 Answers0