资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

gis切片技术 arcgis切片tpk

arcgis切片数据过大

再导出一次就好了。

10多年的枣阳网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。成都全网营销的优势是能够根据用户设备显示端的尺寸不同,自动调整枣阳建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。成都创新互联从事“枣阳网站设计”,“枣阳网站推广”以来,每个客户项目都认真落实执行。

大数据量矢量数据的可视化需要解决的问题,就是如何在可接受的短时间内,能展示大数据量的矢量地图。切片是预先渲染的数据集,也是响应最快的展示方式。目前ArcGIS提供栅格切片和矢量切片两种切片格式。这两种切片格式各有利弊。

只有栅格切片才能支持展示全部数据。

ArcGIS+deck.gl矢量切片三维化表示建筑白模

deck.gl YYDS!

很多ArcGIS API for JavaScript的用户想要ArcGIS的矢量切片技术体系实现Mapbox gl将城市建筑物footprint矢量切片三维化成建筑白模的效果。效果如图:截图来自 mapbox studio 。但目前仅靠ArcGIS VectorTileServer 和 ArcGIS API for JavaScript本身无法达到这样的效果。

ArcGIS API for JavaScript先前与deck.gl已经可以通过多种方式很好的结合。参考:《 ArcGIS API 场景添加 3D Tiles 》、《 ArcGIS与deckgl结合的不同模式 》。那么我们可以去看一下deck.gl能不能利用mapbox gl矢量切片三维化的这个优势。

deck.gl与Mapbox标准的矢量切片有两种结合模式。一个是采用Mapbox底图作为程序全局底图。如: 示例程序 1

优点:可以使用托管在Mapbox gl官网的样式,直接调用Mapbox studio中创作的三维化底图。方便、美观。

缺点:1.web程序底图全局变为了mapbox底图,deck.gl被夺舍了,无法作为单一图层与ArcGIS的场景视图进行结合。

       2.mapbox服务器在外网,并且商用要收费。已经采购了ArcGIS作为内网服务器的用户没有必要额外采购和修改地图制作技术路线。

另一个技术路线是添加MVTLayer作为一个业务图层。如: 示例程序2

优点:1.作为单图层,可以借助ArcGIS + deck.gl的官方结合方式在ArcGIS地图视图和场景视图去直接使用。

       2.既支持开源生态常用的.mvt格式的矢量切片,也支持ArcGIS为代表的.pbf格式的矢量切片。直接支持ArcGIS发布的VectorTileServer。

缺点:1.在渲染层面,MVTLayer不能加载完整矢量切片style.json样式文件。只能通过deck.gl继承的GeoJSONLayer和TileLayer以及Layer的一些属性进行很有限的前端渲染。不能支持完整的 mapbox矢量切片样式标准 。

        2.在数据层面,只能一次性加载全部矢量切片服务下的子图层。在全部图层加载完毕之前,无法进行子图层的过滤。如果后端采用Mapbox世界地图{z}/{x}/{y}.mvt?access_token=token,那么会造成大量数据冗余(Mapbox过滤图层的机制是style.json样式)。如果使用ArcGIS发布的矢量切片服务,我们只需把建筑物footprint单独发布为一个服务即可。

另外:关于type:fill-extrusion的mapbox标准样式,deck.gl其实是不支持的。但他支持 GeoJSONLayer 使用extruded:true + getElevation:number的方式设置根据属性拉伸高度。

服务发布前设置建筑footprint要素类的高度字段高亮。该属性才能被写入矢量切片中。

采用默认的ArcGIS Online切片方案,将建筑物footprint图层发布矢量切片服务。

在REST点击start tile获得切片地址为:

改写为通用的{z}/{y}/{x}.pbf

以ArcGIS VectorTileServer为数据源。以 实例程序2 为蓝本,改写地址,添加一些属性。

设置名为footprint的子图层颜色为[218,218,218]。还可以设置成RGBA透明效果,如[218,128,218,128]

设置拉伸生效extruded:true,设置拉伸高度值为矢量切片的属性字段Z_Max的值。

设置最小可见比例13级。用来减少产生无切片的404请求。根据实际数据设置。

设置最大可见比例15级。用来避免出现放大和平移时建筑物消失的现象。根据实际数据情况设置。

设置继承自TileLayer的属性extent : [minX, minY, maxX, maxY]。

效果如下:

在DeckRenderer创建时设置参数getTooltip:info={ }

在layer中加入pickable:true

传统的ArcGIS API 场景视图表达三维需要使用建模转mutipatch发布SceneServer的方式 或 二维矢量面FeatureServer拉伸样式的方式。

ArcGIS+deck.gl矢量切片三维化表示建筑白模的技术路线为ArcGIS API场景视图表达三维白模增加了借助VectorTileServer的新的方式。

给ArcGIS 矢量切片增加了前端获得属性和几何的功能。

Postgis 矢量切片优化

Postgis生成矢量切片主要使用以下两个方法

geometry **ST_AsMVTGeom**( geometry var class="pdparam" style="color: rgb(153, 0, 0);"geom/var, box2d var class="pdparam" style="color: rgb(153, 0, 0);"bounds/var, integer var class="pdparam" style="color: rgb(153, 0, 0);"extent=4096/var, integer var class="pdparam" style="color: rgb(153, 0, 0);"buffer=256/var, boolean var class="pdparam" style="color: rgb(153, 0, 0);"clip_geom=true/var ) ;

Transform a geometry into the coordinate space of a Mapbox Vector Tile of a set of rows corresponding to a Layer. Makes best effort to keep and even correct validity and might collapse geometry into a lower dimension in the process.

geom is the geometry to transform.

bounds is the geometric bounds of the tile contents without buffer.

extent is the tile extent in tile coordinate space as defined by the specification . If NULL it will default to 4096.

buffer is the buffer distance in tile coordinate space to optionally clip geometries. If NULL it will default to 256.

clip_geom is a boolean to control if geometries should be clipped or encoded as is. If NULL it will default to true.

row row data with at least a geometry column.

name is the name of the layer. Default is the string "default".

extent is the tile extent in screen space as defined by the specification. Default is 4096.

geom_name is the name of the geometry column in the row data. Default is the first geometry column.

feature_id_name is the name of the Feature ID column in the row data. If NULL or negative the Feature ID is not set. The first column matching name and valid type (smallint, integer, bigint) will be used as Feature ID, and any subsequent column will be added as a property. JSON properties are not supported.

如果通过pg生成切片时间过长可以尝试减少两个函数的extent参数

比如默认是4096,可以改为512 可以明显提高计算速度,同时减少前端消耗


本文标题:gis切片技术 arcgis切片tpk
文章分享:http://cdkjz.cn/article/doedjji.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

业务热线:400-028-6601 / 大客户专线   成都:13518219792   座机:028-86922220