NetStumbler.org Forums

Go Back   NetStumbler.org Forums > NetStumbler Community > Scripts
Register Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old 07-07-2005   #1 (permalink)
flipo
Registered Member
 
Join Date: Apr 2003
Posts: 4
ns2kml - Netstumbler to Google Earth

Hello!

Google Earth Rocks!

It's pretty simple to integrate outside information, so I wrote a small app to import Netstumbler's Summary Files (File/Export/Summary...) into google earth's own .kml Files.

(it was developed using vb.net, so you probably need .net framework)

Full source is included and you can do whatever you want with it.
(I'm no programmer, so be gentle on the critics )

To do list:
- different icons for Encrypted/Non encrypted networks
- kmz file generation (just zip the kml and change extension!)
- ideas?

FlipO'2005
Attached Files
File Type: zip ns2kml.zip (48.8 KB, 842 views)
flipo is offline   Reply With Quote
Old 07-07-2005   #2 (permalink)
G8tK33per
Asshole Emeritus
 
G8tK33per's Avatar
 
Join Date: May 2003
Location: S.E. VA.
Posts: 5,939
Moved to scripts.
__________________
"Benjamin is nobody's friend. If Benjamin were an ice cream flavor, he'd be pralines and dick."

Sons of Confederate Veterans
G8tK33per is offline   Reply With Quote
Old 09-20-2005   #3 (permalink)
spanner
Registered Member
 
Join Date: May 2002
Posts: 13
This script is pretty cool. Is there a size limit to what it can handle? I've got a 4.3mb (900+ AP) .ns1 file that distills down to something like 100kb, but I keep running into an error when I try opening the .kml file in Google Earth:

Open of file "G:/allsummary.kml" failed: Parse error: Parse error: Unterminated entity reference at line: 480 at line:480

NS 0.4.0 b554 opens the summary file happily.
spanner is offline   Reply With Quote
Old 09-20-2005   #4 (permalink)
beakmyn
root\.workspace\.garbage.
 
Join Date: Aug 2003
Posts: 4,805
Hmm, what's on line 480 of the file?
__________________
Daughter with arms inside shirt: "Daddy I'm not Armish"

┌──────────────────────────────┐
NS Icons Explained|et hoc genus omne
└──────────────────────────────┘
beakmyn is offline   Reply With Quote
Old 09-20-2005   #5 (permalink)
spanner
Registered Member
 
Join Date: May 2002
Posts: 13
No idea. I don't have a text editor that gives me line numbers...

I did some poking around, and got most of the file imported. I'll try to find the offending entry at home tonight.
spanner is offline   Reply With Quote
Old 09-20-2005   #6 (permalink)
goldfndr
Knight Tooth Puller
 
goldfndr's Avatar
 
Join Date: Aug 2004
Location: Bellevue, WA, USA
Posts: 182
Quote:
Originally Posted by spanner
No idea. I don't have a text editor that gives me line numbers...
Yes you do: EDIT.COM!!! Check it out!
goldfndr is offline   Reply With Quote
Old 09-20-2005   #7 (permalink)
beakmyn
root\.workspace\.garbage.
 
Join Date: Aug 2003
Posts: 4,805
or TextPad
__________________
Daughter with arms inside shirt: "Daddy I'm not Armish"

┌──────────────────────────────┐
NS Icons Explained|et hoc genus omne
└──────────────────────────────┘
beakmyn is offline   Reply With Quote
Old 09-21-2005   #8 (permalink)
Madhadder
General "Noob Basher"
 
Madhadder's Avatar
 
Join Date: Apr 2002
Location: Munich, Germany
Posts: 1,620
Iv'e tried this script on 10 different NS1 files ranging in size from 50k to 10MB
and every time it gives an error "Something funky going on here" etc...
.
Looks like you need to go back thru the code and find some bugs...
__________________
Legends may sleep, but they never die!!!!
Madhadder is offline   Reply With Quote
Old 09-21-2005   #9 (permalink)
theprez98
SpoonfeederExtraordinaire
 
theprez98's Avatar
 
Join Date: Jan 2005
Location: Maryland
Posts: 3,619
Quote:
Originally Posted by Madhadder
Iv'e tried this script on 10 different NS1 files ranging in size from 50k to 10MB
and every time it gives an error "Something funky going on here" etc...
.
Looks like you need to go back thru the code and find some bugs...
I've had the same problem with any files I tried.
__________________
:00475160 0E A6 AE A0 19 E3 A3 46 .......F
:00475168 0D 65 17 0C 53 70 6F 6F .e..Spoo
:00475170 6E 66 65 65 64 65 72 2E nfeeder.
:00475178 45 78 74 72 61 6F 72 64 Extraord
:00475180 69 6E 61 69 72 65 5D 3B inaire];
:00475188 8B 9E 92 5A FF 5D A6 F0 ...Z.]..
theprez98 is offline   Reply With Quote
Old 09-21-2005   #10 (permalink)
spanner
Registered Member
 
Join Date: May 2002
Posts: 13
Thanks to goldfndr, I've got an idea what may be happening.

The entry that is causing the problem seems to have reserved characters in the name.

Line 479:
<Placemark><description><![CDATA[SSID: D&J's Radio Network <br> BSSID: a6:00:93:02:f7:02<br>Last Update: 2002-01-19 - 17:29:12 (GMT) <br> [SNR Signal Noise]: [ 29 78 49 ]]]></description>

Line 480:
<name>D&J's Radio Network</name><styleUrl>root://styles#default+icon=0x307</styleUrl>
<Point><coordinates>-84.5151833,39.1032000,0</coordinates></Point>

Line 481:
</Placemark>

The only thing that's different between those three lines and the surrounding ones are the & and ' characters. HTML doesn't like un-escaped & characters, and since it has the same basic structure as KML, the same may apply.
spanner is offline   Reply With Quote
Old 09-21-2005   #11 (permalink)
beakmyn
root\.workspace\.garbage.
 
Join Date: Aug 2003
Posts: 4,805
Quote:
Originally Posted by spanner
Thanks to goldfndr, I've got an idea what may be happening.

The entry that is causing the problem seems to have reserved characters in the name.

Line 479:
<Placemark><description><![CDATA[SSID: D&J's Radio Network <br> BSSID: a6:00:93:02:f7:02<br>Last Update: 2002-01-19 - 17:29:12 (GMT) <br> [SNR Signal Noise]: [ 29 78 49 ]]]></description>

Line 480:
<name>D&J's Radio Network</name><styleUrl>root://styles#default+icon=0x307</styleUrl>
<Point><coordinates>-84.5151833,39.1032000,0</coordinates></Point>

Line 481:
</Placemark>

The only thing that's different between those three lines and the surrounding ones are the & and ' characters. HTML doesn't like un-escaped & characters, and since it has the same basic structure as KML, the same may apply.

Yes, the kml format doesn't like anything but numbers ans letters in the description and name fields. It's HTML sensitive. You'll have to use the <![CDATA[ ] structure to tell Google earth to ignore it.

I.E. <name><![CDATA[D&J's Radio Network]</name>
__________________
Daughter with arms inside shirt: "Daddy I'm not Armish"

┌──────────────────────────────┐
NS Icons Explained|et hoc genus omne
└──────────────────────────────┘
beakmyn is offline   Reply With Quote
Old 09-21-2005   #12 (permalink)
Scruge
Nyuk nyuk!
 
Scruge's Avatar
 
Join Date: Jan 2005
Location: TX
Posts: 1,380
Quote:
Originally Posted by spanner
This script is pretty cool. Is there a size limit to what it can handle? I've got a 4.3mb (900+ AP) .ns1 file that distills down to something like 100kb.
I've been able to load 60k+ APs into GE with beakmyn's NSrecovery tool and using 5x5 icons and no descriptions.
Another trick is to load each of your kml's individually into GE. GE will setup a new folder for each and append the master kmz file and allow you to select what you want displayed.

The only down side I've found is the startup time for GE increases to 3-4minutes with 60k POIs in the kmz.
Scruge is offline   Reply With Quote
Old 10-06-2005   #13 (permalink)
dschumann
Registered Member
 
Join Date: Oct 2005
Posts: 1
You could always replace ' with &apos; to prevent errors in the reading of the xml.


Replace(SomeString, "'", "&apos;")
Replace(SomeString, "&", "&amp;")
dschumann is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Google
 
Web NetStumbler.org

All times are GMT -7. The time now is 10:08 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 ©2007, Crawlability, Inc.


All messages express the views of the author and are for entertainment purposes only. Netstumbler.org cannot be held responsible for the authenticity of the content or the actions of its members. By using this site and its services, you warrant that you will not post any messages that are discriminating, obscene, hateful, threatening, or otherwise violates any laws and you release Netstumbler.org from any future claims of any kind whatsoever including, but not limited to, addiction and loss of productivity. All forum messages, private messages and any other content are properties of Netstumbler.org. Even if publicly available, personal or copyrighted information are not to be posted without the consent of the owner. Distribution of licensed and copyrighted materials in any way not endorsed by the copyright owner is strictly prohibited. You may not use this site and its resources to spam other sites or individuals or perform any action that violates any law. Items sold or bought in the For Sale forum are sold as is and no warranty or insurance of any kind is provided. Netstumbler.org cannot be held responsible for the outcome of any transactions and no warranty of any kind is provided, either express or implied. Vulgar words are not allowed in the subject lines ; they may be used in the message body in any forum. The Administrator, Super Moderators and Moderators of Netstumbler.org have the right to remove, edit, move or close any thread for any reason and to reveal your identity and other known information in the event of a complaint or legal action arising from any message posted by you.