Changes between Version 20 and Version 21 of BluePrintGISGeolocator
- Timestamp:
- 11/17/10 04:07:48 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BluePrintGISGeolocator
v20 v21 16 16 Basic Google/Yahoo webservice calls are in {{{modules/s3gis.py}}}. 17 17 18 These have been tied to the front-end [wiki:BluePrintGISLocationsHierarchy#LocationSelector Location Selector] in a basic form. Using the service requires entering part of an address in the Street Address text area, and optionally including a country in the hierarchical control, then clicking the "Geocoder Search," link. The geocoder service will be queried, and results will be displayed to the user in a popup. The user can select an address from the list, and the selected address will be used to populate the Street Address and zipcode in that text area, as well as the latitude and longitude lines. See below for a list of features that should be added to this functionality.18 These have been tied to the front-end [wiki:BluePrintGISLocationsHierarchy#LocationSelector Location Selector] in a basic form. Using the service requires entering part of an address in the Street Address text area, and optionally including a country in the hierarchical control, then clicking the "Geocoder Search," link. The geocoder service will be queried, and results will be displayed to the user in a popup. The user can select an address from the list, and the selected address will be used to populate the Street Address and zipcode in that text area, as well as the latitude and longitude lines. 19 19 20 Unfortunately, there are inconsistent data returns from the Google service so it doesn't always work (the OK button does nothing).20 At the moment this workflow means that when "Geocoder Search" link is clicked, the Google service is queried and the results are shown to the user. Sometimes the Google results will only include latitude and longitude values that are useful, and will not include a "ThoroughfareName" (street address), or a "Postal code." When no thoroughfare name is present, the user is alerted, but the latitude and longitude values are populated. When a thoroughfare name is in the results, the user is alerted to a success. When a postal code is present, that fact is included in the successful alert. 21 21 22 22 !GeoNames support needs adding (there is some !GeoNames functionality in S3GIS or another example in jQueryUI !AutoComplete: http://jqueryui.com/demos/autocomplete/remote-jsonp.html). … … 24 24 [http://wiki.openstreetmap.org/wiki/Nominatim Nominatim] support needs adding 25 25 * http://wiki.openstreetmap.org/wiki/Cdauth%E2%80%99s_map has a good search widget for this which could be incorporated 26 27 == Notes == 28 29 There have been a avenues explored for this project that have proven to be deadends. Great pains were taken in order to get the right information out of the geocode() controller's return, which, at the moment, happens to be raw returns from Google. The problem with those efforts is that Yahoo returns a completely different data structure. These obviously have to be standardized. 30 31 It was originally thought that the 3rd party geopy python module would be useful to achieve this standardization, however there are two problems. The geopy module still returns different data structures for both Google and Yahoo. Additionally, for Google it only returns the long form of the address, and the lat/lon values, which are both trivial to parse out of the Google returns anyway (using "address" and "Point" as keys into the returned placemark). Using this module proved to be a bit of a dead end. It may be possible to use this module as a basis, however, with some slight modifications. 32 26 33 == API == 27 34