关于Mapnik渲染OSM地图数据的问题(好心的大神们能帮我解释一下,同样也在学习的朋友希望也能进来一起交流一下!)

好学的小桂子 2014-08-07 04:11:38
本人小白,最近接触OSM和postgresql,之前根据论坛里大神们的教学帖以及热心帮助成功地在windows系统里把OSM数据导入了postgresql数据库,由于机器配置的原因未能导入全球数据planet.osm。通过geoserver访问postgis数据能够发布并预览,但是缺少渲染工具,地图显示效果很差。网上都说用mapnik,而且OSM本身也用的是OSM。学习了论坛里大神分享的方法后也在windows上安装了mapnik,但是具体如何渲染这方面的资料很少,有的也只是在Ubuntu系统下实现的案例。
我的问题是,mapnik到底用在地图服务发布的哪一个环节?
1.是在导入数据库postgresql之前就渲染.osm文件,完成后再导入
2.还是在导入数据库之后mapnik渲染postgis数据;
3还是像Udig那样用mapnik生成一个.sld文件通过geoserver引用这个新建的style文件从而实现渲染
维基上给出的mapnik的例子是渲染shp格式的文件,这个倒是实验成功,而关于mapnik渲染OSM的例子维基上却给了一个.osm.xml文件渲染的例子而且是Ubuntu操作系统的,看的云里雾里。
关于我的这些疑问希望好心的大神们能帮我解释一下,同样也在学习的朋友希望也能进来一起交流一下!
...全文
2075 12 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
Little_Horse_01 2014-10-16
  • 打赏
  • 举报
回复
Little_Horse_01 2014-10-16
  • 打赏
  • 举报
回复
楼主您好,我这里和你一样的情况,将osm数据导入到postgresql中,利用uDig进行样式修改,进行适当的配置,能把一些osm数据区分开来,不知道你最近取得什么进展没有,咱们可以相互交流下。
QQ:83342001
xun398009587 2014-10-15
  • 打赏
  • 举报
回复
引用 1 楼 xzhui 的回复:
我当时也只是用mapnik渲染了shp数据 感觉不管什么数据源和格式,都有一个数据样式配置文件,将样式和数据层指定正确后 就可以渲染出图了 你这里我感觉可能是对数据源指定有点问题。但我没弄过这种格式,帮不上忙
请问我从openstreetmap官网导出的osm数据的数据样式配置文件从哪获得?
好学的小桂子 2014-10-08
  • 打赏
  • 举报
回复
引用 8 楼 liuyuan216814 的回复:
楼主,你好,你做的是室内地图还是室外地图呢,室内地图也需要导入到Postgis database中吗,地图为啥要上传到Postgis database里面呢。刚刚开始研究室内地图,求帮助
我下载的是室外地图,PostGIS是一个空间数据库用来存放和管理数据的,你的数据量要是不大其实也没必要用数据库
liuyuan216814 2014-09-17
  • 打赏
  • 举报
回复
楼主,你好,你做的是室内地图还是室外地图呢,室内地图也需要导入到Postgis database中吗,地图为啥要上传到Postgis database里面呢。刚刚开始研究室内地图,求帮助
好学的小桂子 2014-08-08
  • 打赏
  • 举报
回复
got it !
  • 打赏
  • 举报
