Esempio n. 1
0
 def loadBEDS(self, stride=None, featureType='trajectory'):
     '''
     BEDS specific load functions; featureType can be 'trajectory' or 'timeSeries'.
     Use 'trajectory' for events that we've fudged into a trajectory netCDF file
     using the canyon's thalweg.  Use 'timeSeries' for events for which the BED
     does not significantly translate.
     '''
     stride = stride or self.stride
     for (aName, pName, file, plotTimeSeriesDepth, fg) in zip(
                         [ a.split('/')[-1] + ' (stride=%d)' % stride for a in self.bed_files], 
                         self.bed_platforms, self.bed_files, self.bed_depths, self.bed_framegrabs):
         url = os.path.join(self.bed_base, file)
         try:
             if featureType.lower() == 'trajectory':
                 # To get timeSeries plotting for trajectories (in the Parameter tab of the UI) 
                 # assign a plotTimeSeriesDepth value of the starting depth in meters.
                 DAPloaders.runBEDTrajectoryLoader(url, self.campaignName, self.campaignDescription,
                                                   aName, pName, self.colors[pName.lower()], 'bed',
                                                   'deployment', self.bed_parms, self.dbAlias, stride,
                                                   plotTimeSeriesDepth=plotTimeSeriesDepth,
                                                   grdTerrain=self.grdTerrain, framegrab=fg)
             elif featureType.lower() == 'timeseries':
                 DAPloaders.runTimeSeriesLoader(url, self.campaignName, self.campaignDescription,
                                                aName, pName, self.colors[pName.lower()], 'bed', 
                                                'deployment', self.bed_parms, self.dbAlias, stride)
             self.addPlatformResources('http://stoqs.mbari.org/x3d/beds/beds_housing_with_axes_src_scene.x3d',
                                       pName, scalefactor=10)
         except (DAPloaders.OpendapError, DAPloaders.InvalidSliceRequest):
             pass
Esempio n. 2
0
 def loadBEDS(self, stride=None, featureType='trajectory'):
     '''
     BEDS specific load functions; featureType can be 'trajectory' or 'timeSeries'.
     Use 'trajectory' for events that we've fudged into a trajectory netCDF file
     using the canyon's thalweg.  Use 'timeSeries' for events for which the BED
     does not significantly translate.
     '''
     stride = stride or self.stride
     for (aName, pName, file, plotTimeSeriesDepth,
          fg) in zip([
              a.split('/')[-1] + ' (stride=%d)' % stride
              for a in self.bed_files
          ], self.bed_platforms, self.bed_files, self.bed_depths,
                     self.bed_framegrabs):
         url = os.path.join(self.bed_base, file)
         try:
             if featureType.lower() == 'trajectory':
                 # To get timeSeries plotting for trajectories (in the Parameter tab of the UI)
                 # assign a plotTimeSeriesDepth value of the starting depth in meters.
                 DAPloaders.runBEDTrajectoryLoader(
                     url,
                     self.campaignName,
                     self.campaignDescription,
                     aName,
                     pName,
                     self.colors[pName.lower()],
                     'bed',
                     'deployment',
                     self.bed_parms,
                     self.dbAlias,
                     stride,
                     plotTimeSeriesDepth=plotTimeSeriesDepth,
                     grdTerrain=self.grdTerrain,
                     framegrab=fg)
             elif featureType.lower() == 'timeseries':
                 DAPloaders.runTimeSeriesLoader(
                     url, self.campaignName, self.campaignDescription,
                     aName, pName, self.colors[pName.lower()], 'bed',
                     'deployment', self.bed_parms, self.dbAlias, stride)
             self.addPlatformResources(
                 'http://stoqs.mbari.org/x3d/beds/beds_housing_with_axes_src_scene.x3d',
                 pName,
                 scalefactor=10)
         except (DAPloaders.OpendapError, DAPloaders.InvalidSliceRequest,
                 webob.exc.HTTPError):
             pass
Esempio n. 3
0
    def loadBEDS(self, stride=None, featureType='trajectory'):
        '''
        BEDS specific load functions; featureType can be 'trajectory' or 'timeSeries'.  Use 'trajectory' for events that we've fudged
        into a trajectory netCDF file using the canyon's thalweg.  Use 'timeSeries' for events for which the BED does not significantly translate.
        '''
        stride = stride or self.stride
        for (aName, pName, file, plotTimeSeriesDepth) in zip(
                            [ a + ' (stride=%d)' % stride for a in self.bed_files], 
                            self.bed_platforms, self.bed_files, self.bed_depths):
            url = self.bed_base + file
            if featureType == 'trajectory':
                # To get timeSeries plotting for trajectories (in the Parameter tab of the UI) assign a plotTimeSeriesDepth value of the starting depth in meters.
                DAPloaders.runTrajectoryLoader(url, self.campaignName, self.campaignDescription, aName, pName, self.colors[pName.lower()], 'bed', 'deployment', 
                                        self.bed_parms, self.dbAlias, stride, plotTimeSeriesDepth=plotTimeSeriesDepth, grdTerrain=self.grdTerrain)
            elif featureType == 'timeSeries':
                DAPloaders.runTimeSeriesLoader(url, self.campaignName, self.campaignDescription, aName, pName, self.colors[pName.lower()], 'bed', 'deployment', 
                                        self.bed_parms, self.dbAlias, stride)

            # Leave commented out to indicate how this would be used (X3DOM can't handle old style timestamp routing that we used to do in VRML)
            ##self.addPlaybackResources(x3dplaybackurl, aName)

            self.addPlatformResources('http://dods.mbari.org/data/beds/x3d/beds_housing_with_axes.x3d', pName)