Geocoding from shape files
ANDY CANFIELD
andy_canfield at HOTMAIL.COM
Fri Sep 3 11:02:45 PDT 2004
To all interested,
A while back I posted asking if anyone was interested in a php interface to
geocode from shapefiles. I got a few responses so here is the link to the
source.
You use it at your own risk.
For each call to a geocode function it returns a string of space delimited
points for every match it finds IE "X Y X2 Y2 X3 Y3.......Xn Yn" where each
point is a matching street level address. So if you have one match for the
address you get "X Y". The included php examples show calling it in a loop
for multiple addresses. What you do with the returned points string is up to
you.
It includes examples of using it from php although since it's a library you
could use it from any executable or another library.
The source for both projects is there along with examples and some sample
data including addresses that fall along the sample data.
It was written for Windows and has some very specific Windows API calls in
it so it will not directly port. The calls are modularized however so
replacing those functions with their Unix or Linux counterpart should be
easy. I don't have a test environment for either so I can not do a port on
my end. I have only tested this with Windows 2000 and 2003 server running
IIS.
Using the multiple address interface I can geocode about 7 addresses a
second from a street base of 300,000+ street segements. Your milage with it
may vary. If you have questions you can reply to my e-mail address
andy_canfield at hotmail.com I will try and answer what I can.
Feedback would be appreciated especially if there is a broken link or my
bandwidth limit runs out.
Link to the page ( again you use this at your own risk it is not a mature
project ):
http://cornbread.cadvault.com/geocodeinstructions.html
Thanks,
Andy
_________________________________________________________________
Get ready for school! Find articles, homework help and more in the Back to
School Guide! http://special.msn.com/network/04backtoschool.armx
More information about the MapServer-users
mailing list