iandees/shp-to-osm

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

Opened this issue · 2 comments

  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.

For b), I made #7

leadq commented

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 ?