[mapserver-commits] r12879 - in trunk/docs: . en/input/vector
en/mapfile
svn at osgeo.org
svn at osgeo.org
Sun Dec 11 18:28:09 EST 2011
Author: havatv
Date: 2011-12-11 15:28:08 -0800 (Sun, 11 Dec 2011)
New Revision: 12879
Added:
trunk/docs/en/input/vector/vector_field.txt
Modified:
trunk/docs/conf.py
trunk/docs/en/input/vector/index.txt
trunk/docs/en/mapfile/layer.txt
trunk/docs/en/mapfile/style.txt
Log:
Documentation of INITIALGAP (new) in STYLE, documentation page for vector field (new) and documentation of CONNECTIONTYPE uvvector (new) in layer (#4094 and #4117). Added keywords for syntax highlighter.
Modified: trunk/docs/conf.py
===================================================================
--- trunk/docs/conf.py 2011-12-10 12:09:44 UTC (rev 12878)
+++ trunk/docs/conf.py 2011-12-11 23:28:08 UTC (rev 12879)
@@ -292,11 +292,11 @@
r'CHART|CIRCLE|CL|CR|CSV|MYSQL|'
r'POSTGRESQL|DEFAULT|DD|ELLIPSE|EMBED|FALSE|FEET|FOLLOW|'
r'GIANT|HATCH|HILITE|INCHES|KILOMETERS|LARGE|LC|'
- r'LEFT|LINE|LL|LR|MEDIUM|METERS|MILES|MITER|MULTIPLE|NONE|'
+ r'LEFT|LINE|LL|LOCAL|LR|MEDIUM|METERS|MILES|MITER|MULTIPLE|NONE|'
r'NORMAL|OFF|OGR|ON|ONE-TO-ONE|ONE-TO-MANY|ORACLESPATIAL|'
r'PERCENTAGES|PIXMAP|PIXELS|POINT|POLYGON|POSTGIS|MYGIS|'
r'PLUGIN|QUERY|RASTER|RIGHT|ROUND|SDE|SELECTED|SIMPLE|SINGLE|'
- r'SMALL|SQUARE|TINY|TRIANGLE|TRUE|TRUETYPE|UC|UL|UR|VECTOR|'
+ r'SMALL|SQUARE|TINY|TRIANGLE|TRUE|TRUETYPE|UC|UL|UNION|UR|UV_ANGLE|UV_MINUS_ANGLE|UV_LENGTH|UV_LENGTH_2|UVRASTER|VECTOR|'
r'WFS|WMS|ALPHA|'
r'GIF|JPEG|JPG|PNG|WBMP|SWF|PDF|GTIFF|PC256|RGB|RGBA|INT16|FLOAT32|GD|'
r'AGG|CAIRO|PNG8|SVG|KML|KMZ|GDAL'
@@ -320,7 +320,7 @@
r'MINLENGTH|MINSIZE|MINSUBDIVIDE|MINTEMPLATE|MINWIDTH|NAME|OFFSET|OFFSITE|'
r'OPACITY|OUTLINECOLOR|OUTLINEWIDTH|OUTPUTFORMAT|OVERLAYBACKGROUNDCOLOR|'
r'OVERLAYCOLOR|OVERLAYMAXSIZE|OVERLAYMINSIZE|OVERLAYOUTLINECOLOR|'
- r'OVERLAYSIZE|OVERLAYSYMBOL|PARTIALS|PATTERN|POINTS|POSITION|POSTLABELCACHE|'
+ r'OVERLAYSIZE|OVERLAYSYMBOL|PARTIALS|PATTERN|POINTS|POLAROFFSET|POSITION|POSTLABELCACHE|'
r'PRIORITY|PROCESSING|PROJECTION|QUERYFORMAT|QUERYMAP|REFERENCE|REGION|'
r'RELATIVETO|REQUIRES|RESOLUTION|SCALE|SCALEDENOM|SHADOWCOLOR|SHADOWSIZE|'
r'SHAPEPATH|SIZE|SIZEUNITS|STATUS|STYLE|STYLEITEM|SYMBOL|SYMBOLSCALE|'
Modified: trunk/docs/en/input/vector/index.txt
===================================================================
--- trunk/docs/en/input/vector/index.txt 2011-12-10 12:09:44 UTC (rev 12878)
+++ trunk/docs/en/input/vector/index.txt 2011-12-11 23:28:08 UTC (rev 12879)
@@ -74,5 +74,6 @@
S57
sqlite
tiger
+ vector_field
VirtualSpatialData
wfs
Added: trunk/docs/en/input/vector/vector_field.txt
===================================================================
--- trunk/docs/en/input/vector/vector_field.txt (rev 0)
+++ trunk/docs/en/input/vector/vector_field.txt 2011-12-11 23:28:08 UTC (rev 12879)
@@ -0,0 +1,128 @@
+.. index::
+ single: Vector field
+
+.. index::
+ single: uvraster
+
+.. _input_vector_field
+
+*****************************************************************************
+ Vector field rendering - UVraster
+*****************************************************************************
+
+Vector fields are used for instance in meteorology to store/display
+wind direction and magnitude.
+
+The source is two bands of raster data, the first band represents the
+U component of the vector, and the second band the V component. Using
+the u,v values at a given location we can compute a rotation and
+magnitude and use that to draw an arrow of a size proportional to the
+magnitude and pointing in the direction of the phenomenon (wind,
+current, etc.)
+
+For more details about vector fields, refer to: `Vector field`_
+
+A vector field :ref:`LAYER` is a hybrid layer, which has a raster data
+source as input and vector features as output. The output features
+are represented as points. Queries are not supported.
+
+Since the data source is a raster, all raster processing options can
+be used (e.g. RESAMPLE). RESAMPLE=AVERAGE generally gives a good
+result, and the default. This can be overridden by explicitly
+specifying the type of resampling.
+
+Vector field layers are of `TYPE` `point`, and have `CONNECTIONTYPE`
+`uvraster`. The raster data set is specified in `DATA`. The two
+bands that define the vector field are specified using `PROCESSING`
+`BANDS` (U first, V second).
+
+The UVraster connection type offers the following attributes:
+
+* [u]: the raw u value
+* [v]: the raw v value
+* [uv_angle]: the vector angle
+* [uv_minus_angle]: the vector angle - opposite direction
+* [uv_length]: the vector length (scaled with the `UV_SIZE_SCALE`
+ optional value)
+* [uv_length_2]: half the vector length
+
+Optional `PROCESSING` settings:
+
+* `UV_SPACING`: The spacing is simply the distance, in pixels, between
+ arrows to be displayed in the vector field. Default is 32.
+* `UV_SIZE_SCALE`: The uv size scale is used to convert the vector
+ lengths (magnitude) of the raster to pixels for a better
+ rendering. Default is 1.
+
+Example of a layer definition:
+
+.. code-block:: mapfile
+
+ SYMBOL
+ NAME "horizline"
+ TYPE VECTOR
+ POINTS
+ 0 0
+ 1 0
+ END # points
+ END # symbol
+ SYMBOL
+ NAME "arrowhead"
+ TYPE vector
+ FILLED true
+ #ANCHORPOINT 0 0.5
+ POINTS
+ 0 2
+ 4 1
+ 0 0
+ END # points
+ END # symbol
+ SYMBOL
+ NAME "arrowtail"
+ TYPE vector
+ FILLED true
+ ANCHORPOINT 1 0.5 # to shift the arrowtail
+ POINTS
+ 0 2
+ 4 1
+ 0 0
+ -99 -99
+ 0 1
+ 4 1
+ END # points
+ END # symbol
+ LAYER
+ NAME "my_uv_test"
+ TYPE POINT
+ STATUS DEFAULT
+ CONNECTIONTYPE uvraster
+ DATA /path/wind.grib2
+ PROCESSING "BANDS=1,2"
+ PROCESSING "UV_SPACING=40"
+ PROCESSING "UV_SIZE_SCALE=0.2"
+ CLASS
+ STYLE
+ SYMBOL "horizline"
+ ANGLE [uv_angle]
+ SIZE [uv_length]
+ WIDTH 3
+ COLOR 100 255 0
+ END # style
+ STYLE
+ SYMBOL "arrowhead"
+ ANGLE [uv_angle]
+ SIZE 10
+ COLOR 255 0 0
+ POLAROFFSET [uv_length_2] [uv_angle]
+ END # style
+ STYLE
+ SYMBOL "arrowtail"
+ ANGLE [uv_angle]
+ SIZE 10
+ COLOR 255 0 0
+ POLAROFFSET [uv_length_2] [uv_minus_angle]
+ END # style
+ END # class
+ END # layer
+
+.. _`Vector field`: http://en.wikipedia.org/wiki/Vector_field
Modified: trunk/docs/en/mapfile/layer.txt
===================================================================
--- trunk/docs/en/mapfile/layer.txt 2011-12-10 12:09:44 UTC (rev 12878)
+++ trunk/docs/en/mapfile/layer.txt 2011-12-11 23:28:08 UTC (rev 12879)
@@ -70,7 +70,37 @@
.. index::
pair: LAYER; CONNECTIONTYPE
-CONNECTIONTYPE [local|sde|ogr|postgis|oraclespatial|wms|wfs|plugin|union]
+.. index::
+ triple: LAYER; CONNECTIONTYPE; local
+
+.. index::
+ triple: LAYER; CONNECTIONTYPE; ogr
+
+.. index::
+ triple: LAYER; CONNECTIONTYPE; oraclespatial
+
+.. index::
+ triple: LAYER; CONNECTIONTYPE; plugin
+
+.. index::
+ triple: LAYER; CONNECTIONTYPE; postgis
+
+.. index::
+ triple: LAYER; CONNECTIONTYPE; sde
+
+.. index::
+ triple: LAYER; CONNECTIONTYPE; union
+
+.. index::
+ triple: LAYER; CONNECTIONTYPE; uvraster
+
+.. index::
+ triple: LAYER; CONNECTIONTYPE; wfs
+
+.. index::
+ triple: LAYER; CONNECTIONTYPE; wms
+
+CONNECTIONTYPE [local|ogr|oraclespatial|plugin|postgis|sde|union|uvraster|wfs|wms]
Type of connection. Default is local. See additional documentation for
any other type.
Modified: trunk/docs/en/mapfile/style.txt
===================================================================
--- trunk/docs/en/mapfile/style.txt 2011-12-10 12:09:44 UTC (rev 12878)
+++ trunk/docs/en/mapfile/style.txt 2011-12-11 23:28:08 UTC (rev 12879)
@@ -391,6 +391,67 @@
.. versionadded:: 6.0 moved from :ref:`SYMBOL`
.. index::
+ pair: STYLE; POLAROFFSET
+
+POLAROFFSET [double|attribute] [double|attribute]
+ Offset given in polar coordinates.
+
+ The first parameter is a double value in layer `SIZEUNITS` (or the
+ name of a layer attribute) that specifies the radius/distance.
+
+ The second parameter is a double value (or the name of a layer
+ attribute) that specifies the angle (counter clockwise).
+
+ When scaling of symbols is in effect (`SYMBOLSCALEDENOM` is
+ specified for the :ref:`LAYER`), `POLAROFFSET` gives the
+ distance in layer `SIZEUNITS` at the map scale
+ 1:`SYMBOLSCALEDENOM`.
+
+ A `POLAROFFSET` of `20` `40` will shift the geometry to a position
+ that is 20 `SIZEUNITS` away along a line that is at an angle of 40
+ degrees with a line that goes horizontally to the right.
+
+ When `POLAROFFSET` is used with layers that have `CONNECTIONTYPE`
+ `uvraster` (:ref:`vector field <input_vector_field>`), the special
+ attributes `uv_length`, `uv_length_2`, `uv_angle` and
+ `uv_minus_angle` are available, making it convenient to specify
+ arrow heads and tails. Example:
+
+ .. code-block:: mapfile
+
+ LAYER
+ ...
+ TYPE POINT
+ CONNECTIONTYPE uvraster
+ ...
+ CLASS
+ STYLE
+ SYMBOL "arrowbody"
+ ANGLE [uv_angle]
+ SIZE [uv_length]
+ WIDTH 3
+ COLOR 100 255 0
+ END
+ STYLE
+ SYMBOL "arrowhead"
+ ANGLE [uv_angle]
+ SIZE 10
+ COLOR 255 0 0
+ POLAROFFSET [uv_length_2] [uv_angle]
+ END
+ STYLE
+ SYMBOL "arrowtail"
+ ANGLE [uv_angle]
+ SIZE 10
+ COLOR 255 0 0
+ POLAROFFSET [uv_length_2] [uv_minus_angle]
+ END
+ END #class
+ END #layer
+
+ .. versionadded:: 6.2 (:ref:`rfc78`)
+
+.. index::
pair: STYLE; SIZE
SIZE [double|attribute]
More information about the mapserver-commits
mailing list