1. Reproject data#

Many of the functions in airbornegeo require coordiantes in meters. We can use the function reproject to convert from geogrpahic coordinates (lat/lon) to projected coordinates, or between two different projected coordinates reference systems.

[3]:
%load_ext autoreload
%autoreload 2

import pandas as pd
import plotly.io as pio

import airbornegeo

pio.renderers.default = "notebook"
The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload
[5]:
data_df = pd.read_csv("data/AGAP_magnetic_survey.csv")
data_df = data_df[["Lon", "Lat", "MagL", "line", "unixtime"]]
data_df.head()
[5]:
Lon Lat MagL line unixtime
0 75.635600 -84.104393 -22.30 1 1.229500e+09
1 75.636138 -84.103897 -23.06 1 1.229500e+09
2 75.636699 -84.103403 -23.81 1 1.229500e+09
3 75.637282 -84.102910 -24.57 1 1.229500e+09
4 75.637876 -84.102417 -25.32 1 1.229500e+09

1.1. Plot the data in projected units#

[6]:
airbornegeo.plotly_points(
    data_df[::10], color_col="MagL", robust=True, size=2, coord_names=("Lon", "Lat")
)

1.2. Reproject#

Since the original data is in lat / lon, the input CRS will be EPSG:4326, and we can reproject the data to EPSG 3031 - South Polar Stereographic, since the data is located in Antarctica.

[8]:
data_df["easting"], data_df["northing"] = airbornegeo.reproject(
    data_df.Lon,
    data_df.Lat,
    input_crs="EPSG:4326",
    output_crs="EPSG:3031",
)
data_df.head()
[8]:
Lon Lat MagL line unixtime easting northing
0 75.635600 -84.104393 -22.30 1 1.229500e+09 621072.177354 159052.962392
1 75.636138 -84.103897 -23.06 1 1.229500e+09 621126.010622 159060.533993
2 75.636699 -84.103403 -23.81 1 1.229500e+09 621179.696916 159067.801202
3 75.637282 -84.102910 -24.57 1 1.229500e+09 621233.338990 159074.801823
4 75.637876 -84.102417 -25.32 1 1.229500e+09 621287.011834 159081.682095
[9]:
airbornegeo.plotly_points(
    data_df[::10],
    color_col="MagL",
    robust=True,
    size=2,
    coord_names=("easting", "northing"),
)