我开始绘制地图。 我想查看一张法国地图,上面有一层可以个性化的图层。
我已经有shapefile格式的自定义图层。 我根本不知道是否必须创建OpenStreetMap服务器,或者是否可以直接使用Web应用程序。
你能否给我一个用我的额外图层shapefile格式来映射显示的起点?
我想这个任务很复杂,但你必须从某个地方开始......
非常感谢你
I started in the mapping. I would like to view a map of France with a layer on top that would be personalized.
I already have the custom layer with shapefile format. I do not know at all if I have to create an OpenStreetMap server or if I can use the web application directly.
Can you give me a starting point for mapping display with my extra layer shapefile format?
I guess the task is complex, but you have to start somewhere by ...
thank you very much
最满意答案
这取决于你想要做什么。 它是一个大的Shapefile吗?
创建一个openlayers地图时,你可以做一些事情:
使用公开的openstreetmap服务器作为背景图块(默认的OSM图层实现),并在OSM中将你的要素图层(点,多边形,任何内容)添加为矢量要素图层。 为了从你的shapefile中获得你的矢量特征,你可以: 以体面的基于GIS的格式将它们预加载到数据库中。 这使您可以在执行边界框查询时提供功能,并且如果您的功能超过1000/10000,则需要此功能。 将shapefile转换为openlayers可读的格式(在浏览器中使用https://github.com/wavded/js-shapefile-to-geojson ,或使用ogr2ogr等工具预先转换它们) 或者,如果您不需要与这些功能进行交互,则可以将数据与OSM数据组合起来,并创建自定义切片。 这对于浏览器来说更轻量级,但它非常复杂(读取数据库中的所有OSM数据,使用mapnik生成拼贴图)It depends on what you want to do. Is it a big Shapefile?
You can do a few things while create an openlayers map:
use the public openstreetmap server for background-tiles (the default OSM Layer implementation) and add your feature layer (points, polygons, whatever is in there) as a Vector feature layer in OSM. To get your vector features out of your shapefile you can: preload them in your database in a decent GIS based format. This allows you to serve your features while doing bounding box queries, and is required if you have more than 1000/10000 features. convert the shapefile to a format readable by openlayers (either in browser using https://github.com/wavded/js-shapefile-to-geojson , or preconvert them with a tool like ogr2ogr) or, if you don't require interaction with these features, you can combine your data with OSM data, and create your custom tiles. This is more light-weight for the browser, but it's quite complex (read all OSM data in a DB, generate tiles with mapnik)更多推荐
发布评论