0 Star 0 Fork 0

chenyj124/shp-to-osm

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
SHP to OSM 0.8.5
Copyright Ian Dees, All rights reserved
20 August 2011
Project website: http://github.com/iandees/shp-to-osm 

Dependencies

 Dependencies are handled by the Maven pom.xml file included. The JAR distributed at the above
 site includes all of the required classfiles to run out of the box.

Rules file

 The rules file is a simple comma-separated text file:
 
 Field:  Description:
      1  The shapefile type to match (outer, inner, line, point)
      2  The source attribute name to match
      3  The source attribute value to match. Can be empty to match all values.
      4  The name of the tag to apply when the source key/value pair match.
      5  The value of the tag to apply. Use a single dash ("-") to use the original value.
 
 As of shp-to-osm 0.8, the rules file can contain an "exclude" rule. It is very similar
to the field list above:

 Field: Description:
      1 The type of OSM primitive (node, way, relation)
      2 The word "exclude"
      3 A tag key to match for exclusion. If this is empty, all untagged elements will
        be excluded from the output OSM file.
      4 A tag value to match for exclusion. If this contains "*", then all elements that
        have the tag key specified in field 3 will be excluded, regardless of value.

 Use the --copyTags argument to copy all the attributes from the shapefile's .dbf to
tags in the resulting OSM file. An optional string argument to --copyTags will add
a prefix to all copied tag. Tags will only be copied if their value is non-empty or
non-null.

Running

 Use the following command line to run the app. Also, you can use the .bat or .sh run files
to issue the same command as long as you give it the same set of arguments. The [-t] at the 
end of the command here is an optional flag to tell the application to only include ways that
have had a tag applied to them. For now, it is required to be at the end of the arguments list.

 java -cp shp-to-osm-0.8.5-with-dependencies.jar com.yellowbkpk.geo.shp.Main
                                  --shapefile <path to input shapefile> \
                                  --osmfile <prefix of the output osm file name> \
                                  [--copyTags <prefix>] \
                                  [--rulesfile <path to rules file>] \
                                  [--outdir <root directory for output>] \
                                  [--outputFormat <osm|osmc>] \
                                  [--maxnodes <max nodes per osm file>] \
                                  [--glomKey <key to glom on (see README)>] \

Glomming

 As of shp-to-osm 0.7, the applications supports what I call "glomming": the ability to connect
ways that share some key/value pair. The command line argument --glomKey specifies a single OSM
tag name that should be used when checking for matches. It is important to note that the glom
key is an OSM tag name, not a shapefile attribute name. The tag must be created by your 
rulesfile or it won't be useable as a glomming key.

 For example, if my shapefile has a large river system where each segment of river is split at
the point where rivers come together, then we can use glomming to connect the ways of rivers that
share similar name (or in the case of NHD data, reachcode) values.

空文件

简介

暂无描述 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chenyj124/shp-to-osm.git
git@gitee.com:chenyj124/shp-to-osm.git
chenyj124
shp-to-osm
shp-to-osm
master

搜索帮助