KML-INST Tool

Moderator: MOD_Command

Flankerk
Posts: 418
Joined: Wed Jun 21, 2006 8:50 am

KML-INST Tool

Post by Flankerk »

This is a small programme written to allow placemarks in the likes of Google Earth to be quickly imported into Command:-




Attached below is the guide on how to use it:-

KML transfer utility
The KML transfer utility enables you to import positions of real facilities saved as KML in an Earth browser (like Google Earth) to Command.

CREATE KML FILE (IN GOOGLE EARTH)
Start with creating a folder for each .kml you are planning to transfer to Command. If you name the folder with the same name as you are planning to use for the .inst you faciliate your future work. Then start to add place marks for those facilities you will import into Command. The name of the place mark will be transferred to Command and you can choose to use the database name, like:
A/C Open Parking Spot (1x Medium Aircraft)

You could also add a number to the name som that it's possible to identify each unique facility:
A/C Open Parking Spot 1 (1x Medium Aircraft)

Some times the facility has a authentic designation and then it could be used:
A/C Open Parking Spot H 3 (1x Medium Aircraft)

(Sub folders might be used to organize the place marks but the information about the sub folders will not be transferred.)

When you are done in Google Earth then you should save the folder(s) as .kml; conveniently to the Command Modern Air Naval Operations KML Transfer folder.

TRANSFER KML TO RAW INST
Run the KMLTransfer.exe program that you find in the KML Transfer folder. Now you are able to load any .kml file (with the Load KML button) and then you can save the locations as an .inst file (with the Save locs button).

EDIT INST FOR COMMAND
In order to make it possible to import the facilites into Command you will have to edit the raw .inst file; both the file header, footer and the member records.

File header:
{"DB_ID":0, "FormatVersion": 0, "MemberRecords":[

The default DB_ID is 0 but that will not be accepted by Command so you will have to chage it to:
1 for DB3K ("DB_ID":1) or
2 for CWDB ("DB_ID":2)

File footer:
],"ValidFrom":"", "ValidUntil":"", "Name":"", "Comments":""}

The meta information in the file footer is presented in the Import dialog. All these fields could be left empty (""). ValidFrom and ValidUntil are text fields that informs the player which years the facilities should be used and Name and Comments gives additional information.

The information about the individual facilities are found in the member records:
{"Member_DBID": 10000,
"MemberType": "Command_Core.Facility",
"MemberName": "Place mark 1",
"ParentGroupName": "Name of KML",
"Longitude": 0,
"Latitude": 0,
"Altitude": 0,
"Loadout ID": 0,
"Orientation": 0}

Member_DBID is presented in the Database Viewer and if you would like to import Place mark 1 above as a large building you will find this description in the Database Viewer:
#115 - Building(Large) -- Generic(Generic),0-0, -

Member_DBID should then be changed to 115:
"Member_DBID": 115,

(Note that all fields, as well as facility members, must be separated by a comma.)

It's possible to change MemberName from the name of the place mark, given in Google Earth.

ParentGroupName is the name of the .kml folder created in Google Earth. For facility groups, like air bases, this should be the name of the group:
"ParentGroupName": "Airbase Alpha",

For other types of facilities ParentGroupName should be replaced by null:
"ParentGroupName": null,

When you have made these changes you can save the file and move it to desired sub folder in the ImportExport folder.

Jakob Wedman



There is planned to be a demonstration of its use on Baloogan's site.

We could do with year specific files being built up for all areas [8D]

In effect building up air defences and radar sites for each year that imagery is available.
I plan to finish up Chinese defences before moving onto Taiwanese. I am sure there are many others that need doing. (Greece, Turkey, Japan, North Korea, South Korea, Syria, Iran to name a few)

For units in close proximity, such as airbases you normally find you are best off with custom overlays though it is possible to build an airbase in Google Earth then import. The KML tool works at its best when its dispersed objects that need to be imported.
As it picks up the name along with the exact location, you can accurately place say a radar site, name it specifically in Google Earth, and it will be imported with the correct location and name into Command.

From my point of view I find the simplest naming convention is to stick with the classification according to the database.



Flanker
Attachments
KMLTransfer.zip
(111.2 KiB) Downloaded 709 times
Image

"Alas poor Yorick,I knew him Horatio"

#1 Quote of the Harpoon Community.
Jakob Wedman
Posts: 125
Joined: Wed Mar 20, 2013 6:57 pm

RE: KML-INST Tool

Post by Jakob Wedman »

Here's a short introductory video:
Command video: Introduction to KML Transfer Utility
navwarcol
Posts: 637
Joined: Wed Dec 02, 2009 2:30 pm
Contact:

RE: KML-INST Tool

Post by navwarcol »

Very cool!
RoryAndersonCDT
Posts: 1828
Joined: Mon Jun 15, 2009 11:45 pm

RE: KML-INST Tool

Post by RoryAndersonCDT »

I did a 30 minute Baloogan Highlight on this tool. Its pretty neat! Please give it a look!

http://www.youtube.com/watch?v=OcCu_wjR ... e=youtu.be


Command Dev Team
Technical Lead
deagu
Posts: 32
Joined: Fri Aug 04, 2006 7:41 am

RE: KML-INST Tool

Post by deagu »

Hi,

tried your tool under Windows Vista, but got an error when hitting the button load kml:
Did not find "ICSharpCode.SharpZipLib" Any idea?

System.IO.FileLoadException: Die Datei oder Assembly "ICSharpCode.SharpZipLib, Version=0.84.0.0, Culture=neutral, PublicKeyToken=1b03e6acf1164f73" oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)
Dateiname: "ICSharpCode.SharpZipLib, Version=0.84.0.0, Culture=neutral, PublicKeyToken=1b03e6acf1164f73"
bei KMLTransfer.Form1.LoadKMLBtn_Click(Object sender, EventArgs e)
bei System.Windows.Forms.Control.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
bei System.Windows.Forms.Button.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

WRN: Protokollierung der Assemblybindung ist AUS.
Sie können die Protokollierung der Assemblybindungsfehler aktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) auf 1 festlegen.
Hinweis: Die Protokollierung der Assemblybindungsfehler führt zu einer gewissen Leistungseinbuße.
Sie können dieses Feature deaktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] entfernen.



************** Geladene Assemblys **************
mscorlib
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.4241 (VistaSP2GDR.050727-4200).
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll.
----------------------------------------
KMLTransfer
Assembly-Version: 1.0.0.0.
Win32-Version: 1.0.0.0.
CodeBase: file:///C:/Users/AG/Desktop/Command/KMLTransfer.exe.
----------------------------------------
Microsoft.VisualBasic
Assembly-Version: 8.0.0.0.
Win32-Version: 8.0.50727.4016 (NetFxQFE.050727-4000).
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll.
----------------------------------------
System
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.4235 (VistaSP2GDR.050727-4200).
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll.
----------------------------------------
System.Windows.Forms
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.4236 (VistaSP2GDR.050727-4200).
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
----------------------------------------
System.Drawing
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.4235 (VistaSP2GDR.050727-4200).
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
----------------------------------------
System.Runtime.Remoting
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.4016 (NetFxQFE.050727-4000).
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll.
----------------------------------------
System.Windows.Forms.resources
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.4016 (NetFxQFE.050727-4000).
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------
mscorlib.resources
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.4241 (VistaSP2GDR.050727-4200).
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
RoryAndersonCDT
Posts: 1828
Joined: Mon Jun 15, 2009 11:45 pm

RE: KML-INST Tool

Post by RoryAndersonCDT »

Ah the zip Flanker uploaded doesn't include the ICSharpCode.SharpZipLib.dll which it requires.
Command Dev Team
Technical Lead
Flankerk
Posts: 418
Joined: Wed Jun 21, 2006 8:50 am

RE: KML-INST Tool

Post by Flankerk »


Should be OK now with the added DLL.
Image

"Alas poor Yorick,I knew him Horatio"

#1 Quote of the Harpoon Community.
deagu
Posts: 32
Joined: Fri Aug 04, 2006 7:41 am

RE: KML-INST Tool

Post by deagu »

Thanks does work now! Great! [:)]
ComDev
Posts: 3116
Joined: Fri May 12, 2006 1:20 pm
Contact:

RE: KML-INST Tool

