Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--rulesfile is marked [optional] in usage, but is actually required #6

Open
Piskvor opened this issue Jun 3, 2016 · 2 comments
Open

Comments

@Piskvor
Copy link

Piskvor commented Jun 3, 2016

  1. build shp-to-osm-0.8.8-SNAPSHOT-jar-with-dependencies.jar
  2. try running it:

java -jar ./shp-to-osm-0.8.8-SNAPSHOT-jar-with-dependencies.jar --outputFormat osm --shapefile somefile.shp --osmfile otherfile.shp
3. get error:

Missing one of the required file paths.
usage: java -cp shp-to-osm.jar [--glomKey <key>] [--rulesfile <RULESFILE>]
       --osmfile <OSMFILE> [--maxnodes <nodes>] [--copyTags <prefix>]
       [--outputFormat <format>] --shapefile <SHPFILE> [--outdir <OUTDIR>]
    --copyTags <prefix>       Copy all shapefile attributes to OSM tags
                              verbatim, with an optional prefix.
    --glomKey <key>           The key to 'glom' on. Read the README for
                              more info.
    --maxnodes <nodes>        Maximum elements per OSM file.
    --osmfile <OSMFILE>       Prefix of the output file name.
    --outdir <OUTDIR>         Directory to output to. Default is working
                              dir.
    --outputFormat <format>   The output format ('osm' or 'osmc'
                              (default)).
    --rulesfile <RULESFILE>   Path to the input rules file.
    --shapefile <SHPFILE>     Path to the input shapefile.

By trial and error, I have determined that --rulesfile is actually mandatory. Therefore, it shouldn't be in brackets - that's a commonly used syntax for "optional parameter".

What to do? Either a) fix the program to not require rulesfile, or b) fix the docs to show rulesfile as required.

@Piskvor
Copy link
Author

Piskvor commented Jun 3, 2016

For b), I made #7

@leadq
Copy link

leadq commented May 24, 2017

Friends, i dont actually understand the usage. I got the same errorlog with trying
java -jar ./shp-to-osm-0.8.8-SNAPSHOT-jar-with-dependencies.jar --outputFormat osm --shapefile ./Road.shp --osmfile Road1
How should i design rules file and what format should i assign postfix for rules file? I am trying to transform Road.shp and I want all attributes it has. I tried " line , , , - " but i guess this is wrong. Any idea ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants