• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Using Google Earth KML files with SBuilderX

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
6,521
Country
us-wisconsin
Hi all.

Google Earth's drawing tool is quite robust, allowing the tracing of lines as well as point-to-point drawing. Unfortunately, SBuilderX doesn't allow the import of KMZ or KML files.

FWTools contains the ogr2ogr.exe commandline tool. Using the FWShell, you can type:

Code:
ogr2ogr -f "ESRI Shapefile" mydata.shp LOD_5_48_31.kml

The result is the conversion of LOD_5_48_31.kml to a new fileset named mydata.shp, which can now be imported to SBuilderX.

Note the files from Google Earth need to be saved as the uncompressed KML type... not KMZ.

To convert a shapefile back to KML...

Code:
ogr2ogr -f "KML" mydata.kml mydata.shp

You'll lose your tags, colors and line widths, but is is a path for conversion.

+++++++++++++

In addition, the nice FSX_KML program will also make a shapefile... just dig in the program's folders to retrieve it. That shapefile can be used in SBuilderX.

Dick
 
I used the first form (KML to SHP) but first it aborted about some layer error. Then I used the -skipfailures option and it kept complaining that my output.shp was not a directory.

I then created a SHP directory and used that as output instead of output.shp and it outputed a lot of files there.

I also saw a lot of errors saying "Attempt to write non-polygon (LINESTRING) geometry to POLYGON type shapefile.
 
I used the first form (KML to SHP) but first it aborted about some layer error. Then I used the -skipfailures option and it kept complaining that my output.shp was not a directory.

I then created a SHP directory and used that as output instead of output.shp and it outputed a lot of files there.

I also saw a lot of errors saying "Attempt to write non-polygon (LINESTRING) geometry to POLYGON type shapefile.
 
Hi Emilio:

Have you considered the info in these threads regarding "KML2BLN":

http://www.fsdeveloper.com/forum/showthread.php?t=295096&highlight=kml2bln

http://www.fsdeveloper.com/forum/showthread.php?t=310230&highlight=kml2bln


If you still have the older KML files from Google Earth projects in the FSXKML folder chain, the original Google Earth output as KML may or may not need to be processed first via "PreFsxKml"

http://www.fsdeveloper.com/forum/showpost.php?p=235281&postcount=25


Hope these ideas might work as an alternative to still allow using the prior data sets you've created. :)

GaryGB
 
Hi Gary,
The first thread didn't have anything related to my "problem" but the 2nd did hit the nail. Don't recall seeing BLN in the list of imports but it probably is, I have downloaded the tool to try it out.

My projects (some) are old FSX KML projects from before Google changed the format. I first tried using the FSX Pre Kml tool but it didn't work at all in my setup and that's when I decided to take the plunge and migrate to SBuilderX projects. However, I have some older projects that I need to convert to finally get rid of anything FSX KML.

Thanks!
Emilio
 
Hi Emilio:

Glad this info may help port your data over to SBuilder. ;)


BTW: Both the *.SHP and *.BLN file types are "Appended" (and not "Imported") ...to SBuilderX.


PS: You can also examine the structure of a SBuilderX *.SBX file in a text editor; this may allow you to copy the <coordinates> data over from a KML file and use it (after some text processing with ex: Find and Replace functions etc.).

The *.SBX can then also be "Appended" (and not "Imported") ...to SBuilderX.


Hope this helps ! :)

GaryGB
 
Last edited:
Back
Top