Using the Open Data

130 views
Skip to first unread message

Tyler

unread,
Dec 5, 2010, 6:59:41 PM12/5/10
to Open Data Ottawa
Hello,

I have just begun to poke my head into Ottawa's open data. I have not
used these types of data before and just have a few questions.

For my web application I would like to interface with the data through
a mysql database and into google maps api. But I am having huge
difficulties finding references on how to use SHP data.

Does anyone have any good resources to learn from our techniques on
how to use SHP data into a web application?

Thanks so much!
Tyler

Kevin O'Donnell

unread,
Dec 5, 2010, 8:07:50 PM12/5/10
to dat...@googlegroups.com
Hi Tyler,

I've imported the datasets using ogr2ogr into a MySql database already. It is available for download at http://kodonnell.ca/opendataottawa/

The Mysql Geospacial API can be used to convert from the internal (and relatively compact) binary format into the lat/long formats that can be passed directly to the Google Maps API. http://dev.mysql.com/doc/refman/5.0/en/gis-introduction.html

For large Polygon shapes you'll need to use the compact "encoded" form by passing lat/long coordinates through this class (if you're using PHP:  http://kodonnell.ca/opendataottawa/PolylineEncoder.txt). 

Cheers & good luck.
Kevin.
--

Chris Dumoulin

unread,
Dec 5, 2010, 7:40:09 PM12/5/10
to dat...@googlegroups.com
Hi Tyler,
I recently got the City of Ottawa wards, which are provided as SHP data, displayed onto google maps. For reference, this is the data file I used: http://www.ottawa.ca/online_services/opendata/info/wards2010_en.html
There may be better ways to do this, but these were the steps I took:

1) I used a tool called shp2text (http://www.obviously.com/gis/shp2text/) to get CSV output from the SHP file
2) I then used this website to convert from the MTM Zone 9 NAD83 coordinates to latitude and longitude for google maps: http://pages.globetrotter.net/roule/utmgoogle.htm

I tried out some other tools before landing on the website used in step 2, but couldn't figure out any of them enough to use them.

HTH,
Chris

On Sun, Dec 5, 2010 at 6:59 PM, Tyler <gigabyt...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages