# 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/profile.py
# class Profile(PointCollection):
#     """
#         A collection of points along a vertical (z) access
#         ie. A single profile from an ADCP or CTD
# 
#         A profile has a nominal lat/lon and time.
#         Actual time may be constant, or vary with z.
#         The z coordinates are monotonic, and may be increasing or decreasing.
#     """
#     def __init__(self, **kwargs):
#         super(Profile,self).__init__(**kwargs)
#         self._type = "Profile"
# 
#     def get_location(self):
#         return self._location
#     def set_location(self, location):
#         self._location = location
#     location = property(get_location, set_location)
# 
#     def get_time(self):
#         """
#             Nominal time of the profile.  This is usually the first time a reading was taken,
#             since a profile's time can be constant or vary with z.
#         """
#         return self._time
#     def set_time(self, time):
#         self._time = time
#     time = property(get_time, set_time)
# 
# Path: paegan/cdm/dsg/collections/base/profile_collection.py
# class ProfileCollection(NestedPointCollection):
#     """
#         A collection of Profiles
#     """
# 
#     def __init__(self, **kwargs):
#         super(ProfileCollection,self).__init__(**kwargs)


import random
import unittest
from datetime import datetime, timedelta
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.profile import Profile
from paegan.cdm.dsg.collections.base.profile_collection import ProfileCollection
# -*- coding: utf-8 -*-



class ProfileCollectionTest(unittest.TestCase):
    def test_profile_collection(self):

        day = 1
        pc = ProfileCollection()
        dt = None

        # 10 profiles
        for x in xrange(0,10):
            lat = random.randint(40,44)
            lon = random.randint(-74,-70)
            loc = sPoint(lon,lat,0)
            hour = 0
            minute = 0
            dt = datetime(2012, 4, day, hour, minute)


# 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/profile.py
# class Profile(PointCollection):
#     """
#         A collection of points along a vertical (z) access
#         ie. A single profile from an ADCP or CTD
# 
#         A profile has a nominal lat/lon and time.
#         Actual time may be constant, or vary with z.
#         The z coordinates are monotonic, and may be increasing or decreasing.
#     """
#     def __init__(self, **kwargs):
#         super(Profile,self).__init__(**kwargs)
#         self._type = "Profile"
# 
#     def get_location(self):
#         return self._location
#     def set_location(self, location):
#         self._location = location
#     location = property(get_location, set_location)
# 
#     def get_time(self):
#         """
#             Nominal time of the profile.  This is usually the first time a reading was taken,
#             since a profile's time can be constant or vary with z.
#         """
#         return self._time
#     def set_time(self, time):
#         self._time = time
#     time = property(get_time, set_time)
# 
# Path: paegan/cdm/dsg/collections/base/profile_collection.py
# class ProfileCollection(NestedPointCollection):
#     """
#         A collection of Profiles
#     """
# 
#     def __init__(self, **kwargs):
#         super(ProfileCollection,self).__init__(**kwargs)


# Path: tests/cdm/dsg/collections/base/test_profile_collection.py
import random
import unittest
from datetime import datetime, timedelta
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.profile import Profile
from paegan.cdm.dsg.collections.base.profile_collection import ProfileCollection

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



class ProfileCollectionTest(unittest.TestCase):
    def test_profile_collection(self):

        day = 1
        pc = ProfileCollection()
        dt = None

        # 10 profiles
        for x in xrange(0,10):
            lat = random.randint(40,44)
            lon = random.randint(-74,-70)
            loc = sPoint(lon,lat,0)
            hour = 0
            minute = 0
            dt = datetime(2012, 4, day, hour, minute)


            prof = Profile()