Package org.geonames

Examples of org.geonames.ToponymSearchCriteria


    String searchString = replaceUnderscoreChar(geoString);

    Geo geo = null;
    try {
      ToponymSearchCriteria searchObj = new ToponymSearchCriteria();
      searchObj.setMaxRows(1);
      searchObj.setQ(searchString);
      logger.debug("search criteria: " + searchObj);
      ToponymSearchResult result = WebService.search(searchObj);
      if (result != null && result.getTotalResultsCount() > 0) {
        Toponym topo = result.getToponyms().get(0);
        geo = new Geo(topo.getLatitude(), topo.getLongitude());
View Full Code Here


   * @return a list of places
   */
  public static List<Toponym> readLocationForKeyword(String q, Style style) {
    List<Toponym> list = new ArrayList<Toponym>();
    ToponymSearchResult locationSearchResult;
    ToponymSearchCriteria searchLocation = new ToponymSearchCriteria();
    searchLocation.setMaxRows(7);
    searchLocation.setFeatureClass(FeatureClass.P);
    searchLocation.setStyle(style);
    searchLocation.setQ(q);
    try {
      WebService.setUserName("erudika");
      locationSearchResult = WebService.search(searchLocation);
      if (locationSearchResult != null) {
        list.addAll(locationSearchResult.getToponyms());
View Full Code Here

   * @return a list of places
   */
  public static List<Toponym> readLocationForKeyword(String q, Style style) {
    List<Toponym> list = new ArrayList<Toponym>();
    ToponymSearchResult locationSearchResult;
    ToponymSearchCriteria searchLocation = new ToponymSearchCriteria();
    searchLocation.setMaxRows(7);
    searchLocation.setFeatureClass(FeatureClass.P);
    searchLocation.setStyle(style);
    searchLocation.setQ(q);
    try {
      WebService.setUserName("erudika");
      locationSearchResult = WebService.search(searchLocation);
      if (locationSearchResult != null) {
        list.addAll(locationSearchResult.getToponyms());
View Full Code Here

   * @return a list of places
   */
  public static List<Toponym> readLocationForKeyword(String q, Style style) {
    List<Toponym> list = new ArrayList<Toponym>();
    ToponymSearchResult locationSearchResult;
    ToponymSearchCriteria searchLocation = new ToponymSearchCriteria();
    searchLocation.setMaxRows(7);
    searchLocation.setFeatureClass(FeatureClass.P);
    searchLocation.setStyle(style);
    searchLocation.setQ(q);
    try {
      WebService.setUserName("erudika");
      locationSearchResult = WebService.search(searchLocation);
      if (locationSearchResult != null) {
        list.addAll(locationSearchResult.getToponyms());
View Full Code Here

   * @return a list of places
   */
  public static List<Toponym> readLocationForKeyword(String q, Style style) {
    List<Toponym> list = new ArrayList<Toponym>();
    ToponymSearchResult locationSearchResult;
    ToponymSearchCriteria searchLocation = new ToponymSearchCriteria();
    searchLocation.setMaxRows(7);
    searchLocation.setFeatureClass(FeatureClass.P);
    searchLocation.setStyle(style);
    searchLocation.setQ(q);
    try {
      WebService.setUserName("erudika");
      locationSearchResult = WebService.search(searchLocation);
      if (locationSearchResult != null) {
        list.addAll(locationSearchResult.getToponyms());
View Full Code Here

   * @return a list of places
   */
  public static List<Toponym> readLocationForKeyword(String q, Style style) {
    List<Toponym> list = new ArrayList<Toponym>();
    ToponymSearchResult locationSearchResult;
    ToponymSearchCriteria searchLocation = new ToponymSearchCriteria();
    searchLocation.setMaxRows(7);
    searchLocation.setFeatureClass(FeatureClass.P);
    searchLocation.setStyle(style);
    searchLocation.setQ(q);
    try {
      WebService.setUserName("erudika");
      locationSearchResult = WebService.search(searchLocation);
      if (locationSearchResult != null) {
        list.addAll(locationSearchResult.getToponyms());
View Full Code Here

   * @return a list of places
   */
  public static List<Toponym> readLocationForKeyword(String q, Style style) {
    List<Toponym> list = new ArrayList<Toponym>();
    ToponymSearchResult locationSearchResult;
    ToponymSearchCriteria searchLocation = new ToponymSearchCriteria();
    searchLocation.setMaxRows(7);
    searchLocation.setFeatureClass(FeatureClass.P);
    searchLocation.setStyle(style);
    searchLocation.setQ(q);
    try {
      WebService.setUserName("erudika");
      locationSearchResult = WebService.search(searchLocation);
      if (locationSearchResult != null) {
        list.addAll(locationSearchResult.getToponyms());
View Full Code Here

TOP

Related Classes of org.geonames.ToponymSearchCriteria

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.