回复
引用 5 楼 studiousdavid 的回复:
[quote=引用 3 楼 micropentium6 的回复:] ur post should be moved to GIS section under Enterprise software/development Postgresql with PostGIS is only the store for vector data. I don't think OSM keeps rendered tiles in raster format in PG, although PG supports doing so. The rendition of vector data either happens on the fly, such as the rendition engine in GeoServer for responding http request, or happens beforehand, AKA cache/tile. I am pretty sure that's OSM's approach. This is first time I heard of mapnik. From it's FAQ: It uses the AGG library and offers world class anti-aliasing rendering with subpixel accuracy for geographic data. It is written from scratch in modern C++ and doesn’t suffer from design decisions made a decade ago. AGG is also one of the rendition options (the other one is GD) for MapServer. Mapnik claimed everything was written by C++ from scratch but it's hard to convince me that the developers never browse MapServer source. As for SLD, it's a style file but has the ability to define queries for classifications (thematic map) . SLD file can be introduced in both scenarios I mentioned above.
thx!您这么一说清楚了很多,postgis不能导入渲染后的栅格文件,那么渲染环节就是在入库以后的了[/quote] Postgis actually can store raster data. I just say it is not for OSM data. OSM layer u saw online is tile cached for sure. OSM raw data. --> Postgis database --> mapnik. --> OSM tiles
好学的小桂子 2014-08-08
  • 打赏
  • 举报
回复
引用 3 楼 micropentium6 的回复:
ur post should be moved to GIS section under Enterprise software/development Postgresql with PostGIS is only the store for vector data. I don't think OSM keeps rendered tiles in raster format in PG, although PG supports doing so. The rendition of vector data either happens on the fly, such as the rendition engine in GeoServer for responding http request, or happens beforehand, AKA cache/tile. I am pretty sure that's OSM's approach. This is first time I heard of mapnik. From it's FAQ: It uses the AGG library and offers world class anti-aliasing rendering with subpixel accuracy for geographic data. It is written from scratch in modern C++ and doesn’t suffer from design decisions made a decade ago. AGG is also one of the rendition options (the other one is GD) for MapServer. Mapnik claimed everything was written by C++ from scratch but it's hard to convince me that the developers never browse MapServer source. As for SLD, it's a style file but has the ability to define queries for classifications (thematic map) . SLD file can be introduced in both scenarios I mentioned above.
thx!您这么一说清楚了很多,postgis不能导入渲染后的栅格文件,那么渲染环节就是在入库以后的了
好学的小桂子 2014-08-08
  • 打赏
  • 举报
回复
引用 2 楼 xzhui 的回复:
http://www.cnblogs.com/bluegobin/archive/2010/09/18/1830445.html 上面帖子不知道看过没有,参考一下。。
请问帖子中提到的可以直接绘制OSM的mapnik插件是要单独下载吗?
  • 打赏
  • 举报
回复
ur post should be moved to GIS section under Enterprise software/development Postgresql with PostGIS is only the store for vector data. I don't think OSM keeps rendered tiles in raster format in PG, although PG supports doing so. The rendition of vector data either happens on the fly, such as the rendition engine in GeoServer for responding http request, or happens beforehand, AKA cache/tile. I am pretty sure that's OSM's approach. This is first time I heard of mapnik. From it's FAQ: It uses the AGG library and offers world class anti-aliasing rendering with subpixel accuracy for geographic data. It is written from scratch in modern C++ and doesn’t suffer from design decisions made a decade ago. AGG is also one of the rendition options (the other one is GD) for MapServer. Mapnik claimed everything was written by C++ from scratch but it's hard to convince me that the developers never browse MapServer source. As for SLD, it's a style file but has the ability to define queries for classifications (thematic map) . SLD file can be introduced in both scenarios I mentioned above.
传说中的堕落 2014-08-07
  • 打赏
  • 举报
回复
http://www.cnblogs.com/bluegobin/archive/2010/09/18/1830445.html 上面帖子不知道看过没有,参考一下。。
传说中的堕落 2014-08-07
  • 打赏
  • 举报
回复
我当时也只是用mapnik渲染了shp数据 感觉不管什么数据源和格式,都有一个数据样式配置文件,将样式和数据层指定正确后 就可以渲染出图了 你这里我感觉可能是对数据源指定有点问题。但我没弄过这种格式,帮不上忙

972

社区成员

发帖
与我相关
我的任务
社区描述
PostgreSQL相关内容讨论
sql数据库数据库架构 技术论坛(原bbs)
社区管理员
  • PostgreSQL社区
  • yang_z_1
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