2009/3/27 <[email protected]>: > > Hello everyone, > > due to implementing automatic detection in what country+city > you are in Traveling Salesman (http://travelingsales.sourceforge.net) > and thus determining what national speed-limits apply I am > experimenting with the default-sizes of places. > > More exact: If for a place=* there is no polygon describing the > extend of it, I need to apply either a radius or an edge-length for > a bounding-bof around the a place. > For simplifity I chose a bounding-box. > > My current defaults are in the CityIndex > (http://travelingsales.svn.sourceforge.net/viewvc/travelingsales/libosm/src/org/openstreetmap/osm/data/searching/advancedAddressDB/CitiesIndex.java?view=markup) > of the AdvancedAddressDBPlaceFinder > (http://apps.sourceforge.net/mediawiki/travelingsales/index.php?title=Plugin/AdvancedAddressDBPlaceFinder) > > > DEFAULT_CITY_SIZE = 0.8d; > > DEFAULT_TOWN_SIZE = 0.4d; > > DEFAULT_VILLAGE_SIZE = 0.2d; > > DEFAULT_SUBURB_SIZE = 0.17d; > > DEFAULT_HAMLET_SIZE = 0.7d; > > DEFAULT_PLACE_SIZE = 0.4d; > > the unit is unprojected latitude or longitude. > > My questions: > * What area-sizes are you using for cities where no bounds are given? > * Should I use separate constants for lat and lon? > * Would there be an real advantage to using distances in kilometer instead?
Since depending on the latitude the area would be bigger or smaller, I'd say yes. > * Is there a way to use is_in or other hints to make this more accurate? how about extending the bounding box to Xdelta = max (DEFAULT_*_SIZE, max(abs (Cx - Pix) | for every i node)) Ydelta = max (DEFAULT_*_SIZE, max(abs (Cy - Piy) | for every i node)) Where: - (Cx, Cy) is the origin of the place and - (Pnx, Pny) is the position of n-th node that contains place's name in the is_in value*. * note that is_in contains frequently values such as: "CityName;CountyName;Country", "CityName; CountyName; Country" "CityName,CountyName,Country", "CityName, CountyName, Country" -- Regards, EddyP ============================================= "Imagination is more important than knowledge" A.Einstein _______________________________________________ Routing mailing list [email protected] http://lists.openstreetmap.org/listinfo/routing
