Closed CaverBruce closed 2 years ago
Hi! Due to the lack of any real specification for the XVI format, the importer for it is very limited. I spent a lot of time looking through the XVI files I have access to, but even the position offset isn't working properly in my importer. If somebody could write up a specification for it, I would probably be able to implement it, altough those sketches look like bitmap graphics which would be more challenging. Also anyone is welcome to implement these features themselves, the XVI import is very loosely coupled to the main app.
I don't have any special knowledge. However the sketches look like they are vectors based on the same approach as the shots. This is the closest I can find https://www.mail-archive.com/therion@speleo.sk/msg08699.html
A clue from the Therion Book: Xtherion vector image. XVI images may be used in xtherion to draw in-scale maps. Scale (100 DPI image resolution is assumed) and grid-size from layout are used in export.
Gridlines also need to parsed. I can supply some sample xvi files if you would like.
The xvi for the above image looks as though it is a point to point vector drawing, not a bitmap. Not sure what the dpi is referring to, but it could be a scaling applied when the xvi is converted from other formats (field sketching applications such as PocketTopo). 104-DJ_p.xvi.txt If you have a version of wtherion that can display the sketch part of the xvi I will be interested in trialling wtherion. Does the beta-fixes branch achieve this?
Thank you for the sample XVI! No, this feature was not implemented before, but using your sample it was pretty easy to do. Here it is in the latest version:
You were correct, these are in fact vector drawings, so it is basically no extra work done converting them. However, there are still the other downsides of XVI files in wtherion, because the vector editing framework it's using is storing everything as curves, even the (pretty much static and not changing) XVI background graphics. This adds a lot of overhead if your XVI files are very large. For this reason I would still recommend using raster graphics for reference sketches, or just using small XVI files (broken into sections before generating). There is no validation when importing either, so an incorrect XVI might just silently fail to import.
You can checkout the beta-fixes branch at any time if you want to build the project yourself, or I could make a build of it for you.
Thanks Csongor, very quick. I know how to download install artifacts from https://github.com/therion/therion but I don't know anything about building or browser stuff. Maybe you could prepare a build for me? I'm using Windows 10 Home and preferred browser is Brave
Okay, I thought instead of building this manually I would try out Netlify CD, and I set it up so now all commits to beta-fixes are built and deployed to https://beta.wtherion.daemonw.com
This means you can try out the latest version, but it could change at any time, so if you want to stay on a specific version, you can go to https://app.netlify.com/sites/roaring-gelato-4ea2f4/deploys and find the permalinks for each build.
If you are able to test out this feature and it works, please close this issue.
The above links and edits to Readme.MD look good. They both work for me. I loaded up a beta WTherion (is WebTherion easier to say?) and imported a th2 with four comprehensive scraps and coincidentally four xvi files, making up a lot more xvi sketching than is normally present in my th2 files. It seems to be very snappy for navigation - faster than XTherion at a guess. As you mentioned the xvi files load in the wrong place, offset down and to the left from the Therion drawing entities. The xvi image grid lines are missing - I'll raise that as a separate issue if necessary.
Yes the grid lines are omitted because would be highly inefficient if they were created on import, since each line would be a separate entity in the framework, slowing down everything.
Maybe if this is an important issue for people, I could find a way to draw it dynamically, but that's really outside the scope of this project.
The coordinates being off could probably be fixed, but right now it's at least importing correctly and can be moved easily, which is better than XTherion.
@daem-on CSongor, this WTherion project is looking promising and I'd like to trial its use in a real project. I would need a way to parse the drawing from th2 to WTherion browser cache to json and back again without any loss of fidelity. That is because all my projects are set up as versioned and multi-user. To achieve this, possibly the only outstanding requirement is to fix the xvi coordinate problem. Since XTherion manages to get the coordinates right it must be possible to resolve easily for WTherion. I would like to continue the conversation, but perhaps it is better to involve the Therion community. Perhaps it is time to follow up your January announcement on therion@speleo.sk with news of the beta-fixes branch and we could solve any problems with the Therion community - there must be someone who remembers or can resolve it.
Yes that would be a good idea. I'm busy over the weekend, but I'll do that next week.
This is looking rather exciting. However, although xvi stations and legs are imported, sketches are not.
Using Brave Version 1.35.100 Chromium: 98.0.4758.87 (Official Build) (64-bit)