add poi categories

git-svn-id: https://osmand.googlecode.com/svn/trunk@150 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-06-11 10:28:09 +00:00
parent a50b00c7e7
commit a33f1275cd
11 changed files with 383 additions and 110 deletions

View file

@ -17,38 +17,45 @@ public class ToDoConstants {
// }
/**
* Write activity to show something about authors / donation ....
*/
public int DESCRIBE_ABOUT_AUTHORS = 8;
// TODO ANDROID
// 8. Enable change POI directly on map (requires OSM login)
// 31. Translation.
// 32. Introduce POI predefined filters (car filter(other-fuel, transportation-car_wash, show-car) and others)
// ( 1) predefined filters, 2) choose subtype's, 3) filter by name, 4) opening hours (filter))
// 41. POI layer over map (shows poi by selected filter)
// 32b. Include to amenity index : historic, sport, ....
// 8. Enable change POI directly on map (requires OSM login)
// 33. Build transport locations. Create transport index (transport-stops) (investigate)
// 34. Suppport navigation for calculated route (example of get route from internet is in swing app).
// 39. Support old-versionned resources (1) odb indexes, 2) favourites table, 3) atomic settings (?))
// 38. Add button in search "navigate to".
// 42. Revise UI (icons/layouts). Support different devices. Add inactive/focus(!) icon versions.
// 36. Postcode search
// 37. Get rid of exit button (!). Think about when notification should go & how clear resources if it is necessary
// 38. Add button in search "navigate to".
// 39. Support old-versionned resources (1) odb indexes, 2) favourites table, 3) atomic settings (?))
// 20. Implement save track/route to gpx (?)
// 26. Show the whole street on map (when it is chosen in search activity). Possibly extend that story to show layer with streets.
// 34. Suppport navigation for calculated route (example of get route from internet is in swing app).
// 40. Support simple vector road rendering (require new index file)
// 41. POI layer over map (shows poi by selected filter)
// 42. Revise UI (icons/layouts). Support different devices. Add inactive/focus(!) icon versions.
// 26. Show the whole street on map (when it is chosen in search activity). Possibly extend that story to show layer with streets. (?)
// 20. Implement save track/route to gpx (?)
// BUGS Android
// 2. Include to amenity index : historic, sport, ....
// 5. Improvement : Implement caching files existing on FS, implement specific method in RM
// Introducing cache of file names that are on disk (creating new File() consumes a lot of memory)
// TODO swing
// 3. Implement clear progress.
// 4. Fix issues with big files (such as netherlands)
// 4. Fix issues with big files (such as netherlands) - save memory
// 1. Download tiles without using dir tiles (?)
@ -63,4 +70,5 @@ public class ToDoConstants {
// DONE SWING
// 2. Internal (Simplify MapPanel - introduce layers for it)
// 3. Implement clear progress.
}

View file

@ -1,90 +1,10 @@
package com.osmand.data;
import java.util.LinkedHashMap;
import java.util.Map;
import com.osmand.Algoritms;
import com.osmand.osm.Entity;
import com.osmand.osm.OSMSettings.OSMTagKey;
public class Amenity extends MapObject {
// http://wiki.openstreetmap.org/wiki/Amenity
// POI tags : amenity, leisure, shop, sport, tourism, historic; accessories (internet-access), natural ?
public enum AmenityType {
SUSTENANCE, // restaurant, cafe ...
EDUCATION, // school, ...
TRANSPORTATION, // car_wash, parking, ...
FINANCE, // bank, atm, ...
HEALTHCARE, // hospital ...
ENTERTAINMENT, // cinema, ... (+! sauna, brothel)
TOURISM, // hotel, sights, museum ..
SHOP, // convenience (product), clothes...
LEISURE, // sport
OTHER, // grave-yard, police, post-office
;
public static AmenityType fromString(String s){
return AmenityType.valueOf(s.toUpperCase());
}
public static String valueToString(AmenityType t){
return t.toString().toLowerCase();
}
}
private static Map<String, AmenityType> prebuiltMap = new LinkedHashMap<String, AmenityType>();
static {
prebuiltMap.put("restaurant", AmenityType.SUSTENANCE);
prebuiltMap.put("food_court", AmenityType.SUSTENANCE);
prebuiltMap.put("fast_food", AmenityType.SUSTENANCE);
prebuiltMap.put("drinking_water", AmenityType.SUSTENANCE);
prebuiltMap.put("bbq", AmenityType.SUSTENANCE);
prebuiltMap.put("pub", AmenityType.SUSTENANCE);
prebuiltMap.put("bar", AmenityType.SUSTENANCE);
prebuiltMap.put("cafe", AmenityType.SUSTENANCE);
prebuiltMap.put("biergarten", AmenityType.SUSTENANCE);
prebuiltMap.put("kindergarten", AmenityType.EDUCATION);
prebuiltMap.put("school", AmenityType.EDUCATION);
prebuiltMap.put("college", AmenityType.EDUCATION);
prebuiltMap.put("library", AmenityType.EDUCATION);
prebuiltMap.put("university", AmenityType.EDUCATION);
prebuiltMap.put("ferry_terminal", AmenityType.TRANSPORTATION);
prebuiltMap.put("bicycle_parking", AmenityType.TRANSPORTATION);
prebuiltMap.put("bicycle_rental", AmenityType.TRANSPORTATION);
prebuiltMap.put("bus_station", AmenityType.TRANSPORTATION);
prebuiltMap.put("car_rental", AmenityType.TRANSPORTATION);
prebuiltMap.put("car_sharing", AmenityType.TRANSPORTATION);
prebuiltMap.put("fuel", AmenityType.TRANSPORTATION);
prebuiltMap.put("car_wash", AmenityType.TRANSPORTATION);
prebuiltMap.put("grit_bin", AmenityType.TRANSPORTATION);
prebuiltMap.put("parking", AmenityType.TRANSPORTATION);
prebuiltMap.put("taxi", AmenityType.TRANSPORTATION);
prebuiltMap.put("atm", AmenityType.FINANCE);
prebuiltMap.put("bank", AmenityType.FINANCE);
prebuiltMap.put("bureau_de_change", AmenityType.FINANCE);
prebuiltMap.put("pharmacy", AmenityType.HEALTHCARE);
prebuiltMap.put("hospital", AmenityType.HEALTHCARE);
prebuiltMap.put("baby_hatch", AmenityType.HEALTHCARE);
prebuiltMap.put("dentist", AmenityType.HEALTHCARE);
prebuiltMap.put("doctors", AmenityType.HEALTHCARE);
prebuiltMap.put("veterinary", AmenityType.HEALTHCARE);
prebuiltMap.put("first_aid", AmenityType.HEALTHCARE);
prebuiltMap.put("architect_office", AmenityType.ENTERTAINMENT);
prebuiltMap.put("arts_centre", AmenityType.ENTERTAINMENT);
prebuiltMap.put("cinema", AmenityType.ENTERTAINMENT);
prebuiltMap.put("community_centre", AmenityType.ENTERTAINMENT);
prebuiltMap.put("fountain", AmenityType.ENTERTAINMENT);
prebuiltMap.put("nightclub", AmenityType.ENTERTAINMENT);
prebuiltMap.put("stripclub", AmenityType.ENTERTAINMENT);
prebuiltMap.put("studio", AmenityType.ENTERTAINMENT);
prebuiltMap.put("theatre", AmenityType.ENTERTAINMENT);
prebuiltMap.put("sauna", AmenityType.ENTERTAINMENT);
prebuiltMap.put("brothel", AmenityType.ENTERTAINMENT);
}
private String subType;
@ -102,14 +22,20 @@ public class Amenity extends MapObject {
}
protected String getSubType(Entity node) {
if(node.getTag(OSMTagKey.AMENITY) != null){
return node.getTag(OSMTagKey.AMENITY);
} else if(node.getTag(OSMTagKey.SHOP) != null){
if (node.getTag(OSMTagKey.SHOP) != null) {
return node.getTag(OSMTagKey.SHOP);
} else if (node.getTag(OSMTagKey.TOURISM) != null) {
return node.getTag(OSMTagKey.TOURISM);
} else if (node.getTag(OSMTagKey.SPORT) != null) {
return node.getTag(OSMTagKey.SPORT);
} else if (node.getTag(OSMTagKey.LEISURE) != null) {
return node.getTag(OSMTagKey.LEISURE);
} else if (node.getTag(OSMTagKey.HISTORIC) != null) {
return node.getTag(OSMTagKey.HISTORIC);
} else if (node.getTag(OSMTagKey.INTERNET_ACCESS) != null) {
return "internet_access";
} else if (node.getTag(OSMTagKey.AMENITY) != null) {
return node.getTag(OSMTagKey.AMENITY);
}
return "";
}
@ -119,10 +45,12 @@ public class Amenity extends MapObject {
return AmenityType.SHOP;
} else if(node.getTag(OSMTagKey.TOURISM) != null){
return AmenityType.TOURISM;
} else if(node.getTag(OSMTagKey.LEISURE) != null){
return AmenityType.LEISURE;
} else if(prebuiltMap.containsKey(node.getTag(OSMTagKey.AMENITY))){
return prebuiltMap.get(node.getTag(OSMTagKey.AMENITY));
} else if(node.getTag(OSMTagKey.LEISURE) != null || node.getTag(OSMTagKey.SPORT) != null){
return AmenityType.LEISURE_AND_SPORT;
} else if(node.getTag(OSMTagKey.HISTORIC) != null){
return AmenityType.HISTORIC;
} else if(AmenityType.amenityMap.containsKey(node.getTag(OSMTagKey.AMENITY))){
return AmenityType.amenityMap.get(node.getTag(OSMTagKey.AMENITY));
}
return AmenityType.OTHER;
}
@ -152,6 +80,10 @@ public class Amenity extends MapObject {
return true;
} else if(n.getTag(OSMTagKey.TOURISM) != null){
return true;
} else if(n.getTag(OSMTagKey.HISTORIC) != null){
return true;
} else if(n.getTag(OSMTagKey.INTERNET_ACCESS) != null){
return true;
}
return false;
}

View file

@ -0,0 +1,295 @@
package com.osmand.data;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
// http://wiki.openstreetmap.org/wiki/Amenity
// POI tags : amenity, leisure, shop, sport, tourism, historic; accessories (internet-access), natural ?
public enum AmenityType {
// Some of those types are subtypes of Amenity tag
SUSTENANCE, // restaurant, cafe ...
EDUCATION, // school, ...
TRANSPORTATION, // car_wash, parking, ...
FINANCE, // bank, atm, ...
HEALTHCARE, // hospital ...
ENTERTAINMENT, // cinema, ... (+! sauna, brothel)
TOURISM, // [TAG] hotel, sights, museum ..
HISTORIC, // [TAG] historic places, monuments (should we unify tourism/historic)
SHOP, // [TAG] convenience (product), clothes...
LEISURE_AND_SPORT, // [TAG] sport
OTHER, // grave-yard, police, post-office [+Internet_access]
;
public static AmenityType fromString(String s){
return AmenityType.valueOf(s.toUpperCase());
}
public static String valueToString(AmenityType t){
return t.toString().toLowerCase();
}
public static AmenityType[] getCategories(){
return AmenityType.values();
}
public static List<String> getSubCategories(AmenityType t){
List<String> list = new ArrayList<String>();
for(String s : amenityMap.keySet()){
if(amenityMap.get(s) == t){
list.add(s);
}
}
return list;
}
protected static Map<String, AmenityType> amenityMap = new LinkedHashMap<String, AmenityType>();
static {
amenityMap.put("alpine_hut", AmenityType.TOURISM);
amenityMap.put("attraction", AmenityType.TOURISM);
amenityMap.put("artwork", AmenityType.TOURISM);
amenityMap.put("camp_site", AmenityType.TOURISM);
amenityMap.put("caravan_site", AmenityType.TOURISM);
amenityMap.put("chalet", AmenityType.TOURISM);
amenityMap.put("guest_house", AmenityType.TOURISM);
amenityMap.put("hostel", AmenityType.TOURISM);
amenityMap.put("hotel", AmenityType.TOURISM);
amenityMap.put("information", AmenityType.TOURISM);
amenityMap.put("motel", AmenityType.TOURISM);
amenityMap.put("museum", AmenityType.TOURISM);
amenityMap.put("picnic_site", AmenityType.TOURISM);
amenityMap.put("theme_park", AmenityType.TOURISM);
amenityMap.put("viewpoint", AmenityType.TOURISM);
amenityMap.put("zoo", AmenityType.TOURISM);
amenityMap.put("archaeological_site", AmenityType.HISTORIC);
amenityMap.put("battlefield", AmenityType.HISTORIC);
amenityMap.put("boundary_stone", AmenityType.HISTORIC);
amenityMap.put("castle", AmenityType.HISTORIC);
amenityMap.put("fort", AmenityType.HISTORIC);
amenityMap.put("memorial", AmenityType.HISTORIC);
amenityMap.put("pa", AmenityType.HISTORIC);
amenityMap.put("monument", AmenityType.HISTORIC);
amenityMap.put("ruins", AmenityType.HISTORIC);
amenityMap.put("wayside_cross", AmenityType.HISTORIC);
amenityMap.put("wayside_shrine", AmenityType.HISTORIC);
amenityMap.put("wreck", AmenityType.HISTORIC);
amenityMap.put("alcohol", AmenityType.SHOP);
amenityMap.put("bakery", AmenityType.SHOP);
amenityMap.put("beauty", AmenityType.SHOP);
amenityMap.put("beverages", AmenityType.SHOP);
amenityMap.put("bicycle", AmenityType.SHOP);
amenityMap.put("books", AmenityType.SHOP);
amenityMap.put("boutique", AmenityType.SHOP);
amenityMap.put("butcher", AmenityType.SHOP);
amenityMap.put("car", AmenityType.SHOP);
amenityMap.put("car_repair", AmenityType.SHOP);
amenityMap.put("charity", AmenityType.SHOP);
amenityMap.put("chemist", AmenityType.SHOP);
amenityMap.put("clothes", AmenityType.SHOP);
amenityMap.put("computer", AmenityType.SHOP);
amenityMap.put("confectionery", AmenityType.SHOP);
amenityMap.put("convenience", AmenityType.SHOP);
amenityMap.put("department_store", AmenityType.SHOP);
amenityMap.put("dry_cleaning", AmenityType.SHOP);
amenityMap.put("doityourself", AmenityType.SHOP);
amenityMap.put("electronics", AmenityType.SHOP);
amenityMap.put("fabrics", AmenityType.SHOP);
amenityMap.put("farm", AmenityType.SHOP);
amenityMap.put("florist", AmenityType.SHOP);
amenityMap.put("funeral_directors", AmenityType.SHOP);
amenityMap.put("furniture", AmenityType.SHOP);
amenityMap.put("garden_centre", AmenityType.SHOP);
amenityMap.put("general", AmenityType.SHOP);
amenityMap.put("gift", AmenityType.SHOP);
amenityMap.put("glaziery", AmenityType.SHOP);
amenityMap.put("greengrocer", AmenityType.SHOP);
amenityMap.put("hairdresser", AmenityType.SHOP);
amenityMap.put("hardware", AmenityType.SHOP);
amenityMap.put("hearing_aids", AmenityType.SHOP);
amenityMap.put("hifi", AmenityType.SHOP);
amenityMap.put("ice_cream", AmenityType.SHOP);
amenityMap.put("hardware", AmenityType.SHOP);
amenityMap.put("hearing_aids", AmenityType.SHOP);
amenityMap.put("hifi", AmenityType.SHOP);
amenityMap.put("ice_cream", AmenityType.SHOP);
amenityMap.put("jewelry", AmenityType.SHOP);
amenityMap.put("kiosk", AmenityType.SHOP);
amenityMap.put("laundry", AmenityType.SHOP);
amenityMap.put("mall", AmenityType.SHOP);
amenityMap.put("massage", AmenityType.SHOP);
amenityMap.put("money_lender", AmenityType.SHOP);
amenityMap.put("motorcycle", AmenityType.SHOP);
amenityMap.put("newsagent", AmenityType.SHOP);
amenityMap.put("optician", AmenityType.SHOP);
amenityMap.put("organic", AmenityType.SHOP);
amenityMap.put("outdoor", AmenityType.SHOP);
amenityMap.put("pawnbroker", AmenityType.SHOP);
amenityMap.put("second_hand", AmenityType.SHOP);
amenityMap.put("sports", AmenityType.SHOP);
amenityMap.put("stationery", AmenityType.SHOP);
amenityMap.put("supermarket", AmenityType.SHOP);
amenityMap.put("shoes", AmenityType.SHOP);
amenityMap.put("tattoo", AmenityType.SHOP);
amenityMap.put("toys", AmenityType.SHOP);
amenityMap.put("travel_agency", AmenityType.SHOP);
amenityMap.put("variety_store", AmenityType.SHOP);
amenityMap.put("video", AmenityType.SHOP);
amenityMap.put("dog_park", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("sports_centre", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("golf_course", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("stadium", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("track", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("pitch", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("water_park", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("marina", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("slipway", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("fishing", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("nature_reserve", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("park", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("playground", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("garden", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("common", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("ice_rink", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("miniature_golf", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("dance", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("9pin", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("10pin", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("archery", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("athletics", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("australian_football", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("baseball", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("basketball", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("beachvolleyball", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("boules", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("bowls", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("canoe", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("chess", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("climbing", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("cricket", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("cricket_nets", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("croquet", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("cycling", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("diving", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("dog_racing", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("equestrian", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("football", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("golf", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("gymnastics", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("hockey", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("horse_racing", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("ice_stock", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("korfball", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("motor", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("multi", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("orienteering", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("paddle_tennis", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("paragliding", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("pelota", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("racquet", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("rowing", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("rugby", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("shooting", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("skating", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("skateboard", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("skiing", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("soccer", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("swimming", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("table_tennis", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("team_handball", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("tennis", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("toboggan", AmenityType.LEISURE_AND_SPORT);
amenityMap.put("volleyball", AmenityType.LEISURE_AND_SPORT);
// amenity sub type
amenityMap.put("place_of_worship", AmenityType.HISTORIC);
amenityMap.put("restaurant", AmenityType.SUSTENANCE);
amenityMap.put("food_court", AmenityType.SUSTENANCE);
amenityMap.put("fast_food", AmenityType.SUSTENANCE);
amenityMap.put("drinking_water", AmenityType.SUSTENANCE);
amenityMap.put("bbq", AmenityType.SUSTENANCE);
amenityMap.put("pub", AmenityType.SUSTENANCE);
amenityMap.put("bar", AmenityType.SUSTENANCE);
amenityMap.put("cafe", AmenityType.SUSTENANCE);
amenityMap.put("biergarten", AmenityType.SUSTENANCE);
amenityMap.put("kindergarten", AmenityType.EDUCATION);
amenityMap.put("school", AmenityType.EDUCATION);
amenityMap.put("college", AmenityType.EDUCATION);
amenityMap.put("library", AmenityType.EDUCATION);
amenityMap.put("university", AmenityType.EDUCATION);
amenityMap.put("ferry_terminal", AmenityType.TRANSPORTATION);
amenityMap.put("bicycle_parking", AmenityType.TRANSPORTATION);
amenityMap.put("bicycle_rental", AmenityType.TRANSPORTATION);
amenityMap.put("bus_station", AmenityType.TRANSPORTATION);
amenityMap.put("car_rental", AmenityType.TRANSPORTATION);
amenityMap.put("car_sharing", AmenityType.TRANSPORTATION);
amenityMap.put("fuel", AmenityType.TRANSPORTATION);
amenityMap.put("car_wash", AmenityType.TRANSPORTATION);
amenityMap.put("grit_bin", AmenityType.TRANSPORTATION);
amenityMap.put("parking", AmenityType.TRANSPORTATION);
amenityMap.put("taxi", AmenityType.TRANSPORTATION);
amenityMap.put("atm", AmenityType.FINANCE);
amenityMap.put("bank", AmenityType.FINANCE);
amenityMap.put("bureau_de_change", AmenityType.FINANCE);
amenityMap.put("pharmacy", AmenityType.HEALTHCARE);
amenityMap.put("hospital", AmenityType.HEALTHCARE);
amenityMap.put("baby_hatch", AmenityType.HEALTHCARE);
amenityMap.put("dentist", AmenityType.HEALTHCARE);
amenityMap.put("doctors", AmenityType.HEALTHCARE);
amenityMap.put("veterinary", AmenityType.HEALTHCARE);
amenityMap.put("first_aid", AmenityType.HEALTHCARE);
amenityMap.put("architect_office", AmenityType.ENTERTAINMENT);
amenityMap.put("arts_centre", AmenityType.ENTERTAINMENT);
amenityMap.put("cinema", AmenityType.ENTERTAINMENT);
amenityMap.put("community_centre", AmenityType.ENTERTAINMENT);
amenityMap.put("fountain", AmenityType.ENTERTAINMENT);
amenityMap.put("nightclub", AmenityType.ENTERTAINMENT);
amenityMap.put("stripclub", AmenityType.ENTERTAINMENT);
amenityMap.put("studio", AmenityType.ENTERTAINMENT);
amenityMap.put("theatre", AmenityType.ENTERTAINMENT);
amenityMap.put("sauna", AmenityType.ENTERTAINMENT);
amenityMap.put("brothel", AmenityType.ENTERTAINMENT);
amenityMap.put("internet_access", AmenityType.OTHER);
amenityMap.put("bench", AmenityType.OTHER);
amenityMap.put("clock", AmenityType.OTHER);
amenityMap.put("courthouse", AmenityType.OTHER);
amenityMap.put("crematorium", AmenityType.OTHER);
amenityMap.put("embassy", AmenityType.OTHER);
amenityMap.put("emergency_phone", AmenityType.OTHER);
amenityMap.put("fire_hydrant", AmenityType.OTHER);
amenityMap.put("fire_station", AmenityType.OTHER);
amenityMap.put("grave_yard", AmenityType.OTHER);
amenityMap.put("hunting_stand", AmenityType.OTHER);
amenityMap.put("marketplace", AmenityType.OTHER);
amenityMap.put("police", AmenityType.OTHER);
amenityMap.put("post_box", AmenityType.OTHER);
amenityMap.put("post_office", AmenityType.OTHER);
amenityMap.put("prison", AmenityType.OTHER);
amenityMap.put("public_building", AmenityType.OTHER);
amenityMap.put("recycling", AmenityType.OTHER);
amenityMap.put("shelter", AmenityType.OTHER);
amenityMap.put("telephone", AmenityType.OTHER);
amenityMap.put("toilets", AmenityType.OTHER);
amenityMap.put("townhall", AmenityType.OTHER);
amenityMap.put("vending_machine", AmenityType.OTHER);
amenityMap.put("waste_basket", AmenityType.OTHER);
amenityMap.put("waste_disposal", AmenityType.OTHER);
}
}

View file

@ -14,11 +14,11 @@ import org.apache.commons.logging.Log;
import com.osmand.LogUtil;
import com.osmand.data.Amenity;
import com.osmand.data.AmenityType;
import com.osmand.data.Building;
import com.osmand.data.City;
import com.osmand.data.Region;
import com.osmand.data.Street;
import com.osmand.data.Amenity.AmenityType;
import com.osmand.data.City.CityType;
import com.osmand.data.index.IndexConstants.IndexBuildingTable;
import com.osmand.data.index.IndexConstants.IndexCityTable;

View file

@ -23,6 +23,7 @@ public class OSMSettings {
HISTORIC("historic"),
NATURAL("natural"),
INTERNET_ACCESS("internet_access"),
OPENING_HOURS("opening_hours"),
;

View file

@ -71,13 +71,13 @@ import org.xml.sax.SAXException;
import com.osmand.Algoritms;
import com.osmand.ExceptionHandler;
import com.osmand.data.Amenity;
import com.osmand.data.AmenityType;
import com.osmand.data.Building;
import com.osmand.data.City;
import com.osmand.data.DataTileManager;
import com.osmand.data.MapObject;
import com.osmand.data.Region;
import com.osmand.data.Street;
import com.osmand.data.Amenity.AmenityType;
import com.osmand.data.City.CityType;
import com.osmand.data.index.DataIndexWriter;
import com.osmand.data.preparation.DataExtraction;

View file

@ -10,7 +10,7 @@ import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import com.osmand.data.Amenity;
import com.osmand.data.Amenity.AmenityType;
import com.osmand.data.AmenityType;
import com.osmand.data.index.IndexConstants;
import com.osmand.data.index.IndexConstants.IndexPoiTable;
import com.osmand.osm.LatLon;

View file

@ -0,0 +1,37 @@
package com.osmand;
import java.util.List;
import com.osmand.data.Amenity;
public class PoiFilter {
public boolean isSearchFurtherAvailable(){
return false;
}
public List<Amenity> searchFurther(){
return null;
}
public List<Amenity> getLastSearchedResults(){
return null;
}
public List<Amenity> initializeNewSearch(double lat, double lon){
return null;
}
public String getName(){
return null;
}
public String getFilterId(){
return null;
}
public boolean isStandardFilter(){
return true;
}
}

View file

@ -17,7 +17,7 @@ import android.graphics.BitmapFactory;
import android.os.Environment;
import com.osmand.data.Amenity;
import com.osmand.data.Amenity.AmenityType;
import com.osmand.data.AmenityType;
import com.osmand.data.index.IndexConstants;
import com.osmand.data.preparation.MapTileDownloader;
import com.osmand.data.preparation.MapTileDownloader.DownloadRequest;

View file

@ -27,7 +27,7 @@ import com.osmand.R;
import com.osmand.ResourceManager;
import com.osmand.activities.MapActivity;
import com.osmand.data.Amenity;
import com.osmand.data.Amenity.AmenityType;
import com.osmand.data.AmenityType;
import com.osmand.osm.LatLon;
import com.osmand.osm.MapUtils;

View file

@ -19,7 +19,7 @@ import android.widget.TextView;
import com.osmand.Algoritms;
import com.osmand.R;
import com.osmand.data.Amenity.AmenityType;
import com.osmand.data.AmenityType;
/**
* @author Maxim Frolov