【ArcGIS Runtime SDK for Android-04】Layers and tables

本文探讨了ArcGIS Runtime中图层的使用,包括基础地图图层与操作图层的角色,图层的常见属性,以及如何根据用户需求选择合适的图层类型。同时,文章还讨论了图层性能考虑因素,如矢量与栅格数据的区别,以及动态和切片图层的优劣。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

图层显示地图或场景中的地理数据。地图和场景是图层和表的容器。表是数据的来源;表中的地理数据可以由某些类型的图层使用。Runtime支持多种类型的图层。

layer displays geographic data in a map or scene. Maps and scenes are containers for layers and tables. A table is a source of data; geographic data in tables can be consumed by some types of layers. Runtime supports many types of layers.

图层在你的地图中有两种角色:

  • 基础地图图层(Basemap layers )provide context for the information in your map. For example, the imagery or street map backgrounds on consumer mapping services are basemaps.
  • 操作图层(Operational layers): contain the primary content of the map. For example, a layer with all of the gas stations nearby would be an operational layer.

在Runtime中图层能够被当作操作图层或者基础地图图层,你可以灵活地使用图层。图层定义信息如何显示。它们可以使用来自表、本地文件或远程服务的数据。如果只需要在地图上放置点,或者使用没有底层模型(underlying model)的临时数据,那么可以考虑使用图形(graphic)。

一、Layer

1、常见的图层属性

所有的图层都支持以下常见特性:

  • Name — a human-readable name
  • Description — a human-readable description of the layer's content
  • Extent — the geographic area that contains the layer's content
  • Spatial reference — defines how coordinates should be interpreted. See Spatial references for more information.
  • Visibility — lets you hide or show the layer without removing it from the map.
  • Scale range — controls layer visibility based on how far the user has zoomed into the map using the MinScale and MaxScale properties.
  • Opacity

2、为地图选择图层

当为应用程序选择图层类型时,可以考虑以下问题:

  • Do users need to compare data with a time component?
  • Do users have an always-on internet connection?
  • Do users need to be able to query, analyze, or select data?
  • Do users need to be able to edit layer content
  • Do you or your users need control over the style (colors, fill patterns, icons, etc.) of the layer?
  • Does your app need to interoperate with other systems or ArcGIS Portal?

(1)选择基础地图图层

基础地图是地图的基础,为数据提供背景,定义地图整体风格。选择正确的基础地图能够:

  • Align your map with your brand
  • Help tell your story
  • Make your map layers and graphics easier to see and understand
  • Make your app feel like a part of your user's Geographic Information System (GIS) when your app connects to portal

在ArcGIS Online上有许多有吸引力的基础地图。如果您正在创建编辑或浏览体验,您的用户可能已经习惯于通过门户使用某些基础地图。此外,您可以在用户的ArcGIS门户中获得一组功能基本地图,也可以发布您自己的基础地图或自定义现有矢量基础地图的样式。

补充:

下图归纳了ArcGIS Runtime 支持的图层类型以及各个图层支持的数据源、渲染方案等信息,具体如下:

3、时态感知(Time-aware)图层

虽然所有图层都支持地理信息,但是时间感知图层也支持时间信息。当一个图层支持时间,你可以:

  • 根据时间过滤图层内容
  • 使用时间偏移量比较数据

4、Image adjustment layers

Image adjustment layers allow you to change brightness, contrast, and gamma for imagery. See Layer types described for more information

5、图层性能考虑

(1)矢量&栅格数据

矢量和栅格数据是展示和管理地理数据的两种主要格式。

  • Vector — data is described by points, lines, and polygons (vectors). The client renders the vector content into raster images for display on the device.
  • Raster — data is transmitted via pre-rendered images; the client doesn't have information about the underlying features that were rendered into the image.

因为矢量图层是在设备上呈现的,所以它们总是非常适合客户端显示的大小和分辨率。矢量数据也非常小,非常适合离线或在低带宽环境中使用。矢量不适合表示来自栅格源(如卫星图像)的数据。

一些基础地图结合栅格和矢量数据,例如:ArcGIS Online的world images with streets (vector) 基础地图使用栅格切片图层作为图像,矢量图层作为要素和标注。这确保了显示栅格图像时,要素和标注总是清晰的。

(2)动态和切片图层

服务可以采用两种方法之一来提供数据。

  • Dynamic — Generate a map for each request based on information provided by the client, like desired image size & extent.
  • Tiled — Generate tiles ahead of time, then serve them as needed by the client.

因为动态地图是根据需要生成的,所以它们更适合于具有经常更改的数据的地图。动态地图的缺点是它们需要更多的服务器资源——渲染地图图像是一项昂贵的操作。对于不经常更改的内容,切片服务更合适。

二、表(Tables)

Tables provide a source of data that can be worked with directly, or perhaps displayed in a feature layer. Tables in ArcGIS define a schema for features – a consistent set of fields that features are expected to have. Tables can have many features. Entries in spatial tables can have geometries. Tables can come from several sources:

 

  • Shapefiles
  • Geopackages
  • Maps
  • Feature services
  • Geodatabases

表的功能:

  • Queried
  • Edited (depending on the source)
  • Shown in a feature layer
  • Taken offline

补充:Non-spatial tables

Non-spatial tables are just like other tables, except they don't have a geometry column. Because they don't have geometry, they can't be rendered in a layer. Although non-spatial tables can't be rendered, they can still be added to maps as data sources for querying. Features (entries) in spatial tables can be related to the features in non-spatial tables. Non-spatial tables are represented by the same Runtime types as spatial tables.

 

1、Table performance concepts

A table might have hundreds of thousands of features. How your app requests features from the table is a performance-critical decision.

When working with tables that come from a service (rather than a local file), feature request modes control how often features are retrieved and how they are cached. There are three feature request modes:

  • On interaction cache (default) 
  • Manual cache 
  • On interaction, no cache

参考链接:

https://developers.arcgis.com/android/latest/guide/layers.htm

https://developers.arcgis.com/android/latest/guide/layer-types-described.htm

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值