[postgis-users] Geocoder for PostGIS
Stephen Woodbridge
woodbri at swoodbridge.com
Mon Aug 15 16:33:04 PDT 2005
Well, it can be done. I have all the Navteq data for the US and Canada
in a MySQL/Perl based geocoder and performance is not a problem. If the
data is appropriately normalized and you don't load all the junk you
don't need, then good performance should be fine.
-Steve
Rich Gibson wrote:
> Hi David,
>
> A postgis solution basically just didn't work when Schuyler first
> implemented it. The data and indexes were about 40 gb, and
> performance just didn't cut it.
>
> The flexibility of a SQL solution would clearly be nice, but Schuyler
> couldn't make it work effectively (ie. fast enough).
>
> Interpolating along the line, rather than endpoints, is not
> particularly hard-and is something we've considered adding. It will
> add some space to the database, but not horribly so.
>
> Cheers,
> Rich
>
>
>>Schuyler's solution with BerkleyDB relies on specific import routines
>>and hard coded hashes that hold the mappings to find street types and
>>directions. If this approach were broadened to have a shapefile
>>import with configurations and mappings held in separate files we
>>could make it suit our needs. The result would likely be faster and
>>it would have the advantage of being a stand alone solution. The
>>drawbacks though would be precision (Schuylers approach just
>>interpolates between road endpoints not along the line -- not a big
>>deal for most applications, but important for some) and ease of
>>customization -- with a SQL database solution it is possible to ease
>>the creation of new localizations using SQL. For example, the way my
>>geocoder is set up is so that I can create my base street type
>>mappings by selecting the unique streettypes from my roads dataset
>>into a new table. That table then has two columns one with the
>>"correct" form of the street type and one with a regular expression to
>>map any other common ways of depicting that street type (ie RD,
>>R(OA)?D ) I have to fill in the regular expression column by hand,
>>but it is easy as I know all and exactly all of the street types used
>>in my data. These little customization shortcuts would be, in my
>>opinion, more difficult to create outside of a nice SQL environment.
>>
>>On 8/15/05, Abe Gillespie <abe.gillespie at gmail.com> wrote:
>>
>>>I disagree with making a universal geocoder depend on PostGIS. I
>>>think it's a better idea to have it completely independent of PostGIS.
>>> Once it works on its own, say a separate library, only then should it
>>>be rolled into PostGIS.
>>>
>>>-Abe
>>>
>>>On 8/15/05, David Bitner <osgis.lists at gmail.com> wrote:
>>>
>>>>I've got my PL/PGSQL / PL/Perl geocoder at http://foo.gyttja.org. I
>>>>have tried to develop it so that it could have different types of
>>>>datasets plugged in. I'm all for getting a standard base.
>>>>
>>>>I would propose keeping the work completely within the database, I
>>>>have found that PL/Perl is great for the address parsing, but it adds
>>>>a requirement for the user. Additional "clients" could then be added
>>>>for PHP or Perl or ASP or whatever to access the PostgreSQL/PostGIS
>>>>geocode function.
>>>>
>>>>In order to make a worldwide geocoder, we should keep as many
>>>>components of the geocoder separate as possible so that we can reuse
>>>>as much code as possible between localizations. The two
>>>>functionalities that will change between geocoders depend on the local
>>>>way of presenting an address (ie 4000 East Harriett Parkway,
>>>>Minneapolis, MN 55560) and the type of dataset geocoding agains (do
>>>>you have both left and right address ranges, can we make a function
>>>>that geocodes off parcel data). We should also have some functions to
>>>>standardize and index the information in the source data.
>>>>
>>>>On 8/15/05, Stephen Woodbridge <woodbri at swoodbridge.com> wrote:
>>>>
>>>>>Paul,
>>>>>
>>>>>I think we might need to define the code and/or development environment
>>>>>also. For example is it going to be:
>>>>>
>>>>>1. inside postgres
>>>>>2. php, perl, C, java, etc or one language and wrappers, etc
>>>>>
>>>>>It would be nice to see a design section that would be organized by
>>>>>country that people with local knowledge can update with country
>>>>>specific addressing requirements and address parsing requirements, etc.
>>>>>
>>>>>A data section, that is more oriented to identifying data sources as
>>>>>opposed to storing data by country might be useful.
>>>>>
>>>>>Just some thoughts,
>>>>> -Stephen Woodbridge
>>>>> http://imaptools.com
>>>>>
>>>>>Paul Scott wrote:
>>>>>
>>>>>>On Mon, 2005-08-15 at 05:29 -0400, "René F. Viancos S." wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Someone knows an opensource development for geocoding in PostGIS
>>>>>>>and/or PHP
>>>>>>>
>>>>>>
>>>>>>
>>>>>>Seeing as though this thread comes up with _alarming_ regularity, I
>>>>>>propose that we *start* a project for exactly this.
>>>>>>
>>>>>>We could divide the source tree by country, and let everyone
>>>>>>interested contribute some country specific code. Once that is done,
>>>>>>try then to create a generic "world-geocoder" of sorts. I am sure
>>>>>>that the Mapserver Community would also like to get involved.
>>>>>>
>>>>>>I am prepared to host such a project, as well as provide additional
>>>>>>mailing lists etc, to keep it off this list (eliminating unnecessary
>>>>>>mail to uninterested parties).
>>>>>>
>>>>>>Comments? Thoughts? Flames?
>>>>>>
>>>>>>I could have this set up in a matter of minutes, so let me know. I
>>>>>>think that this project will create some respite for all users of
>>>>>>this list :)
>>>>>>
>>>>>>--Paul
>>>>>>
>>>>>>_______________________________________________ postgis-users mailing
>>>>>>list postgis-users at postgis.refractions.net
>>>>>>http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>>>>
>>>>>
>>>>>_______________________________________________
>>>>>postgis-users mailing list
>>>>>postgis-users at postgis.refractions.net
>>>>>http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>>>
>>>>
>>>>_______________________________________________
>>>>postgis-users mailing list
>>>>postgis-users at postgis.refractions.net
>>>>http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>>
>>>
>>>_______________________________________________
>>>postgis-users mailing list
>>>postgis-users at postgis.refractions.net
>>>http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>
>>_______________________________________________
>>postgis-users mailing list
>>postgis-users at postgis.refractions.net
>>http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
More information about the postgis-users
mailing list