20 lines
340 B
TypeScript
20 lines
340 B
TypeScript
type GeoRow = {
|
|
id: string;
|
|
gps_lat: number | null;
|
|
gps_lon: number | null;
|
|
};
|
|
|
|
type GeoPoint = {
|
|
id: string;
|
|
gps_lat: number | null;
|
|
gps_lon: number | null;
|
|
};
|
|
|
|
export function shapeGeoRows(rows: GeoRow[]): GeoPoint[] {
|
|
return rows.map((row) => ({
|
|
id: row.id,
|
|
gps_lat: row.gps_lat,
|
|
gps_lon: row.gps_lon,
|
|
}));
|
|
}
|