Hi Oliver,
Would an address search returning City Ward work for your application?
Postal code will would work, however you will encounter a number of
cases in the City where postal code areas cross ward boundaries so you
will return 2 or more wards for a givin postal code.
Using address you will always have a one-to-one
relationship....something for you to think about anyways for your
application.
Using the City's public Geocoder Web Service you can accomplish this
task. This web service is hitting a live address database as well, so
as addresses are maintained, they are updated automatically in this
'view' repository (you will always be getting up to date information).
Use the address service (WSDL URL below):
http://map.toronto.ca/geocoderv3/wsdl/com/cot/cor/geocoder/v3/ejb/AddressSession.wsdl
Here is a snippit
VB.NET code to get an entered address and return the
areatype CITW, which is the short code for city wards.
----
' Initialization
Dim index As Integer
Dim addressWS As New ca.toronto.map.AddressSessionService
Dim addresses() As ca.toronto.map.Address
Dim usrAddress As String
' Get user entered address
usrAddress = TextBox1.Text
' Test OUTSIDE web service with area types
addresses = addressWS.findBySearchString(1, 3, Nothing,
usrAddress, "CITW", Nothing, Nothing, Nothing, Nothing, False,
Nothing)
' Update the list box with all matches returned from web
service
ListBox1.BeginUpdate()
For index = 0 To UBound(addresses)
ListBox1.Items.Add("INDEX: " & index)
ListBox1.Items.Add("WARD: " & addresses(index).areaName1)
ListBox1.Items.Add("ADDRESS: " & addresses
(index).lowNumber & " " & addresses(index).parsedName & " " & addresses
(index).parsedType & " " & addresses (index).formerCityName)
ListBox1.Items.Add(" ")
Next
ListBox1.EndUpdate()
----
This code worked on a form with 1 text box and 1 list box....
Full documentation for the web service can be downloaded from the
toronto.ca/open site, let me know if you have any other questions or
if this works for you...
Also, if you get this working in a production environment somewhere
I'd love to see a link where I can see this in operation!!!!!
Cheers,
Scott Webb
City of Toronto - Geospatial Competency Centre
email:
sw...@toronto.ca
phone:
416-392-2999
On Nov 23, 12:37 pm, Oliver Zielke <
ozie...@gmail.com> wrote:
> Hi folks,
>
> I work for non-profit IT provider Web Networks, and am looking for a
> postal code to City ward database enabling end user to find their ward
> by entering their postal code. Anybody have such information. Below is
> the response from Open Data--city says "No, Canada Post won't let us
> give that away"
>
> Begin forwarded message:
>
> From: "Open Data" <
opend...@toronto.ca>
> Date: November 23, 2009 12:24:22 PM EST
> To: "Oliver Zielke" <
oli...@web.net>
> Subject: Re: postal code to city ward
>
> Oliver,
>
> Based on the agreement that was recently signed with Canada Post, we
> do not have permission to release the postal code field. Management
> is going
> to discuss our terms of usage with Canada Post and perhaps in the near
> future we can include it, but for now we cannot.
>
> Regards
>
> Philip
>
> >>> Oliver Zielke <
oli...@web.net> 11/20/2009 5:23 PM >>>
>
> Hi Trish
>
> Any progress on obtaining this data? Is it available
>
> You may have seen this news
>
>
http://www.guardian.co.uk/technology/2009/nov/19/ordnance-survey-maps...
>
> Thanks
>
> Oliver
>
> Oliver Zielke, Executive Directorhttp://
web.net
> W:
416.596.0212 x.25 | M:
416.898.5850
>
> On Nov 4, 2009, at 2:38 PM, Open Data wrote:
>
> Hi Oliver,
>
> Thank you for your query about postal codes tied to City wards. We
> will get back to you as soon as possible.
>
> Regards,
> Trish
>
> City of Toronto |Toronto Open | Philip Scott, Open Data Project
> Manager | Trish Garner, Manager, Web Strategy >
toronto.ca/open |
>
opend...@toronto.ca
>
> From: Oliver Zielke <
oli...@web.net>
> To: <
opend...@toronto.ca>
> Date: 2009-11-02 10:07 am
> Subject: postal code to city ward
>
> Hello,
>
> I work for Web Networks, a non-profit organization based in T.O.
>
> We are interested in accessing a database of postal code to city of
> toronto ward. Is that available?
>
> thanks
>
> Oliver
>
> Oliver Zielke, Executive Directorhttp://
web.net