Comments (7)
Thanks for the report, this is indeed a rather major problem. I've reported it upstream with the osm4j library (issue #11), I hope we can collaborate to resolve this.
I've also attached a small example to reproduce the problem to the upstream issue.
from osm2world.
Hey, I've added a test in osm4j as reported in the upstream issue and was not able to reproduce the problem.
I've taken a look at OSM2World's code and it looks like your completely rewriting the file in case it has detected that it has been created by JOSM here
Is it possible that something is going wrong with the charsets during that conversion?
Could you take a look at the temporary file created from the example file?
from osm2world.
Looks like that piece of code converts the emoji to this: user="account with emoji 😎"
from osm2world.
I can still read that modified file in my test though...
from osm2world.
That's interesting!
I'm indeed rewriting files which have been generated by JOSM because (I believe) osm4j does not have built-in support for the JOSM dialect of OSM XML with additional attributes such as action=delete
.
For some reason, I did not initially have that on my radar as a possible cause – but I now believe that it's likely to be involved because OSM2World is able to read the problem files if I change the generator
attribute (and therefore disable my JOSM-specific code).
I'll investigate further and report the results.
from osm2world.
I'll investigate further and report the results.
thanks!
I'm indeed rewriting files which have been generated by JOSM because (I believe) osm4j does not have built-in support for the JOSM dialect of OSM XML with additional attributes such as action=delete.
Maybe we could improve osm4j to at least parse the files from JOSM even if it cannot currently store the additional data in its data model. Will need to find a suitable test file... I've created topobyte/osm4j#12 to track this.
from osm2world.
I've created a fix in 2ae6340. It writes the transformed XML file to an UTF-16 Java String and relies on Apache Commons' IOUtils to output this as correctly encoded UTF-8. As of 26e9bbd, I've also used the opportunity to replace the temporary files with an in-memory representation.
I've added one unit test and did some manual testing as well. It appears to work fine now. Not the most elegant approach, but to achieve a nice long-term solution, I'd rather help improve osm4j. 🙂️
The next OSM2World build will contain the fix.
from osm2world.
Related Issues (20)
- Add a configuration option for left-hand traffic HOT 3
- Is LGPL license applying also to all resorces/textures/models etc? HOT 2
- Other games besides SuperTuxKart? HOT 2
- Barriers as building parts HOT 2
- visual error when modeling half-hipped roof with ridges and edges HOT 1
- window:frame:colour HOT 2
- door materials HOT 3
- two nodes with same position -> crash HOT 1
- steps connecting different levels
- wrong interpretation of step_count HOT 1
- support for building:material=timber_framing HOT 1
- some roof shapes not rendered with exact heights
- building:part=yes not rendered if only roof is visible HOT 3
- domed roof not respecting min_height HOT 1
- Using gui and windows batch to convert *.osm to *.obj produce non-identical results HOT 1
- GLException: Unable to determine GraphicsConfiguration HOT 2
- Road junctions problem HOT 1
- Add support for roof:shape=side_hipped
- Elevations in feet are ignored HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osm2world.