Help editing style to make the map smaller

Help
2012-07-19
2013-05-29
1 2 > >> (Page 1 of 2)
  • john3voltas
    john3voltas
    2012-07-19

    Hello there.
    I've got a crappy S40 Nokia 5220 phone which keeps trying to "free mem" all the time and some times it even crashes with a "not enough memory" error message.
    I am trying my best to make it work with GpsMid and I've noticed that when it finds a part of the map that doesn't have many "elements/ways/pois" it actually runs fine for a while.
    So I thought about cutting all the unnecessary POI's from the map to improve the phone's efficiency.
    All I need is cities, roads, streets and their names for routing purposes. Maybe I could include pharmacies and hospitals because this is for my wife's phone.
    Can someone help me edit the mini-style-file.xml that comes with osm2gpsmid to achieve my goal?
    Or maybe my idea is useless in your opinion and not worth to try?
    Thanks a bunch.
    Cheers

     
  • sk750
    sk750
    2012-07-19

    Hi,

    simply remove the keys / keyWs from the style file not needed.

    However I recommend to do this based on style-file.xml rather than mini-style.xml as I'm not sure all relevant changes made it there.

    To reduce the midlet size further also set e.g. "useRouting = motorcar, bicycle" in .properties if you do not need foot routing.

    sk750

     
  • Libor Striz
    Libor Striz
    2012-07-25

    There exists also ( on GPSMid wiki I guess ) a Reduce style XML, that provides even smaller files than Mini style.

     
  • Libor Striz
    Libor Striz
    2012-07-26

    Winmerge and/or regex processing scripts help here a lot.

     
  • Libor Striz
    Libor Striz
    2012-07-26

    I agree.

    My note was meant for end user self tweaking.
    For frequent style changes, manual way of porting to other styles would be slave work.

    I will see if I ma able to provide publicly usable html-js-regex to process style-file.xml.
    e.g. JS could removed defined list of items based on provided hierarchical tags.

     
  • Libor Striz
    Libor Striz
    2012-07-26

    I tried to update Reduced style, according to Style-file, but what to do with it to provide it to community ?
    The GIT is rather a black box for me,

     
  • sk750
    sk750
    2012-07-26

    Great, can you provide it in patches? Then I can put it in git.

     
  • Libor Striz
    Libor Striz
    2012-07-27

    OK, I will when I got to the computer where I saved it  :)

     
  • Libor Striz
    Libor Striz
    2012-07-27

    I have updated and tested also Street style
    https://sourceforge.net/tracker/?func=detail&aid=3549843&group_id=192084&atid=939976

    To compare midlet sizes of my city are near area.

    Normal Style file midelt 8.4 MB ( with housenumbers )
    Reduced Style file 2.9 MB
    Street style 1.9 MB

    About 0,9 MB of midlet program code has to be subtracted to compare map sizes, so it would be like

    Normal Style file midlet 7.5 MB ( with housenumbers )
    Reduced Style file 2.0 MB
    Street style 1.0 MB

     
  • john3voltas
    john3voltas
    2012-07-30

    This is very interesting.
    So, GpsMid-Generic-full-0.7.7-map69.jar is 980KB.
    And GpsMid-Generic-full-0.7.76-map71 is 1954KB? That's more than 1000KB size difference…
    Can someone explain why?
    I am looking forward to try this new reduced style.
    Is it already available on osm2gpsmid nightlies? If not, then how can I test it?
    Thanks in advance.
    Cheers

     
  • sk750
    sk750
    2012-07-30

    Can you please look in both jars with a zip utility to find out where the size difference comes from. Shouldn't be like that I guess.

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-07-30

    The huge icons, added in April, in current snapshot seem to take 783706 bytes:

    unzip -l dist/GpsMid-Generic-editing-0.7.76-map71.jar|grep huge|awk '{ sum += $1 } END { print sum }'
    783706

    The files also don't seem to compress much, so those account for the majority of the increase.

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-07-30

    The large icons added at the same time seem to take the rest of 1M:

    unzip -l dist/GpsMid-Generic-editing-0.7.76-map71.jar|grep large|awk '{ sum += $1 } END { print sum }'
    343212

    When midlet is built with Osm2GpsMid, only the selected icons are included.

     
  • sk750
    sk750
    2012-07-30

    Are the GpsMid-Generic-*.jar files no more created by Osm2GpsMid for bundling a small map? Well, probably not as otherwise the unnecessary icons would get deleted?

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-07-30

    I was looking at the GpsMid-Generic-*.jar which are put into Osm2GpsMid* for the snapshot, and obviously that has to have the full jars with all icons so the user can choose from all.

    There are no independent GpsMid-Generic-*.jar files distributed separately from the Osm2GpsMid jar for snapshots or release candidates, but apparently there's a practice among snapshot testers of unzipping a GpsMid jar from Osm2GpsMid to test snapshots.

    For release, my understanding is the plan is to bundle the small map with Osm2GpsMid to create separate GpsMid-Generic-*.jar files.

     
  • john3voltas
    john3voltas
    2012-07-31

    Now I understand where the difference in filesize comes from.
    But I am looking forward to try this new reduced style.
    Is it already available on osm2gpsmid nightlies?
    If not, then how can I test it?
    Thanks in advance.
    Cheers

     
  • sk750
    sk750
    2012-07-31

    Yes, it's in the nightlies.

     
  • john3voltas
    john3voltas
    2012-07-31

    Just tried to create zip map from Portugal using today's nightly with the reduced style.
    Although I picked up some errors, in the end O2G said that the map was created successfully.
    Here are the error messages:

    Triangulating outline 4611686018427389310 looped 5000 times
    ERROR: Numeric overflow of longitude for node: 593230935, trying to handle
    ERROR: Numeric overflow of longitude for node: 593230813, trying to handle
    

    Is it bad?
    Or can I safely ignore these? What exactly does this mean?
    Regards

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-07-31

    Shouldn't be too bad, could be some long ways with few nodes (e.g. ship routes) are not correct on the map. Meaning is that there's an overflow of internal variable, typically this is caused by something like this.

     
  • sk750
    sk750
    2012-08-01

    > The files also don't seem to compress much, so those account for the majority of the increase.

    Actually most of the pngs take up compressed more space than uncompressed, so it might make sense to add png to dontcompress by default.

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-08-01

    Good idea, though I was talking file sizes in the jar as produced by J2MEPolish, don't know if there's a way to make J2MEPolish not compress pngs.

     
  • john3voltas
    john3voltas
    2012-08-01

    So, the space used by the icons just increment on the jar filesize. That actually doesn't mean that the jar will use more ram memory on the phone, right? Meaning it will just use up more memory card space than before.

     
1 2 > >> (Page 1 of 2)