Mapnik配置文件

Mapnik 地图配置文件描述


u PointSymbolizer :点符号

parameter

value

default

file

图片文件名路径

none

width

图片显示像素宽度 px

4

height

图片显示像素高度 px

4

type

图片类型 (png 或 tiff)

none

allow_overlap

是否容许压盖 true/false

false

opacity

符号透明度( 0.0 - 1.0 )

1.0

样例



u LineSymbolizer :线符号

parameter

value

description

unit

default

stroke

CSS colour

颜色值 A Color value such as 'green' or #A3D979

-

"black"

stroke-width

0.0 - n

线宽 Width of line

pixels

1.0

stroke-opacity

0.0 - 1.0

颜色透明度 1 is fully opaque while zero is fully transparent and .5 would be 50% transparent

transparency

1.0

stroke-linejoin

miter, round, bevel

线接头类型

See http://www.w3.org/TR/SVG/painting.html#propdef-stroke-linejoin for an example for each value

-

miter

stroke-linecap

round, butt, square

线头类型

See http://www.w3.org/TR/SVG/painting.html#propdef-stroke-linecap for an example for each value

-

butt

stroke-dasharray

0.0 - n,0.0 - n

间断线间隔数组设置

A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported as well (e.g. to start the line not with a stroke, but with a gap).

pixels

none

样例



u LinePatternSymbolizer :线图案符号

parameter

value

default

file

文件路径 path to image file

none

base

base path where to search for file

none

width

图片显示像素宽度 px

4

height

图片显示像素高度 px

4

type

图片类型 (png 或 tiff)

none

样例



u PolygonSymbolizer :面填充符号

parameter

value

default

fill

颜色值 CSS colour

"grey"

fill-opacity

透明度 0.0 - 1.0

1.0

gamma

伽马值 0.0 – 1.0

1.0

样例



u PolygonPatternSymbolizer :面图案填充符号

parameter

value

default

file

文件路径 path to image file

none

width

图片显示像素宽度 px

4

height

图片显示像素高度 px

4

type

图片类型 (png 或 tiff)

none

样例



u MarkersSymbolizer :主要用于标记道路的方向

样例:

u GlyphSymbolizer :字模符号,用于点显示一个字符

parameter

description

face_name

字体名字

allow_overlap

是否容许压盖

avoid_edges

是否避免边界

halo_fill

字体边线颜色

halo_radius

字体边线半径

value



angle

旋转角度

angle_mode

角度模式,方位角( AZIMUTH ),三角( trigonometric )

char

显示的字符

size

字体大小

RasterColorizer

栅格颜色表

样例





u RasterSymbolizer :用于栅格数据的一些设置,基本不用

parameter

value

description

opacity

0.0 - 1.0

1 is fully opaque while zero is fully transparent and .5 would be 50% transparent

mode

grain_merge, grain_merge2, multiply, multiply2, divide, divide2, screen, hard_light

Compositing/Merging effects with image below raster level (?). The formulas for combinding foreground (raster) and background are: grain_merge: bg + fg - 0.5, grain_merge2: bg + 2*fg - 1.0, multiply: fg * bg, multiply2: 2 * fg * bg, divide: bg / fg, divide2: 2*bg / fg, screen: (1-fg)*(1-bg), hardlight: see [http://docs.gimp.org/en/gimp-concepts-layer-modes.html#id2834930]

scaling

fast, bilinear, bilinear8

fast: nearest neighbour, bilinear: bilinear interpolation for all 4 channels (RGBA), bilinear8 like bilinear, but only one channel assumed

样例





u BuildingSymbolizer :常用于模拟建筑的 3D 效果

parameter

value

default

fill

CSS colour 颜色

"FIXME"

fill-opacity

integer 透明度

"FIXME"

height

integer 阴影高度

“FIXME”

样例



u TextSymbolizer :文本标注符号

name

This is the query field you want to use for the label text, e.g. "street_name"

文本标注使用的属性字段

face_name

Font name (see UsingCustomFonts) ,标注的字体名

fontset_name

? 使用的字体集

size

Font size 字体大小

text_ratio

? 文本旋转角度(点标注有效)

wrap_character

Use this character instead of a space to wrap long names (since r1254) 换行字符(点标注有效)

wrap_width

Length before wrapping long names 换行宽度(点标注有效)

text_convert

Allows conversion of text to lower or upper case before display. Values are "none" (default), "toupper", and "tolower". (since r1254)

字符转换,用于英文字符

line_spacing

Vertical spacing between lines of multiline labels (in pixels) (since r1254)

行间距(点标注有效,在多行文本下)

character_spacing

Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. (since r1254)

字符间距

spacing

Space between repeated labels

周期标注的间隔宽度(线标注有效),当值大于线长度时,不再显示(可选,默认是在线的中心位置绘制一次)

label_position_tolerance

Allow labels to be moved from their point in line placement. Integer value representing distance along a line in line placement mode, defaults to 1/2 min_distance.

Force_odd_labels

Force an odd amount of labels to be generated. Defaults to false. 强制只显示奇数标注

max_char_angle_delta

Maximum angle (in degrees) between two consecutive characters in a label allowed (to stop placing labels around sharp corners) see r365 for more info

两个字符间最大相差角度(用于控制拐角 线拐角标注是否显示)

fill

Color of the text fill, e.g. #FFFFFF 字体颜色

halo_fill

Color of the text halo 字体边线颜色

halo_radius

Radius of the halo in whole pixels (fractional pixels are not accepted) 边线宽度

dx, dy

Displace label by fixed amount on either axis. Also see note at vertical_alignment

X 、 Y 方向的平移大小

avoid_edges

Boolean to avoid labeling near intersection edges

是否避免边界相交的标注(避免边界裁剪)

min_distance

Minimum distance between repeated labels such as street names or shield symbols (works across features, added in r490)

标注的容限距离(判断是在标注的基础上扩大这个距离后在做的判段)

allow_overlap

Allow labels to overlap other labels – Note: you can also clear the label collision cache at the LAYER level to promote more overlap. See ‘clear_label_cache’ at wiki:XMLConfigReference#Layer

是否容许压盖

placement

“line” to label along lines instead of by point

标注类型(点标注或者线标注)

vertical_alignment

Position of label relative to point position (“top” (label on top of point), “middle”, “bottom”) default is “middle” for dy=0, “bottom” for dy>0, “top” for dy<0 (since r1527, “middle” before that)

纵向放置方式, top 放置在点的上方、 middle

居中、 Bottom 放在下方

horizontal_alignment

(Default “middle”) 水平放置对其方式

justify_alignment

(Default “middle”) 多行文本时的文本对齐方式

wrap_before

(Default “false”) ,换行优先级设置, true 为换行符优先

样例



u ShieldSymbolizer :图片与文本组号符号

继承于 TextSymbolizer ,具有 TextSymbolizer 的所有属性,并添加以下属性,常用于国道、省道的道路标注及同时带有图片及文本的点符号标注

height

The height of the shield file (Defaults to image’s height) 图片显示高度

width

The width of the shield file. (Defaults to image’s width) 图片显示宽度

file

The file to use for the shield background ,图片文件路径

opacity

(Default 1.0) 图片显示透明度

type

Type of the shield file, e.g. “png” 图片类型

no_text

(Default “false”) 是否不显示文本

unlock_image

(Default “false) 是否不锁定图片(用于点放置时,图片和文本是否同步对齐)

样例



u FontSet :字体集

字体的集合,样例如下









u Datasource :数据源

样例如下:



poi_lable



GB2312

F:/Beijng/Poi13

shape







u 备注:

当 xml 中含有中文字符时,需要设置 xml 文件编码为 gb2312



改成

你可能感兴趣的:(非技术)