Post by ComDev »

ORIGINAL: Baloogan

I did a 30 minute Baloogan Highlight on this tool. Its pretty neat! Please give it a look!

http://www.youtube.com/watch?v=OcCu_wjR ... e=youtu.be

The popularity of your videos caused Youtube to collapse... "500 Internal Server Error"
Image

Developer "Command: Modern Air/Naval Operations" project!
RoryAndersonCDT
Posts: 1828
Joined: Mon Jun 15, 2009 11:45 pm

RE: KML-INST Tool

Post by RoryAndersonCDT »

Haha I did notice Youtube was giving out errors over the last half hour or so. Its working for me now [:D]

YouTube is a really amazing platform, I did a few calculations of what it would cost me to host my videos myself and its 1000s of dollars lol!
Command Dev Team
Technical Lead
sluggy2010
Posts: 122
Joined: Wed Oct 02, 2013 1:09 am

RE: KML-INST Tool

Post by sluggy2010 »

Nice one Flankerk

Thanks

ComDev
Posts: 3116
Joined: Fri May 12, 2006 1:20 pm
Contact:

RE: KML-INST Tool

Post by ComDev »

Just bumping this thread [8D]
 
Anyone played around with the KML-to-INST tool lately?
Image

Developer "Command: Modern Air/Naval Operations" project!
cwemyss
Posts: 252
Joined: Fri Nov 29, 2013 9:00 pm
Location: Grapevine, TX, USA

RE: KML-INST Tool

Post by cwemyss »

I was planning to do it this weekend, if I can get a few hours.
Occasionally also known as cf_dallas
RoryAndersonCDT
Posts: 1828
Joined: Mon Jun 15, 2009 11:45 pm

RE: KML-INST Tool

Post by RoryAndersonCDT »

Bump [:)]
Command Dev Team
Technical Lead
User avatar
brassem
Posts: 72
Joined: Wed Oct 02, 2013 3:38 am
Location: NE of YMML

RE: KML-INST Tool

Post by brassem »

Is there a known limit on how many units can be brought in for conversion to a single .inst?

(Would hate to create a 4096 unit count kml file, and have it crash on conversion!)
i7-3930K@3.2Ghz&H100liquid|ASUSP9X79Deluxe>X680/OC|32GBGSkillPC2400|2TBRaid0|Antec1200&1200WTruePower|ASUSGV278H-3D|SBX-FiT-Pro|TurtlebeachDPX21|Win7-64U
cwemyss
Posts: 252
Joined: Fri Nov 29, 2013 9:00 pm
Location: Grapevine, TX, USA

RE: KML-INST Tool

Post by cwemyss »

ORIGINAL: cwemyss

I was planning to do it this weekend, if I can get a few hours.

Fail.
Occasionally also known as cf_dallas
Flankerk
Posts: 418
Joined: Wed Jun 21, 2006 8:50 am

RE: KML-INST Tool

Post by Flankerk »


I don't think anyone has encountered a limit on the import. Bear in mind these will already be saved as a KML so there is a backup if anything did go wrong.
Image

"Alas poor Yorick,I knew him Horatio"

#1 Quote of the Harpoon Community.
User avatar
Roby7979
Posts: 1030
Joined: Tue Feb 20, 2018 4:12 pm
Location: Italy,Rome

RE: KML-INST Tool

Post by Roby7979 »

Is this program still used or is there another newer one?...2018?
User avatar
Blast33
Posts: 703
Joined: Mon Dec 31, 2018 1:23 pm
Location: Above and beyond

RE: KML-INST Tool

Post by Blast33 »

I just started to work with CMANO and I don't have a KML transfer folder in CMANO like in the youtubes of Baloogan.
No KMLtrsanfer.exe is present.
Is this program removed?

How do I transfer KML files now to .inst? Any alternatives?



Image
Attachments
Clipboard012.jpg
Clipboard012.jpg (82.47 KiB) Viewed 2240 times
User avatar
Blast33
Posts: 703
Joined: Mon Dec 31, 2018 1:23 pm
Location: Above and beyond

RE: KML-INST Tool

Post by Blast33 »

Works fine now, disregard the previous post pls.
Post Reply

Return to “Useful Material”