MLS membership to Google Earth or Google Maps
-
- New Member
- Posts: 3
- Joined: Mon Jul 02, 2007 9:00 pm
MLS membership to Google Earth
Hi,
I'm new here so forgive me if this has already been posted(It didn't turn up on a search). Also it seems that those of you in the US have tools not available to the rest of the world so I don't know if you already have a nice membership map with your ward websites. I wrote a python script to convert the MLS exported csv to a format that can be imported into google earth or google maps.
If any one is interested here it is:
http://web.mac.com/davidostler/iWeb/PYT ... leEarth.py
Usage: python mls2GoogleEarth.py Membership.csv
Membership.csv being the csv export from MLS.
This creates a file called wardMap.kml that you can import into Google Earth
I've created this based on the way we format addresses down here in New Zealand. I've tried to revamp the script to work with US addresses but I can't test it because I don't have data to test it with.
If anything is amiss it should be easy to fix by editing the script values for city and state.
The script also produces a csv file with the ward info reformatted to work better with address book imports. This file also contains the latitude and longitude for each member. If you run the script again from the same directory containing this file it will pull the coordinates from here instead of accessing Google.
Further it will write out an error file called geoError.txt containing a list of addresses that google could not find. You can use this to identify errors in the MLS information.
Hope you find this useful.
I'm new here so forgive me if this has already been posted(It didn't turn up on a search). Also it seems that those of you in the US have tools not available to the rest of the world so I don't know if you already have a nice membership map with your ward websites. I wrote a python script to convert the MLS exported csv to a format that can be imported into google earth or google maps.
If any one is interested here it is:
http://web.mac.com/davidostler/iWeb/PYT ... leEarth.py
Usage: python mls2GoogleEarth.py Membership.csv
Membership.csv being the csv export from MLS.
This creates a file called wardMap.kml that you can import into Google Earth
I've created this based on the way we format addresses down here in New Zealand. I've tried to revamp the script to work with US addresses but I can't test it because I don't have data to test it with.
If anything is amiss it should be easy to fix by editing the script values for city and state.
The script also produces a csv file with the ward info reformatted to work better with address book imports. This file also contains the latitude and longitude for each member. If you run the script again from the same directory containing this file it will pull the coordinates from here instead of accessing Google.
Further it will write out an error file called geoError.txt containing a list of addresses that google could not find. You can use this to identify errors in the MLS information.
Hope you find this useful.
- thedqs
- Community Moderators
- Posts: 1042
- Joined: Wed Jan 24, 2007 8:53 am
- Location: Redmond, WA
- Contact:
- WelchTC
- Senior Member
- Posts: 2085
- Joined: Wed Sep 06, 2006 8:51 am
- Location: Kaysville, UT, USA
- Contact:
-
- New Member
- Posts: 3
- Joined: Mon Jul 02, 2007 9:00 pm
Proxy
I tried this script for the first time on the ward computer and it failed. I'm guessing that there is a proxy server on ward computers. I haven't had time to trouble shoot but if this is the case adding the following line to the script or adding to the system variables should fix it.
http_proxy=http://www.myproxy.com:3128
http_proxy=http://www.myproxy.com:3128
-
- Member
- Posts: 56
- Joined: Fri Feb 16, 2007 6:44 pm
- Location: New Zealand
Go Kiwi's!
Nice work dostler - being in python makes it a little less accessable, I'm thinking of having a go at porting to javascript, any objections? (Have you already done it yourself?)
BTW, In your source code, it has a typo of cvs instead of csv and you left "Wellington Ward" in the Name attribute of the KML file header...
BTW, In your source code, it has a typo of cvs instead of csv and you left "Wellington Ward" in the Name attribute of the KML file header...
-
- New Member
- Posts: 3
- Joined: Mon Jul 02, 2007 9:00 pm
Please by all means write a javaScript version. I haven't written a java script equivalent.redzarf wrote:Nice work dostler - being in python makes it a little less accessable, I'm thinking of having a go at porting to javascript, any objections? (Have you already done it yourself?)
BTW, In your source code, it has a typo of cvs instead of csv and you left "Wellington Ward" in the Name attribute of the KML file header...
-
- Member
- Posts: 77
- Joined: Thu Feb 08, 2007 9:42 am
- Location: Arizona
-
- Senior Member
- Posts: 773
- Joined: Tue Jan 23, 2007 2:03 pm
I noticed you were from Arizona. That is where Google Maps may have messed up recently.
They updated them, and the satellite images that go with them, but they are more than nine months old. You'll be able to tell if you look at where the light rail line is, and the stage of construction that was in at that time is when they got the pictures. Ditto for the 202 Freeway where it goes through the satellite images, you'll see the stage between Power and University plus the (then) unopened segment from the SuperRedTan stack interchange to University as it was at the time too.
That last one may not have even been updated either, I understand some of East Mesa did not get in the final shot they used for the present mapping of the Phoenix area. And therein lies the problem with Google Maps, especially in fast growing areas like Phoenix.
They updated them, and the satellite images that go with them, but they are more than nine months old. You'll be able to tell if you look at where the light rail line is, and the stage of construction that was in at that time is when they got the pictures. Ditto for the 202 Freeway where it goes through the satellite images, you'll see the stage between Power and University plus the (then) unopened segment from the SuperRedTan stack interchange to University as it was at the time too.
That last one may not have even been updated either, I understand some of East Mesa did not get in the final shot they used for the present mapping of the Phoenix area. And therein lies the problem with Google Maps, especially in fast growing areas like Phoenix.
-
- Member
- Posts: 77
- Joined: Thu Feb 08, 2007 9:42 am
- Location: Arizona
- thedqs
- Community Moderators
- Posts: 1042
- Joined: Wed Jan 24, 2007 8:53 am
- Location: Redmond, WA
- Contact: