Re: [OSM-dev] Fwd: [OSM-newbies] Reverse geo coding

2009-06-15 Thread Michael Handerek
Ok, I realized it that there are no guaranty of the completeness of
boundaries. Anyway, it is possible to build area geometries of
administratives in order to check if nodes belongs to or not.
Both methods have weaknesses, so in my opinion a combination of both is
the best way to get nearly proper results.
But how about the performance aspect? 

I think to organize area geometries like this. The geometries should be
generated during the import of osm data. Additionally the geometries
should be grouped by continent, country and city in order to do a top to
bottom check. So, basically the search will be done in 3 steps.
Considering that administrative boundaries are not complete and doing
the search in combination with nearest continent/country/city-nodes, may
it will be faster use bounding boxes instead of more precisely bounding
areas.

Cheers, Mic

On Thu, 2009-05-28 at 14:08 +0100, Emilie Laffray wrote:
 I have looked at the script boundaries.pl, but if you want to do a
 proper reverse geocoding the information in OSM is currently not
 enough.
 The script is very useful about generating a polygon but you can only
 do so if you have the proper data in the first place. For example,
 France doesn't have all polygons for administrative boundaries of town
 or even build up areas. Furthermore, there are instances where even
 higher level relations are not yet fully complete.
 In addition, if you look at countries like France, as opposed to UK,
 you will see that the country boundary is not consistent. The UK
 boundary has been extended probably by using ST_Buffer in the
 database, while France is using the coastline for the frontier, which
 is not consistent with UK or Belgium.
 
 Emilie Laffray
 
 On Thu, May 28, 2009 at 1:59 PM,  g...@gary68.de wrote:
  For place polygons look in the wiki.: boundaries.pl
 
  -- Urspr. Mitt. --
  Betreff: [OSM-dev] Fwd: [OSM-newbies] Reverse geo coding
  Von: Thomas Wood grand.edgemas...@gmail.com
  Datum: 28.05.2009 14:50
 
  Forwarding this to OSM dev from newbies.
 
 
  -- Forwarded message --
  From: Michael Handerek o...@handerek.net
  Date: 2009/5/28
  Subject: [OSM-newbies] Reverse geo coding
  To: newb...@openstreetmap.org newb...@openstreetmap.org
 
 
  Hi,
 
  I am new to osm. I am currently developing a prototype of a reverse geo
  coding tool based on a local osm db. The input has to be a
  latitude/longitude pair and the output a human readable address.
 
  I already handled it to extract the street name and postal code of a
  lat/long pair using the tags of a nearest-neighbor-node. To do this with
  a acceptable query time i use the k-nearest-neighbor algorithm
  (http://www.bostongis.com/?content_name=postgis_nearest_neighbor_generic#130).
 
  Now I have to get at least the country and city name. In order to do
  this i see two possibilities.
 
  1. Searching for the nearest city node, in order to extract the
  information from his tags.
 
  2. Creating geometries for each continent, country and city in order to
  check if nodes are within.
 
  May someone know some better method to get the needed information, feel
  free to discuss.
 
 
  The 1. possibility, also used by 'Where are they'
  (http://wiki.openstreetmap.org/wiki/Where_Are_They), for me, seems to be
  imprecise.
 
 
  Regards,
  Mic
 
  ___
  newbies mailing list
  newb...@openstreetmap.org
  http://lists.openstreetmap.org/listinfo/newbies
 
 
 
 
  --
  Regards,
  Thomas Wood
  (Edgemaster)
 
  ___
  dev mailing list
  dev@openstreetmap.org
  http://lists.openstreetmap.org/listinfo/dev
 
 
  ___
  dev mailing list
  dev@openstreetmap.org
  http://lists.openstreetmap.org/listinfo/dev
 



___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


[OSM-dev] Fwd: [OSM-newbies] Reverse geo coding

2009-05-28 Thread Thomas Wood
Forwarding this to OSM dev from newbies.


-- Forwarded message --
From: Michael Handerek o...@handerek.net
Date: 2009/5/28
Subject: [OSM-newbies] Reverse geo coding
To: newb...@openstreetmap.org newb...@openstreetmap.org


Hi,

I am new to osm. I am currently developing a prototype of a reverse geo
coding tool based on a local osm db. The input has to be a
latitude/longitude pair and the output a human readable address.

I already handled it to extract the street name and postal code of a
lat/long pair using the tags of a nearest-neighbor-node. To do this with
a acceptable query time i use the k-nearest-neighbor algorithm
(http://www.bostongis.com/?content_name=postgis_nearest_neighbor_generic#130).

Now I have to get at least the country and city name. In order to do
this i see two possibilities.

1. Searching for the nearest city node, in order to extract the
information from his tags.

2. Creating geometries for each continent, country and city in order to
check if nodes are within.

May someone know some better method to get the needed information, feel
free to discuss.


The 1. possibility, also used by 'Where are they'
(http://wiki.openstreetmap.org/wiki/Where_Are_They), for me, seems to be
imprecise.


Regards,
Mic

___
newbies mailing list
newb...@openstreetmap.org
http://lists.openstreetmap.org/listinfo/newbies




-- 
Regards,
Thomas Wood
(Edgemaster)

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Fwd: [OSM-newbies] Reverse geo coding

2009-05-28 Thread gary
For place polygons look in the wiki.: boundaries.pl

-- Urspr. Mitt. --
Betreff: [OSM-dev] Fwd: [OSM-newbies] Reverse geo coding
Von: Thomas Wood grand.edgemas...@gmail.com
Datum: 28.05.2009 14:50

Forwarding this to OSM dev from newbies.


-- Forwarded message --
From: Michael Handerek o...@handerek.net
Date: 2009/5/28
Subject: [OSM-newbies] Reverse geo coding
To: newb...@openstreetmap.org newb...@openstreetmap.org


Hi,

I am new to osm. I am currently developing a prototype of a reverse geo
coding tool based on a local osm db. The input has to be a
latitude/longitude pair and the output a human readable address.

I already handled it to extract the street name and postal code of a
lat/long pair using the tags of a nearest-neighbor-node. To do this with
a acceptable query time i use the k-nearest-neighbor algorithm
(http://www.bostongis.com/?content_name=postgis_nearest_neighbor_generic#130).

Now I have to get at least the country and city name. In order to do
this i see two possibilities.

1. Searching for the nearest city node, in order to extract the
information from his tags.

2. Creating geometries for each continent, country and city in order to
check if nodes are within.

May someone know some better method to get the needed information, feel
free to discuss.


The 1. possibility, also used by 'Where are they'
(http://wiki.openstreetmap.org/wiki/Where_Are_They), for me, seems to be
imprecise.


Regards,
Mic

___
newbies mailing list
newb...@openstreetmap.org
http://lists.openstreetmap.org/listinfo/newbies




-- 
Regards,
Thomas Wood
(Edgemaster)

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Fwd: [OSM-newbies] Reverse geo coding

2009-05-28 Thread Emilie Laffray
I have looked at the script boundaries.pl, but if you want to do a
proper reverse geocoding the information in OSM is currently not
enough.
The script is very useful about generating a polygon but you can only
do so if you have the proper data in the first place. For example,
France doesn't have all polygons for administrative boundaries of town
or even build up areas. Furthermore, there are instances where even
higher level relations are not yet fully complete.
In addition, if you look at countries like France, as opposed to UK,
you will see that the country boundary is not consistent. The UK
boundary has been extended probably by using ST_Buffer in the
database, while France is using the coastline for the frontier, which
is not consistent with UK or Belgium.

Emilie Laffray

On Thu, May 28, 2009 at 1:59 PM,  g...@gary68.de wrote:
 For place polygons look in the wiki.: boundaries.pl

 -- Urspr. Mitt. --
 Betreff: [OSM-dev] Fwd: [OSM-newbies] Reverse geo coding
 Von: Thomas Wood grand.edgemas...@gmail.com
 Datum: 28.05.2009 14:50

 Forwarding this to OSM dev from newbies.


 -- Forwarded message --
 From: Michael Handerek o...@handerek.net
 Date: 2009/5/28
 Subject: [OSM-newbies] Reverse geo coding
 To: newb...@openstreetmap.org newb...@openstreetmap.org


 Hi,

 I am new to osm. I am currently developing a prototype of a reverse geo
 coding tool based on a local osm db. The input has to be a
 latitude/longitude pair and the output a human readable address.

 I already handled it to extract the street name and postal code of a
 lat/long pair using the tags of a nearest-neighbor-node. To do this with
 a acceptable query time i use the k-nearest-neighbor algorithm
 (http://www.bostongis.com/?content_name=postgis_nearest_neighbor_generic#130).

 Now I have to get at least the country and city name. In order to do
 this i see two possibilities.

 1. Searching for the nearest city node, in order to extract the
 information from his tags.

 2. Creating geometries for each continent, country and city in order to
 check if nodes are within.

 May someone know some better method to get the needed information, feel
 free to discuss.


 The 1. possibility, also used by 'Where are they'
 (http://wiki.openstreetmap.org/wiki/Where_Are_They), for me, seems to be
 imprecise.


 Regards,
 Mic

 ___
 newbies mailing list
 newb...@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/newbies




 --
 Regards,
 Thomas Wood
 (Edgemaster)

 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev


 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Fwd: [OSM-newbies] Reverse geo coding

2009-05-28 Thread Stefan de Konink
On Thu, 28 May 2009, Thomas Wood wrote:

 Forwarding this to OSM dev from newbies.

What is the length of his coding ;)


Stefan





 -- Forwarded message --
 From: Michael Handerek o...@handerek.net
 Date: 2009/5/28
 Subject: [OSM-newbies] Reverse geo coding
 To: newb...@openstreetmap.org newb...@openstreetmap.org


 Hi,

 I am new to osm. I am currently developing a prototype of a reverse geo
 coding tool based on a local osm db. The input has to be a
 latitude/longitude pair and the output a human readable address.

 I already handled it to extract the street name and postal code of a
 lat/long pair using the tags of a nearest-neighbor-node. To do this with
 a acceptable query time i use the k-nearest-neighbor algorithm
 (http://www.bostongis.com/?content_name=postgis_nearest_neighbor_generic#130).

 Now I have to get at least the country and city name. In order to do
 this i see two possibilities.

 1. Searching for the nearest city node, in order to extract the
 information from his tags.

 2. Creating geometries for each continent, country and city in order to
 check if nodes are within.

 May someone know some better method to get the needed information, feel
 free to discuss.


 The 1. possibility, also used by 'Where are they'
 (http://wiki.openstreetmap.org/wiki/Where_Are_They), for me, seems to be
 imprecise.


 Regards,
 Mic

 ___
 newbies mailing list
 newb...@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/newbies




 --
 Regards,
 Thomas Wood
 (Edgemaster)

 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev



___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev