Package org.ka2ddo.yaac.osm
Class OsmSearcher
java.lang.Object
org.ka2ddo.yaac.osm.OsmSearcher
This class provides a standardized mechanism to search the imported OSM
tiles for a landmark matching the specified name string.
- Author:
- Andrew Pavlin, KA2DDO
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
maximum number of matches that searcher is allowed to return. -
Constructor Summary
ConstructorDescriptionOsmSearcher
(File baseDir) Create an OsmSearcher using the specified base directory for the collection of OSM tile files. -
Method Summary
Modifier and TypeMethodDescriptionvoid
search
(String matchString, int flagsToFind, double lat, double lon, double radius, OsmSearcherProgressListener listener) Search the OpenStreetMap tile files for the specified landmark name.
-
Field Details
-
MAX_MATCH_LIST_SIZE
public static final int MAX_MATCH_LIST_SIZEmaximum number of matches that searcher is allowed to return. Closer entries will still be kept, while further-out ones will be discarded.- See Also:
-
-
Constructor Details
-
OsmSearcher
Create an OsmSearcher using the specified base directory for the collection of OSM tile files.- Parameters:
baseDir
- File specifying where the YAAC-imported OSM tile files are located
-
-
Method Details
-
search
public void search(String matchString, int flagsToFind, double lat, double lon, double radius, OsmSearcherProgressListener listener) Search the OpenStreetMap tile files for the specified landmark name.- Parameters:
matchString
- case-insensitive String to search for, or null if not searching by partial string matchflagsToFind
- int bit mask of GenericTaggedNode.flags set bits to look for (zero if not searching by flags)lat
- search center latitude in fractional degrees Northlon
- search center longitude in fractional degrees Eastradius
- maximum radius in meters for the searchlistener
- OsmSearcherProgressListener to be informed of finds and tile changes during the search, or null if not interested in progress reports
-