android+spatialite数据离线存储涉及的工具包

1、spatialite操作手册:http://www.gaia-gis.it/spatialite-2.1/SpatiaLite-manual.html

spatialite支持的格式:

  • Well-Known Text (WKT) format
  • Well-Known Binary (WKB) format
  • Internal BLOB format [the one used by SpatiaLite to store geometries in SQLite columns]

SELECT AsText(geometry) FROM table;这就把数据读取出来

2、GeometryEngine 参考:http://help.arcgis.com/en/arcgismobile/10.0/apis/android/api/com/esri/core/geometry/GeometryEngine.html

jsonToGeometry

public static MapGeometry jsonToGeometry(org.codehaus.jackson.JsonParser json)
Imports the MapGeometry from it's JSON representation. M and Z values are not imported from JSON representation.  
Parameters:
json - The JSON representation of the geometry (with spatial reference).
Returns:
The MapGeometry instance containing the imported geometry and it's spatial reference.
 

3、想法:数据存在spatialite里面,用SELECT AsText(geometry) FROM table选取出来,然后把WKT专成json,最后用jsonToGeometry生成Geometry实现地图的绘制。

posted @ 2013-03-31 10:49  rovoqo  阅读(1104)  评论(0编辑  收藏  举报