六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 340|回复: 0

SLD 样式 之GeoServer中设计2.5维建筑物

[复制链接]

升级  56%

42

主题

42

主题

42

主题

秀才

Rank: 2

积分
134
 楼主| 发表于 2012-10-25 00:54:33 | 显示全部楼层 |阅读模式
昨天GIS群里谈论到在GeoServer中创建google 、百度地图中的伪三维建筑物如:

几番搜索,geoserver中用SLD的isometric可以实现这种效果:
isometricgeometry:Geometry,extrusion:DoubleReturns a multi-polygon containing the isometric extrusions of all segments part of the original geometry. The extrusion distance is extrusionand it’s assume to be expressed in the same unit as the geometry coordinates. Can be used to get a cheap pseudo-3d map effect
具体的SLD文件为如下
<?xml version="1.0" encoding="UTF-8"?><StyledLayerDescriptor version="1.0.0"  xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"  xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">  <NamedLayer>    <Name>alt-buildings</Name>    <UserStyle>      <FeatureTypeStyle>        <Rule>          <PolygonSymbolizer>            <Geometry>              <ogc:Function name="isometric">                <ogc:PropertyName>geom</ogc:PropertyName>                <ogc:Literal>0.0001</ogc:Literal>              </ogc:Function>            </Geometry>            <Fill>              <CssParameter name="fill">#7B8F96</CssParameter>              <CssParameter name="fill-opacity">1</CssParameter>            </Fill>          </PolygonSymbolizer>          <PolygonSymbolizer>            <Geometry>              <ogc:Function name="offset">                <ogc:PropertyName>geom</ogc:PropertyName>                <ogc:Literal>0</ogc:Literal>                <ogc:Literal>0.0001</ogc:Literal>              </ogc:Function>            </Geometry>            <Fill>              <CssParameter name="fill">#BAD8E2</CssParameter>              <CssParameter name="fill-opacity">1</CssParameter>            </Fill>          </PolygonSymbolizer>         </Rule>      </FeatureTypeStyle>      </UserStyle>  </NamedLayer></StyledLayerDescriptor>
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表