[Program] YS FLD/Scenery Parser

Note that alterations to the YSFlight .EXE is forbidden
Post Reply
User avatar
Skipper
Rookie
Rookie
Posts: 83
Joined: Mon Dec 09, 2013 8:28 pm
Favorite Aircraft: Spitfire/F-15E
Location: SAM VOR 240 radial, 27nm
OS: Windows 10
Has thanked: 15 times
Been thanked: 57 times
Contact:

[Program] YS FLD/Scenery Parser

Post by Skipper »

This has been an absolute slog to get working... But it's working now.
As a part of my radar program, I needed something to provide background maps for the radar screen. I toyed with the idea of doing screenshots from scenery editor like the YS Log viewer, but thought I'd prefer something that can be customised a bit more in terms of colouring, and be quickly and easily created for any map, so I started writing a parser for the .fld scenery files.
As Decaff44 will be able to verify, it was not a road paved in success....
But finally I've got a working prototype done.

Image
The script will take a .fld file, and create a geoJSON file from the geometry in that scenery file.
This geoJSON will form the basis of my radar mapping in future, but can equally be converted to a .PNG, or a .SVG, or any other image format you'd like, so it should slot quite comfortably into any ideas you've got, like the Decaff's log viewer.
It's a work in progress, but I thought I'd get it released as I am quite sick of looking at the code, and want to move on with the more interesting radar side.
https://github.com/Skipper-is/YS-FieldParser
Image

I should highlight that this creates a geoJSON, not the image straight away, some light lifting is required on your part! You can convert the geoJSON to something like an SVG, or render it to a PNG, or load it in a GIS package like QGIS. The coordinates, if you load it in a GIS, are in meters, and are the same as the positions in YS (so it'll slow together with the radar in future)
Image
Host of YSRP: YSRP.co.uk - YS Role Play Server
Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest