如何将shapefile转换为基于图块的文件 [英] How to convert shapefile to tile based file

查看:78
本文介绍了如何将shapefile转换为基于图块的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个基于Map的iPhone应用程序,其中我必须根据该设备的当前位置绘制任何特定区域的地图. 客户端向我提供了.shapefile,该文件由所有坐标和数据组成,用于绘制地图. 我们可以将形状文件存储在服务器上,我想用.shapefile上显示的数据在设备上绘制地图,我需要具有不同缩放级别的图块.因此,在服务器端,我必须将.shapefile转换为基于图块的文件. 但我不知道该如何进行转换. 谁能指导我?

I am developing a Map based iPhone application where I have to draw a map of any specific region depending upon the current location of that device. Client is supplying me the .shapefile consisting of all the co-ordinates and data to draw the map. We can store the shape file on the server and i think to draw the map on device with the data presented on .shapefile I need the tiles with different zoom level. So on the server side I have to convert the .shapefile into tile based file. But I don't know how to do that conversion. Can anyone please guide me?

先谢谢了. 丽兹

推荐答案

工作量很大.

首先,shapefile仅定义几何图形-您需要确定特征的外观.它们是点,线还是多边形?您是否希望它们全部使用相同的颜色,或者取决于它们的属性?

First, shapefiles only define the geometry - you need to decide what the features are going to look like. Are they points, lines, or polygons? Do you want them all in the same colour, or depending on their attributes?

然后获取mapnik或TileMill并学习如何使用它.您是否只想显示shapefile,还是要在底图上显示它?在这种情况下,您将必须生成透明的图块集并在应用程序中进行栅格图像叠加.

Then get mapnik or TileMill and learn how to use that. Do you just want to present the shapefile, or do you want that on a base map? In which case you'll have to generate a transparent tile set and do raster image overlays in your application.

是整个世界吗?并具有与Google Maps缩放相同的分辨率?获得大量的磁盘存储空间.

Is it the whole world? And to the same resolution as Google Maps zooms? Get a big bank of disk storage.

http://mapbox.com/tilemill/

http://mapnik.org/

我个人希望将shapefile转换为可以在客户端上呈现的矢量形式-也许是GeoJSON.然后服务.

Personally I'd look into converting the shapefile into a vector form that you could render on the client - GeoJSON perhaps. Then serve that.

这篇关于如何将shapefile转换为基于图块的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