|
|
|
|
@ -78,6 +78,7 @@ class PointService:
|
|
|
|
|
@staticmethod
|
|
|
|
|
def to_json(qs: models.PlacementPoint):
|
|
|
|
|
data = pd.DataFrame(list(qs.values()))
|
|
|
|
|
data['start_date'] = pd.to_datetime(data['start_date'], errors='coerce')
|
|
|
|
|
data['start_date'] = data['start_date'].dt.tz_localize(None)
|
|
|
|
|
data['sample_trn'] = data['sample_trn'].astype(int)
|
|
|
|
|
data['geometry'] = data['geometry'].apply(lambda x: {'latitude': x[1], 'longtitude': x[0]})
|
|
|
|
|
|