| | 722 | def CreateCurrentVectorsAsArcGISFeatureClasses(cls, outputWorkspace, mode=u'add', featureClassNameExpressions=['uv_vectors', '%%Y', 'Depth_%(Depth)04.0fm', 'uv_vectors_%%%Y%%j_%(Depth)04.0fm.shp'], |
| | 723 | scaleFactor=4500, uniformLength=False, |
| | 724 | spatialExtent=None, linearUnit=u'Degrees', minDepth=None, maxDepth=None, startDate=None, endDate=None, |
| | 725 | timeout=600, maxRetryTime=None, cacheDirectory=None): |
| | 726 | cls.__doc__.Obj.ValidateMethodInvocation() |
| | 727 | |
| | 728 | # Create u and v component grids. |
| | 729 | |
| | 730 | if startDate is not None: |
| | 731 | startYear = startDate.year |
| | 732 | else: |
| | 733 | startYear = None |
| | 734 | if endDate is not None: |
| | 735 | endYear = endDate.year |
| | 736 | else: |
| | 737 | endYear = None |
| | 738 | |
| | 739 | uGrid = HYCOMGOMl0044D(u'u', startYear=startYear, endYear=endYear, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) |
| | 740 | try: |
| | 741 | vGrid = HYCOMGOMl0044D(u'v', startYear=startYear, endYear=endYear, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) |
| | 742 | try: |
| | 743 | cls._LogWarning(_(u'The HYCOM OPeNDAP server often requires five to ten minutes to return the data required to create the first feature class. Please be patient. After the first one is created, the rest will go much faster. Because the first raster takes so long, the first status report may estimate an absurdly long time to completion. Please wait for the second status report, issued five minutes after the first one, for a better estimate. This tool cannot be cancelled until the first raster is created. If this tool fails with to a timeout error, increase the timeout value and try again.')) |
| | 744 | |
| | 745 | # If the caller requested a minimum depth that is |
| | 746 | # within the range of the HYCOM layers, instantiate |
| | 747 | # those grids. |
| | 748 | |
| | 749 | from GeoEco.Datasets.Virtual import GridSliceCollection, SeafloorGrid |
| | 750 | |
| | 751 | uSlices = [] |
| | 752 | vSlices = [] |
| | 753 | |
| | 754 | if minDepth is None or minDepth <= 5500.: |
| | 755 | clippedUGrid = cls._Clip(uGrid, spatialExtent, linearUnit, minDepth, maxDepth, startDate, endDate) |
| | 756 | uSlices.extend(GridSliceCollection(clippedUGrid, tQACoordType=u'center', zQACoordType=u'center').QueryDatasets()) |
| | 757 | |
| | 758 | clippedVGrid = cls._Clip(vGrid, spatialExtent, linearUnit, minDepth, maxDepth, startDate, endDate) |
| | 759 | vSlices.extend(GridSliceCollection(clippedVGrid, tQACoordType=u'center', zQACoordType=u'center').QueryDatasets()) |
| | 760 | |
| | 761 | # If the caller requested a maximum depth that is |
| | 762 | # greater than or equal to 20000., instantiate grids |
| | 763 | # representing the values at the seafloor. |
| | 764 | |
| | 765 | if minDepth == 20000. or maxDepth >= 20000.: |
| | 766 | clippedUGrid = cls._Clip(uGrid, spatialExtent, linearUnit, None, None, startDate, endDate) |
| | 767 | seafloorUGrid = SeafloorGrid(clippedUGrid, (QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata()),), {u'Depth': 20000.}) |
| | 768 | uSlices.extend(GridSliceCollection(seafloorUGrid, tQACoordType=u'center').QueryDatasets()) |
| | 769 | |
| | 770 | clippedVGrid = cls._Clip(vGrid, spatialExtent, linearUnit, None, None, startDate, endDate) |
| | 771 | seafloorVGrid = SeafloorGrid(clippedVGrid, (QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata()),), {u'Depth': 20000.}) |
| | 772 | vSlices.extend(GridSliceCollection(seafloorVGrid, tQACoordType=u'center').QueryDatasets()) |
| | 773 | |
| | 774 | # Construct a list of |
| | 775 | # ShapefileFromVectorComponentGrids from the slices. |
| | 776 | |
| | 777 | from GeoEco.SpatialAnalysis.Lines import ShapefileFromVectorComponentGrids |
| | 778 | |
| | 779 | queryableAttributes = tuple(uGrid.GetAllQueryableAttributes() + [QueryableAttribute(u'DateTime', _(u'Date'), DateTimeTypeMetadata()), QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata())]) |
| | 780 | vectorShapefiles = [] |
| | 781 | |
| | 782 | for i in range(len(uSlices)): |
| | 783 | queryableAttributeValues = {} |
| | 784 | for qa in queryableAttributes: |
| | 785 | queryableAttributeValues[qa.Name] = uSlices[i].GetQueryableAttributeValue(qa.Name) |
| | 786 | |
| | 787 | vectorShapefiles.append(ShapefileFromVectorComponentGrids(uSlices[i], vSlices[i], scaleFactor, uniformLength, queryableAttributes=queryableAttributes, queryableAttributeValues=queryableAttributeValues)) |
| | 788 | |
| | 789 | # Import the ShapefileFromVectorComponentGrids into |
| | 790 | # the output workspace. |
| | 791 | |
| | 792 | from GeoEco.Datasets.ArcGIS import ArcGISWorkspace, ArcGISTable |
| | 793 | |
| | 794 | workspace = ArcGISWorkspace(outputWorkspace, ArcGISTable, pathCreationExpressions=featureClassNameExpressions, cacheTree=True, queryableAttributes=queryableAttributes) |
| | 795 | workspace.ImportDatasets(vectorShapefiles, mode) |
| | 796 | |
| | 797 | # Return successfully. |
| | 798 | |
| | 799 | return outputWorkspace |
| | 800 | |
| | 801 | finally: |
| | 802 | vGrid.Close() |
| | 803 | finally: |
| | 804 | uGrid.Close() |
| | 805 | |
| | 806 | @classmethod |
| | 1742 | def CreateCurrentVectorsAsArcGISFeatureClasses(cls, outputWorkspace, mode=u'add', featureClassNameExpressions=['uv_vectors', '%%Y', 'Depth_%(Depth)04.0fm', 'uv_vectors_%%%Y%%j_%(Depth)04.0fm.shp'], |
| | 1743 | scaleFactor=8900, uniformLength=False, |
| | 1744 | rotationOffset=None, extendYExtent=False, spatialExtent=None, linearUnit=u'Degrees', minDepth=None, maxDepth=None, startDate=None, endDate=None, |
| | 1745 | timeout=60, maxRetryTime=120, cacheDirectory=None): |
| | 1746 | cls.__doc__.Obj.ValidateMethodInvocation() |
| | 1747 | |
| | 1748 | # Create u and v component grids. |
| | 1749 | |
| | 1750 | uGrid = HYCOMGLBa008Equatorial4D(u'u', extendYExtent=extendYExtent, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) |
| | 1751 | try: |
| | 1752 | vGrid = HYCOMGLBa008Equatorial4D(u'v', extendYExtent=extendYExtent, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) |
| | 1753 | try: |
| | 1754 | |
| | 1755 | # If the caller requested a minimum depth that is |
| | 1756 | # within the range of the HYCOM layers, instantiate |
| | 1757 | # those grids. |
| | 1758 | |
| | 1759 | from GeoEco.Datasets.Virtual import GridSliceCollection, SeafloorGrid |
| | 1760 | |
| | 1761 | uSlices = [] |
| | 1762 | vSlices = [] |
| | 1763 | |
| | 1764 | if minDepth is None or minDepth <= 5500.: |
| | 1765 | clippedUGrid = cls._RotateAndClip(uGrid, rotationOffset, spatialExtent, linearUnit, minDepth, maxDepth, startDate, endDate) |
| | 1766 | uSlices.extend(GridSliceCollection(clippedUGrid, tQACoordType=u'center', zQACoordType=u'center').QueryDatasets()) |
| | 1767 | |
| | 1768 | clippedVGrid = cls._RotateAndClip(vGrid, rotationOffset, spatialExtent, linearUnit, minDepth, maxDepth, startDate, endDate) |
| | 1769 | vSlices.extend(GridSliceCollection(clippedVGrid, tQACoordType=u'center', zQACoordType=u'center').QueryDatasets()) |
| | 1770 | |
| | 1771 | # If the caller requested a maximum depth that is |
| | 1772 | # greater than or equal to 20000., instantiate grids |
| | 1773 | # representing the values at the seafloor. |
| | 1774 | |
| | 1775 | if minDepth == 20000. or maxDepth >= 20000.: |
| | 1776 | clippedUGrid = cls._RotateAndClip(uGrid, rotationOffset, spatialExtent, linearUnit, None, None, startDate, endDate) |
| | 1777 | seafloorUGrid = SeafloorGrid(clippedUGrid, (QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata()),), {u'Depth': 20000.}) |
| | 1778 | uSlices.extend(GridSliceCollection(seafloorUGrid, tQACoordType=u'center').QueryDatasets()) |
| | 1779 | |
| | 1780 | clippedVGrid = cls._RotateAndClip(vGrid, rotationOffset, spatialExtent, linearUnit, None, None, startDate, endDate) |
| | 1781 | seafloorVGrid = SeafloorGrid(clippedVGrid, (QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata()),), {u'Depth': 20000.}) |
| | 1782 | vSlices.extend(GridSliceCollection(seafloorVGrid, tQACoordType=u'center').QueryDatasets()) |
| | 1783 | |
| | 1784 | # Construct a list of |
| | 1785 | # ShapefileFromVectorComponentGrids from the slices. |
| | 1786 | |
| | 1787 | from GeoEco.SpatialAnalysis.Lines import ShapefileFromVectorComponentGrids |
| | 1788 | |
| | 1789 | queryableAttributes = tuple(uGrid.GetAllQueryableAttributes() + [QueryableAttribute(u'DateTime', _(u'Date'), DateTimeTypeMetadata()), QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata())]) |
| | 1790 | vectorShapefiles = [] |
| | 1791 | |
| | 1792 | for i in range(len(uSlices)): |
| | 1793 | queryableAttributeValues = {} |
| | 1794 | for qa in queryableAttributes: |
| | 1795 | queryableAttributeValues[qa.Name] = uSlices[i].GetQueryableAttributeValue(qa.Name) |
| | 1796 | |
| | 1797 | vectorShapefiles.append(ShapefileFromVectorComponentGrids(uSlices[i], vSlices[i], scaleFactor, uniformLength, queryableAttributes=queryableAttributes, queryableAttributeValues=queryableAttributeValues)) |
| | 1798 | |
| | 1799 | # Import the ShapefileFromVectorComponentGrids into |
| | 1800 | # the output workspace. |
| | 1801 | |
| | 1802 | from GeoEco.Datasets.ArcGIS import ArcGISWorkspace, ArcGISTable |
| | 1803 | |
| | 1804 | workspace = ArcGISWorkspace(outputWorkspace, ArcGISTable, pathCreationExpressions=featureClassNameExpressions, cacheTree=True, queryableAttributes=queryableAttributes) |
| | 1805 | workspace.ImportDatasets(vectorShapefiles, mode) |
| | 1806 | |
| | 1807 | # Return successfully. |
| | 1808 | |
| | 1809 | return outputWorkspace |
| | 1810 | |
| | 1811 | finally: |
| | 1812 | vGrid.Close() |
| | 1813 | finally: |
| | 1814 | uGrid.Close() |
| | 1815 | |
| | 1816 | @classmethod |
| | 3077 | |
| | 3078 | # Public method: HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses |
| | 3079 | |
| | 3080 | AddMethodMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, |
| | 3081 | shortDescription=_(u'Creates line feature classes representing the vectors of HYCOM GOMl0.04 currents.'), |
| | 3082 | longDescription=_( |
| | 3083 | u"""The lines output by this tool are similar to those in a "quiver |
| | 3084 | plot". When displayed on a map, they can help visualize the direction |
| | 3085 | and speed of ocean currents. In ArcMap, select the "Arrow at End" |
| | 3086 | symbology. You may also want to reduce the line decoration (the arrow) |
| | 3087 | to a small size, such as 2.0. |
| | 3088 | |
| | 3089 | """) + _HYCOMGOMl004_LongDescription % {u'name': 'tool'} + _('\n\n**References**\n\n') + _HYCOMGOMl004_References, |
| | 3090 | isExposedToPythonCallers=True, |
| | 3091 | isExposedByCOM=True, |
| | 3092 | isExposedAsArcGISTool=True, |
| | 3093 | arcGISDisplayName=_(u'Create Current Vectors for HYCOM GOMl0.04'), |
| | 3094 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Gulf of Mexico 1/25 Degree Analysis (GLMl0.04)\\4D Variables'), |
| | 3095 | dependencies=[ArcGISDependency(9, 1), PythonAggregatedModuleDependency('numpy')]) |
| | 3096 | |
| | 3097 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'cls', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'cls') |
| | 3098 | |
| | 3099 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'outputWorkspace', |
| | 3100 | typeMetadata=ArcGISWorkspaceTypeMetadata(createParentDirectories=True), |
| | 3101 | description=_( |
| | 3102 | u"""Directory or geodatabase to receive the feature classes. |
| | 3103 | |
| | 3104 | Unless you have a specific reason to store the feature classes in a |
| | 3105 | geodatabase, we recommend you store them in a directory because it |
| | 3106 | will be faster and allows them to be organized as a tree (of |
| | 3107 | shapefiles). If you do store the feature classes in a geodatabase, you |
| | 3108 | must change the Feature Class Name Expressions parameter; see below |
| | 3109 | for more information."""), |
| | 3110 | arcGISDisplayName=_(u'Output workspace')) |
| | 3111 | |
| | 3112 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'mode', |
| | 3113 | typeMetadata=UnicodeStringTypeMetadata(allowedValues=[u'Add', u'Replace'], makeLowercase=True), |
| | 3114 | description=_( |
| | 3115 | u"""Overwrite mode, one of: |
| | 3116 | |
| | 3117 | * Add - create feature classes that do not exist and skip those that |
| | 3118 | already exist. This is the default. |
| | 3119 | |
| | 3120 | * Replace - create feature classes that do not exist and overwrite |
| | 3121 | those that already exist. |
| | 3122 | |
| | 3123 | The ArcGIS Overwrite Outputs geoprocessing setting has no effect on |
| | 3124 | this tool. If 'Replace' is selected the feature classes will be |
| | 3125 | overwritten, regardless of the ArcGIS Overwrite Outputs setting."""), |
| | 3126 | arcGISDisplayName=_(u'Overwrite mode')) |
| | 3127 | |
| | 3128 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'featureClassNameExpressions', |
| | 3129 | typeMetadata=ListTypeMetadata(elementType=UnicodeStringTypeMetadata(), minLength=1), |
| | 3130 | description=_( |
| | 3131 | u"""List of expressions specifying how the output feature classes |
| | 3132 | should be named. |
| | 3133 | |
| | 3134 | The default expression assumes the output workspace is a directory and |
| | 3135 | creates shapefiles in a tree structure with levels for the year and |
| | 3136 | depth. |
| | 3137 | |
| | 3138 | If the output workspace is a geodatabase, you should provide only one |
| | 3139 | or two expressions. If you provide one expression, it specifies the |
| | 3140 | feature class name. If you provide two, the first one specifies the |
| | 3141 | feature dataset name and the second specifies the feature class name. |
| | 3142 | |
| | 3143 | Each expression may contain any sequence of characters permitted by |
| | 3144 | the output workspace. Each expression may optionally contain one or |
| | 3145 | more of the following case-sensitive codes. The tool replaces the |
| | 3146 | codes with appropriate values when creating each feature class: |
| | 3147 | |
| | 3148 | * %(Depth)f - depth of the output feature class. The f may be preceded |
| | 3149 | by Python's string formatting codes. Please see the Python |
| | 3150 | documentation for more information. |
| | 3151 | |
| | 3152 | * %%Y - four-digit year of the output feature class. |
| | 3153 | |
| | 3154 | * %%m - two-digit month of the output feature class. |
| | 3155 | |
| | 3156 | * %%d - two-digit day of the month of the output feature class. |
| | 3157 | |
| | 3158 | * %%j - three-digit day of the year of the output feature class. |
| | 3159 | """), |
| | 3160 | arcGISDisplayName=_(u'Feature class name expressions')) |
| | 3161 | |
| | 3162 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'scaleFactor', |
| | 3163 | typeMetadata=FloatTypeMetadata(mustBeGreaterThan=0.0), |
| | 3164 | description=_( |
| | 3165 | u"""Factor for scaling lines lengths. |
| | 3166 | |
| | 3167 | The length of each line is calculated by multiplying the magnitude of |
| | 3168 | the vector by this parameter. Use this parameter to scale the lines |
| | 3169 | output by this tool to lengths that are visually appealing. If the |
| | 3170 | lines are too short, they will resemble a grid of dots and you will |
| | 3171 | not be able to discern the flow of the vector field. If the lines are |
| | 3172 | too long, they will overlap each other and resemble a plate of |
| | 3173 | spaghetti. |
| | 3174 | |
| | 3175 | If the vectors all have about the same magnitude, then a good approach |
| | 3176 | is to scale the lines so that the longest one is about as long as the |
| | 3177 | raster cell size. But if there are a few very long vectors, then you |
| | 3178 | may prefer to scale the lines so that the average-length vector is as |
| | 3179 | long as the raster cell size. |
| | 3180 | |
| | 3181 | For HYCOM GOMl0.04 currents, the grid cell size is about 4500 m and |
| | 3182 | currents are given in m/s. So, if the maximum (or mean) velocity in |
| | 3183 | your region of interest is about 0.75 m/s: |
| | 3184 | |
| | 3185 | scale factor = 4500 / 0.75 = 6000 |
| | 3186 | """), |
| | 3187 | arcGISDisplayName=_(u'Scale factor'), |
| | 3188 | arcGISCategory=_(u'Vector options')) |
| | 3189 | |
| | 3190 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'uniformLength', |
| | 3191 | typeMetadata=BooleanTypeMetadata(), |
| | 3192 | description=_( |
| | 3193 | u"""If False (the default) then the lengths of the lines are |
| | 3194 | determined by multiplying the magnitude of the vector by the Scale |
| | 3195 | Factor parameter. |
| | 3196 | |
| | 3197 | If True, all lines will have the same length, which will be determined |
| | 3198 | by multiplying the cell size of the HYCOM grids by the the Scale |
| | 3199 | Factor. Use this option when you want to the lines' colors to indicate |
| | 3200 | the magnitude of the vector, rather than the lines' lengths. Start |
| | 3201 | with a Scale Factor of 1 and increase it or decrease it slightly to |
| | 3202 | achieve the desired visual effect."""), |
| | 3203 | arcGISDisplayName=_(u'Create all lines with the same length'), |
| | 3204 | arcGISCategory=_(u'Vector options')) |
| | 3205 | |
| | 3206 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'spatialExtent', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'spatialExtent') |
| | 3207 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'linearUnit', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'linearUnit') |
| | 3208 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'minDepth', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'minDepth') |
| | 3209 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'maxDepth', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'maxDepth') |
| | 3210 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'startDate', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'startDate') |
| | 3211 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'endDate', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'endDate') |
| | 3212 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'timeout', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'timeout') |
| | 3213 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'maxRetryTime', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'maxRetryTime') |
| | 3214 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'cacheDirectory', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'cacheDirectory') |
| | 3215 | |
| | 3216 | CopyResultMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'updatedOutputWorkspace', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'updatedOutputWorkspace') |
| | 4210 | # Public method: HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses |
| | 4211 | |
| | 4212 | AddMethodMetadata(HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, |
| | 4213 | shortDescription=_(u'Creates line feature classes representing the current vectors for the equatorial (Mercator) region of the HYCOM GLBa0.08 dataset.'), |
| | 4214 | longDescription=_( |
| | 4215 | u"""The lines output by this tool are similar to those in a "quiver |
| | 4216 | plot". When displayed on a map, they can help visualize the direction |
| | 4217 | and speed of ocean currents. In ArcMap, select the "Arrow at End" |
| | 4218 | symbology. You may also want to reduce the line decoration (the arrow) |
| | 4219 | to a small size, such as 2.0. |
| | 4220 | |
| | 4221 | """) + _HYCOMGLBa008Equatorial_LongDescription % {u'name': 'tool'} + _('\n\n**References**\n\n') + _HYCOMGLBa008Equatorial_References, |
| | 4222 | isExposedToPythonCallers=True, |
| | 4223 | isExposedByCOM=True, |
| | 4224 | isExposedAsArcGISTool=True, |
| | 4225 | arcGISDisplayName=_(u'Create Current Vectors for HYCOM GLBa0.08 Equatorial Region'), |
| | 4226 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Global 1/12 Degree Analysis (GLBa0.08)\\Equatorial Region (47 N to 66 S)\\4D Variables'), |
| | 4227 | dependencies=[ArcGISDependency(9, 1), PythonAggregatedModuleDependency('numpy')]) |
| | 4228 | |
| | 4229 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'cls', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'cls') |
| | 4230 | |
| | 4231 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'outputWorkspace', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'outputWorkspace') |
| | 4232 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'mode', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'mode') |
| | 4233 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'featureClassNameExpressions', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'featureClassNameExpressions') |
| | 4234 | |
| | 4235 | AddArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'scaleFactor', |
| | 4236 | typeMetadata=FloatTypeMetadata(mustBeGreaterThan=0.0), |
| | 4237 | description=_( |
| | 4238 | u"""Factor for scaling lines lengths. |
| | 4239 | |
| | 4240 | The length of each line is calculated by multiplying the magnitude of |
| | 4241 | the vector by this parameter. Use this parameter to scale the lines |
| | 4242 | output by this tool to lengths that are visually appealing. If the |
| | 4243 | lines are too short, they will resemble a grid of dots and you will |
| | 4244 | not be able to discern the flow of the vector field. If the lines are |
| | 4245 | too long, they will overlap each other and resemble a plate of |
| | 4246 | spaghetti. |
| | 4247 | |
| | 4248 | If the vectors all have about the same magnitude, then a good approach |
| | 4249 | is to scale the lines so that the longest one is about as long as the |
| | 4250 | raster cell size. But if there are a few very long vectors, then you |
| | 4251 | may prefer to scale the lines so that the average-length vector is as |
| | 4252 | long as the raster cell size. |
| | 4253 | |
| | 4254 | For HYCOM GLBa0.08 currents, the grid cell size is about 8900 m and |
| | 4255 | currents are given in m/s. So, if the maximum (or mean) velocity in |
| | 4256 | your region of interest is about 0.75 m/s: |
| | 4257 | |
| | 4258 | scale factor = 8900 / 0.75 = 11866.666666 |
| | 4259 | """), |
| | 4260 | arcGISDisplayName=_(u'Scale factor'), |
| | 4261 | arcGISCategory=_(u'Vector options')) |
| | 4262 | |
| | 4263 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'uniformLength', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'uniformLength') |
| | 4264 | |
| | 4265 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'rotationOffset', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'rotationOffset') |
| | 4266 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'extendYExtent', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'extendYExtent') |
| | 4267 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'spatialExtent', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'spatialExtent') |
| | 4268 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'linearUnit', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'linearUnit') |
| | 4269 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'minDepth', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'minDepth') |
| | 4270 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'maxDepth', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'maxDepth') |
| | 4271 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'startDate', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'startDate') |
| | 4272 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'endDate', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'endDate') |
| | 4273 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'timeout', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'timeout') |
| | 4274 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'maxRetryTime', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'maxRetryTime') |
| | 4275 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'cacheDirectory', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'cacheDirectory') |
| | 4276 | |
| | 4277 | CopyResultMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'updatedOutputWorkspace', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'updatedOutputWorkspace') |
| | 4278 | |