Datasets – ShowNearBy (SNB)

ShowNearBy
ShowNearby, founded by a group of location fanatics, is positioned as the global organization to define prevalent, location-based services and information for consumers and businesses. Through the group’s capabilities to develop location-specific applications for mobile and web platforms, ShowNearby provides users the avenue to identify locations of persons, points-of-interest, and activities. Thereafter, translate those details into usable data.

Datasets Available

Dataset Description URL Metadata
ATM ATMs available in Singapore http://api.projectnimbus.org/snbodataservice.svc/ATMSet Click Here
Bus Stop Bus Stops available in Singapore http://api.projectnimbus.org/snbodataservice.svc/BusStopSet Click Here
Clinic Clinic available in Singapore http://api.projectnimbus.org/snbodataservice.svc/ClinicSet Click Here
Convenience Store Convenience Stores available in Singapore http://api.projectnimbus.org/snbodataservice.svc/ConvenienceStoreSet Click Here
Supermarket Supermarkets available in Singapore http://api.projectnimbus.org/snbodataservice.svc/SupermarketSet Click Here
AED AED available in Singapore http://api.projectnimbus.org/snbodataservice.svc/AEDSet Click Here

Code Snippet

.NET – How do I access a complete list of ATMs near me

public List<ATMEntry> GetATMFromNimbusSNB(string AccountKey, string UniqueUserID)
    {

        System.Net.WebRequest wr=
          HttpWebRequest.Create(
            "http://api.projectnimbus.org/snbodataservice.svc/ATMSet?Latitude=1.3&Longitude=103.85&Distance=2000");
        wr.Headers.Add("AccountKey",AccountKey);
        wr.Headers.Add("UniqueUserID",UniqueUserID);
        wr.Method = "GET";
        WebResponse res = wr.GetResponse();
        string resStr
         = new System.IO.StreamReader(res.GetResponseStream()).ReadToEnd();

        XNamespace atomNS
          = "http://www.w3.org/2005/Atom";
        XNamespace dNS
          = "http://schemas.microsoft.com/ado/2007/08/dataservices";
        XNamespace mNS
          = "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata";

        List<ATMEntry> results
          = (from item in XElement.Parse(resStr).Descendants(atomNS + "entry")
            let atms = item.Element(atomNS + "content").Element(mNS +"properties")
                select new ATMEntry() {
                ATMID = atms.Element(dNS +"ATMID").Value,
                Name = atms.Element(dNS +"Name").Value,
                Lat = atms.Element(dNS + "Latitude").Value,
                Lon = atms.Element(dNS + "Longitude").Value
            }).ToList();

        return results;
    }

Java – How do I access a complete list of ATMs near me

public ArrayList<ATM> getATMSNearMe(String accountKey, String uniqueId) {
  atmList = new ArrayList<ATM>();
  try {
    URL _url = new URL("http://api.projectnimbus.org/snbodataservice.svc/ATMSet?Latitude=1.3&Longitude=103.85&Distance=2000");
    URLConnection _urlConn = _url.openConnection();
    _urlConn.setRequestProperty("accept", "*/*");
    _urlConn.addRequestProperty("AccountKey", accountKey);
    _urlConn.addRequestProperty("UniqueUserID", uniqueId);
    BufferedReader br = new BufferedReader(new InputStreamReader(_urlConn.getInputStream()));
    String line = null;
    StringBuilder strBuilder = new StringBuilder();
    while ((line = br.readLine()) != null) {
      strBuilder.append(line);
      System.out.println(line);
    }
}

String[] IProperties = strBuilder.toString().split("<m:properties>");
    for (String str : IProperties) {
      ATM atm = new ATM();
      atm.setATMID(Utils.getStringBetween(str, "<d:ATMID m:type=\"Edm.Int32\">", "</d:ATMID>"));
      atm.setName(Utils.getStringBetween(str, "<d:Name>", "</d:Name>"));
      atm.setLatitude(Utils.getStringBetween(str, "<d:Latitude m:type=\"Edm.Double\">", "</d:Latitude>"));
      atm.setLongitude(Utils.getStringBetween(str, "<d:Longitude m:type=\"Edm.Double\">", "</d:Longitude>"));
      atmList.add(atm);
      }
    } catch (MalformedURLException ex) {
        ex.printStackTrace();
    } catch (IOException ex) {
        ex.printStackTrace();
    } catch (Exception ex) {
        ex.printStackTrace();
    }
    return atmList;
}

Helpers Available

.NET – C# Proxy Classes: click here | Read this blog post for more information to use these proxy classes.

JAVA – Read this blog post for more information to use JAVA to connect to the data service.

PHP & AJAX – Read this blog post for more information to use PHP/AJAX to connect to the data service.

obj C / xcode – coming soon

Terms of Use

The datasets:

  • Are here as a community technology preview for a period of time (TBD).
  • Cannot be used in any public offering.
  • Are offered as-is with no official support.

Support

None at this time.

Advertisement
This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to Datasets – ShowNearBy (SNB)

  1. Pingback: What is Project Nimbus? How do I get started? « Project Nimbus

  2. sychee says:

    What do you mean by “Cannot be used in any public offering.” Can I use the dataset to develop Windows Phone 7 applications?

    • projectnimbus says:

      Hi sychee,

      We are currently unable to guarantee the availablity of the dataset as we are still in the technical preview stage.
      Currently, for shownearby’s dataset, please be informed that it is not comprehensive. There are only a preview number of datasets available.

      Team Project Nimbus

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s