KML files for the World Gliding Championships

29 views
Skip to first unread message

PMSC Member

unread,
Jul 25, 2014, 12:51:30 AM7/25/14
to oaco...@googlegroups.com
I am interested in converting the official airspace file of the World Gliding Championships in Leszno, Poland (Openair) to KML.


Has anyone done this already?

Bart Vandewoestyne

unread,
Jul 25, 2014, 3:15:02 AM7/25/14
to oaco...@googlegroups.com
I just tried, but oaconvert tells me that the file has some syntax errors:

$ ./oaconvert -o AirspacePL2014v2.kml AirspacePL2014v2.txt

ERROR: invalid coordinate string: X=52:15:00N 015:57:00E

The AirspacePL2014v2.txt has lines like

AC B
AN TMA EPZG 118.75
AL 396m MSL
AH FL95
AT X=52:15:00N 015:57:00E
V Z=500
DP 52:19:14N 015:58:32E
DP 52:14:57N 016:05:44E
... and so on ...

For as far as I understand the 'most official' OpenAir specification at
http://www.winpilot.com/usersguide/userairspace.asp the line

AT X=52:15:00N 015:57:00E

must be replaced by

AT 52:15:00N 015:57:00E

This should be enough to place the name label (AN-record) on the correct
location...

Can you fix the airspace file and let me know the new location? Then I
can try again...

Kind regards,
Bart

Bart Vandewoestyne

unread,
Jul 25, 2014, 4:01:50 AM7/25/14
to oaco...@googlegroups.com
On Friday, July 25, 2014 9:15:02 AM UTC+2, Bart Vandewoestyne wrote:

I just tried, but oaconvert tells me that the file has some syntax errors:

$ ./oaconvert -o AirspacePL2014v2.kml AirspacePL2014v2.txt

ERROR: invalid coordinate string: X=52:15:00N 015:57:00E

The AirspacePL2014v2.txt has lines like

AC B
AN TMA EPZG 118.75
AL 396m MSL
AH FL95
AT X=52:15:00N 015:57:00E
V Z=500
DP 52:19:14N 015:58:32E
DP 52:14:57N 016:05:44E
... and so on ...

For as far as I understand the 'most official' OpenAir specification at
http://www.winpilot.com/usersguide/userairspace.asp the line

AT X=52:15:00N 015:57:00E

must be replaced by

AT 52:15:00N 015:57:00E

This should be enough to place the name label (AN-record) on the correct
location...

Can you fix the airspace file and let me know the new location?  Then I
can try again...


I just fixed the 39 locations where the AT-line is incorrect and was then able to convert the OpenAir file to a KML file using the latest oaconvert:


 $ ./oaconvert -o AirspacePL2014v2.kml AirspacePL2014v2.txt

$ ls -al AirspacePL2014v2.*
-rw-rw-r-- 1 bart bart 4747805 Jul 25 10:00 AirspacePL2014v2.kml
-rw-rw-r-- 1 bart bart   55439 Jul 25 10:00 AirspacePL2014v2.txt

Let me know if you have any problems compiling or using oaconvert if you try this yourself.

Kind regards,
Bart

PMSC Member

unread,
Jul 25, 2014, 8:08:20 AM7/25/14
to oaco...@googlegroups.com
That's very interesting, Bart, thank you.  I will see what I can do.  The contest organisers were not interested in fixing the official airspace file when I told them they had syntax errors! 

-Rick

Bart Vandewoestyne

unread,
Jul 25, 2014, 8:17:53 AM7/25/14
to oaco...@googlegroups.com
Rick

How did they create the airspace files? Using a simple text-editor or
were the OpenAir files generated by some software or hardware product?
I'm just curious here to know if there is software or hardware that
generates OpenAir files with 'AT X=<coordinate>'-lines in it...

For as far as I know, OpenAir is not a file format that has an official
standard. The most 'official' OpenAir specification that I have found
is the documentation that is online at
http://www.winpilot.com/UsersGuide/UserAirspace.asp

If you look there, you'll see

* AT coordinate ; coordinate = Coordinate of where to place a
name label on the map (optional)
* ; NOTE: there can be multiple AT records for a
single airspace segment


So there should only be a coordinate, WITHOUT the 'X=' in front of it.
Also, if you look at the AT-examples on that same page, you never see
something of the form

AT X=<coordinate>

but you always see

AT <coordinate>

So that's why oaconvert is giving errors at the 'AT X=<coordinate>' lines.

I'd suggest you first try fixing the errors in the OpenAir file, then
compile and use oaconvert to convert it to KML, and if you experience
problems, just let me know!

I *could* send you the generated KML file right away, but I'm curious as
of how difficult it is for you to go through the whole process of
compiling and using oaconvert yourself. Let me know if the
documentation is bad or incomplete at certain places.

Kind regards,
Bart
Reply all
Reply to author
Forward
0 new messages