【译】QGIS培训手册-样式(4)

3.2.12. hard 跟我做:创建一个自定义的SVG填充(FOLLOW ALONG: CREATING A CUSTOM SVG FILL)

Note

注意,你需要首先安装一个免费的矢量编辑软件Inkscape,才能继续下面的练习。【译者注:如果你有illustrator、CorelDRAW等矢量软件,也可的。我到网上找了两个Inkscape的安装包,都打不开,装不上,所以没有试验过。】(To do this exercise, you will need to have the free vector editing software Inkscape installed.)

  • 启动Inkscape程序。(Start the Inkscape program.)

你会看到以下界面:(You will see the following interface:)

../../../_images/inkscape_default.png

你会看到它跟其他的一些矢量软件,比如Corel等类似。(You should find this familiar if you have used other vector image editing programs, like Corel.)

首先,我们把画布调整为适合小符号纹理的尺寸。(First, we’ll change the canvas to a size appropriate for a small texture.)

  • 点击菜单中的文件>文档属性。然后会填出文档属性对话框。(Click on the menu item File Document Properties. This will give you the Document Properties dialog.)
  • 将单位设置为像素(px。(Change the Units to px.
  • 将宽度和高度设置为 100。(Change the Width and Height to 100.)
  • 设置完后就关闭该对话框。(Close the dialog when you are done.)
  • 点击菜单上的视图>缩放>页面,来将视窗缩放到我们刚刚设置的页面上。(Click on the menu item View Zoom Page to see the page you are working with.)
  • 选择椭圆工具。(Select the Circle tool:)

../../../_images/inkscape_circle_tool.png

  • 按下ctrl  键,拖动椭圆工具来绘制一个正圆。(Click and drag on the page to draw an ellipse. To make the ellipse turn into a circle, hold thectrl button while you’re drawing it.)
  • 在所绘制的圆形上右键,打开填充画笔选项。(Right-click on the circle you just created and open its Fill and Stroke:)
  • 将填充和描边样式设置为下图所示:(Change the Stroke paint to a pale grey-blue and the Stroke style to a darker color with thin stroke:)

../../../_images/inkscape_stroke_fill.png

  • 用直线工具来绘制一条线:(Draw a line using the Line tool:)
  • 先点一下表示开始绘制直线,按下ctrl 键来保证直线偏移能以15度角的倍数变化。【译者注:目的是为了绘制出横平竖直的线条】(Click once to start the line. Hold ctrl to make it snap to increments of 15 degrees.)
  • 再点一下就绘制了一个线段,然后右键来完成直线的绘制。(Click once to end the line segment, then right-click to finalize the line.)
  • 改变直线的颜色和宽度,使之与之前的园的样式匹配,并对其进行适当移动,使之看起来这样:(Change its color and width to match the circle’s stroke and move it around as necessary, so that you end up with a symbol like this one:)

../../../_images/inkscape_final_symbol.png

  • 将其保存在exercise_data/symbols目录下,新建一个landuse_symbol  的文件夹,并保存为SVG格式。(Save it as landuse_symbol under the directory that the course is in, underexercise_data/symbols, as an SVG file.)

回到QGIS:(In QGIS:)

  • 打开landuse 图层的图层属性。(Open the Layer Properties for the landuse layer.)
  • 按照下图所示,通过浏览按钮来加载刚刚制作的svg图像,来改变图层的符号样式。(Change the symbol structure to the following and find your SVG image via the Browsebutton:)

../../../_images/svg_symbol_settings.png

并按下面改变svg图层的边框:(You may also wish to update the svg layer’s border:)

../../../_images/svg_layer_border.pnglanduse图层,现在会看起来是这个样了:(Your landuse layer should now have a texture like the one on this map:)

../../../_images/svg_symbol_result.png

3.2.13. 总结(IN CONCLUSION)

通过改变不同图层的符号样式可以将原来的矢量文件集合转变为一副清晰的地图。不但能看懂地图的内容,而且地图样式也很好看!(Changing the symbology for the different layers has transformed a collection of vector files into a legible map. Not only can you see what’s happening, it’s even nice to look at!)

3.2.14. 进阶阅读(FURTHER READING)

Examples of Beautiful Maps(这是一个国外的论坛链接,里面有好多漂亮的地图制作分享)

3.2.15. 下节提要(WHAT’S NEXT?)

通过更改整个图层的符号是有用的,但对读图者来说,每一层内包含的信息仍不可用。街道是叫什么名字?这个地方是属于哪个行政区域?农场的占地面积是多大?所有这些信息仍然是隐藏的。下一课中将解释如何将数据标示在你的地图上。(Changing symbols for whole layers is useful, but the information contained within each layer is not yet available to someone reading these maps. What are the streets called? Which administrative regions do certain areas belong to? What are the relative surface areas of the farms? All of this information is still hidden. The next lesson will explain how to represent this data on your map.)

Note

本节课中你养成经常保存的习惯了吗?Did you remember to save your map recently?

发表评论

电子邮件地址不会被公开。 必填项已用*标注

填写验证码: *