# Path: paegan/cdm/dsg/member.py
# class Member(dict):
#     def __init__(self, *args, **kwargs):
#         super(Member, self).__init__(*args, **kwargs)
# 
# Path: paegan/cdm/dsg/features/base/trajectory.py
# class Trajectory(PointCollection):
#     """
#         A collection of Points along a 1 dimensional path, connected in space and time.
#         The Points are ordered in time (in other words, the time dimension must
#         increase monotonically along the trajectory).
#     """
# 
#     def __init__(self, **kwargs):
#         super(Trajectory,self).__init__(**kwargs)
#         self._type = "Trajectory"
# 
#     def get_path(self):
#         """
#             Returns the Points along the trajectory
#         """
#         return map(lambda x: [x.location, x.time], self._elements)


import unittest
import random
from datetime import datetime
from shapely.geometry import Point as sPoint
from paegan.cdm.dsg.member import Member
from paegan.cdm.dsg.features.base.point import Point
from paegan.cdm.dsg.features.base.trajectory import Trajectory
# -*- coding: utf-8 -*-



class TrajectoryTest(unittest.TestCase):
    def test_trajectory(self):
        dt1 = datetime(2012, 4, 1, 0)
        p1 = Point()
        p1.time = dt1
        p1.location = sPoint(-121, 49, 40)

# Path: paegan/cdm/dsg/member.py
# class Member(dict):
#     def __init__(self, *args, **kwargs):
#         super(Member, self).__init__(*args, **kwargs)
# 
# Path: paegan/cdm/dsg/features/base/trajectory.py
# class Trajectory(PointCollection):
#     """
#         A collection of Points along a 1 dimensional path, connected in space and time.
#         The Points are ordered in time (in other words, the time dimension must
#         increase monotonically along the trajectory).
#     """
# 
#     def __init__(self, **kwargs):
#         super(Trajectory,self).__init__(**kwargs)
#         self._type = "Trajectory"
# 
#     def get_path(self):
#         """
#             Returns the Points along the trajectory
#         """
#         return map(lambda x: [x.location, x.time], self._elements)


# Path: tests/cdm/dsg/features/base/test_trajectory.py
import unittest
import random
from datetime import datetime
from shapely.geometry import Point as sPoint
from paegan.cdm.dsg.member import Member
from paegan.cdm.dsg.features.base.point import Point
from paegan.cdm.dsg.features.base.trajectory import Trajectory

# -*- coding: utf-8 -*-



class TrajectoryTest(unittest.TestCase):
    def test_trajectory(self):
        dt1 = datetime(2012, 4, 1, 0)
        p1 = Point()
        p1.time = dt1
        p1.location = sPoint(-121, 49, 40)

        member1 = Member(value=random.uniform(30,40), unit='°C', name='Water Temperatire', description='water temperature', standard='sea_water_temperature')