Giter VIP home page Giter VIP logo

Comments (6)

boldtrn avatar boldtrn commented on June 22, 2024 1

I tried this and always received an exception. I just used the example transform file found here.

I then moved the --tt call from the mapwriter call to the merge call like this:

# Merge

CMD="$OSMOSIS_HOME/bin/osmosis --rb file=$WORK_PATH/$NAME-latest.osm.pbf \
                               --rx file=$WORK_PATH/sea.osm --s --m"
for f in $WORK_PATH/land*.osm; do
  CMD="$CMD --rx file=$f --s --m"
done
[ $MAP_TRANSFORM_FILE ] && CMD="$CMD --tt file=$MAP_TRANSFORM_FILE"
CMD="$CMD --wb file=$WORK_PATH/merge.pbf omitmetadata=true"
echo $CMD
$CMD

This seems to work. It looks like it's not possible to use tag transform together with mapwriter in one call? BTW: I used the latest mapwriter. Below you can find the transform file I used.

<?xml version="1.0"?>
<translations>
 
  <translation>
    <name>Simplify Access</name>
    <description>Simplifies the access restrictions to yes/no. We could limit for specific keys, but lets live dangerously.</description>
    <match mode="or">
      <tag k=".*" match_id="yes" v="true|designated|public|permissive"/>
      <tag k=".*" match_id="no" v="false|private|privat"/>
    </match>
    <output>
      <copy-all/>
      <tag from_match="yes" v="yes"/>
      <tag from_match="no" v="no"/>
    </output>
  </translation>
  
</translations>

from mapsforge-creator.

devemux86 avatar devemux86 commented on June 22, 2024 1

Thanks for the report!

It's usable with map-writer, I pushed the fix.
Had to improve Osmosis tasks pipeline in that call. 🙂

from mapsforge-creator.

devemux86 avatar devemux86 commented on June 22, 2024

Thanks for the very nice suggestion!

TagTransform plugin is now integrated in Osmosis built-in tasks, so can use it via --tag-transform (--tt) option.
I'll add an environment variable to make its use convenient.

from mapsforge-creator.

boldtrn avatar boldtrn commented on June 22, 2024

Thanks, I will have a look with the next import :).

from mapsforge-creator.

ravivarmahattaraki avatar ravivarmahattaraki commented on June 22, 2024

I am stuck with below exception please help me out

java.lang.RuntimeException: more than 15 tags aren't supported
at org.mapsforge.map.writer.MapFileWriter.infoBytePoiLayerAndTagAmount(MapFileWriter.java:455)
at org.mapsforge.map.writer.MapFileWriter.processPOI(MapFileWriter.java:517)
at org.mapsforge.map.writer.MapFileWriter.processTile(MapFileWriter.java:861)
at org.mapsforge.map.writer.MapFileWriter.writeSubfile(MapFileWriter.java:977)
at org.mapsforge.map.writer.MapFileWriter.writeFile(MapFileWriter.java:375)
at org.mapsforge.map.writer.osmosis.MapFileWriterTask.complete(MapFileWriterTask.java:113)
at org.openstreetmap.osmosis.tagtransform.impl.TransformHelper.complete(TransformHelper.java:95)
at crosby.binary.osmosis.OsmosisBinaryParser.complete(OsmosisBinaryParser.java:35)
at org.openstreetmap.osmosis.osmbinary.file.BlockInputStream.process(BlockInputStream.java:37)
at crosby.binary.osmosis.OsmosisReader.run(OsmosisReader.java:45)
at java.base/java.lang.Thread.run(Thread.java:832)

from mapsforge-creator.

devemux86 avatar devemux86 commented on June 22, 2024

For questions and reports please use the Discussions.

java.lang.RuntimeException: more than 15 tags aren't supported

The message is quite explanatory, you cannot store more than 15 tags per element.
(more details in the old forum)

from mapsforge-creator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.