FetchLinkID-Information from TopologieID - here-api

I'am using the matchroute.json API to MapMatch my GPS Trace on the Links. Now I want to fetch the TopologyID of the driven link. This is possible with &attribute=STAB_TOPO_ID_FCN(TOPOLOGY_ID). But I also want the information about which LinkIDs are on this TopologyIDs. I saw there is an Option in TOPO_SEG_LINK_FCN(LINK_IDS), but it seems that it doesn't work like espected.
Is there an Option to get the LinkIDs Information for a specific TopologyID?
Example what I tried: https://rme.api.here.com/2/matchroute.json?app_id=XXX&app_code=XXX&legal=access,gate,oneway,thrutraf,turn&attributes=TOPO_SEG_LINK_FCN(TOPOLOGY_ID),LINK_ATTRIBUTE_FCN(TRAVEL_DIRECTION),LINK_FCN(REF_NODE_NEIGHBOR_LINKS,NONREF_NODE_NEIGHBOR_LINKS),STAB_TOPO_ID_FCN(TOPOLOGY_ID,LINK_IDS)&routemode=car&file=bGF0aXR1ZGUsbG9uZ2l0dWRlCjQ4LjgxMDY2LCAxMS4zNjkxOQo0OC44MTA3MTcsIDExLjM2OTIKNDguODEwNzc4LCAxMS4zNjkyMDIKNDguODEwODQ4LCAxMS4zNjkxOTcKNDguODEwOTI4LCAxMS4zNjkxOTkKNDguODExMDE3LCAxMS4zNjkyMTQKNDguODExMTEzLCAxMS4zNjkyMzIKNDguODExMjE1LCAxMS4zNjkyNDcKNDguODExMzIyLCAxMS4zNjkyNTkKNDguODExNDM0LCAxMS4zNjkyNzMKNDguODExNTUsIDExLjM2OTI4Nwo0OC44MTE2NjgsIDExLjM2OTI5OTk5OTk5OTk5OQo0OC44MTE3ODgsIDExLjM2OTMxMQo0OC44MTE5MDcsIDExLjM2OTMyMgo0OC44MTIwMjUsIDExLjM2OTMzMgo0OC44MTIxNDMsIDExLjM2OTM0MQo0OC44MTIyNjEsIDExLjM2OTM1MQo0OC44MTIzNzksIDExLjM2OTM2MQo0OC44MTI0OTgsIDExLjM2OTM3Mgo0OC44MTI2MTgsIDExLjM2OTM4CjQ4LjgxMjczNywgMTEuMzY5Mzg0CjQ4LjgxMj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uMzY5OTc1CjQ4LjgzODA3OSwgMTEuMzcwMDI4CjQ4LjgzODI0MSwgMTEuMzcwMDgKNDguODM4NDA0LCAxMS4zNzAxMjUKNDguODM4NTcyLCAxMS4zNzAxNjMKNDguODM4NzM5LCAxMS4zNzAxOTcKNDguODM4OTA5LCAxMS4zNzAyMjMKNDguODM5MDc5LCAxMS4zNzAyNDQKNDguODM5MjUsIDExLjM3MDI2NQo0OC44Mzk0MjIsIDExLjM3MDI4Nwo0OC44Mzk1OTQsIDExLjM3MDMwOA%3D%3D

The route matching API provides information that matches the links along your route. So for each matched link, the TAB_TOPO_ID_FCN layers gives the topology ID. However, to get all link IDs in a topology ID, you will need to separately retrieve this information from the TOPO_SEG_LINK_FC{N} of the Fleet Telematics Advanced Data Sets.
https://developer.here.com/documentation/platform-data/topics/what-is.html

Related

Identify names of metrics from view

I need to query the Google Analytics API to reproduce the following view:
In my Python code I have a list of dimensions and metrics that I want to query:
'metrics': [{'expression': 'ga:productListClicks'}],
'dimensions': [{'name': 'ga:landingPagePath'}],
My problem is that I do not know the name of the columns in the format 'ga:...' and in the Query Explorer there are multiple names for a given column.
Is there a way to see the name of the columns in the format 'ga:...' directly in GA?
If not, how can I find the right names?
If you use the GA query builder, you can use the type ahead/search feature of the tool to find these attributes.
You'll find the query explorer here:
https://ga-dev-tools.appspot.com/query-explorer/
This is what it looks like when you find these:
Some of the ones you're looking for are:
ga:impressions
ga:adClicks
ga:CTR
ga:sessions
ga:bounceRate
etc.
The benefit of doing this in the query builder, is you can then test it before going back to python. There are a lot of complications of mixing metrics and dimensions, and making sure what you're doing is valid here first will save headaches!

Google places api not showing results for some places

Hello i am using simple google map places api to get near by atms for users. My client lives around new york and for some strange reason api shows zero results for that place, but works fine near me (pakistan) . I searched for it a little and found out it was google's issue and some other places were also experiencing the same problem. But i never quite found any solution for this.
This is the get call i use
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=40.7128,74.1059&radius=10000000&keyword=atm&key=MY_KEY
I would really appreciate the help. Thank you :)
Google place nearby search maximum 50,000 meters (31 miles) . if you try enter more than 50,000 it not work proper.
There is another way for find all ATM in a city. google provide Text Search Requests
https://maps.googleapis.com/maps/api/place/textsearch/json?query=atm+in+Reno,NV,89501,USA&key={API_KEY}
query = keyword + in + city Name
for get city name using latitude longitude
http://maps.googleapis.com/maps/api/geocode/json?latlng=39.52963,-119.81380&sensor=true
For more information how to get city name using latitude longitude
https://developers.google.com/maps/documentation/geocoding/start?csw=1#ReverseGeocoding
for more information about how to use Text Search Requests
https://developers.google.com/places/web-service/search
OR (second way)
There is another way for find all ATM in a city.
Open Google Maps .
create 10-12 or more points latitude , longitude value to trigger
request.
Then use a loop to find all places within these points.
If you want more appropriate results, increase first trigger points
for your requests.
- It is just a logic i created in php.
$triggerPoints = array("lat1,long1", "lat2,long2", "lat3,long3",....);
foreeach(triggerPoints as $tP){
$requestUrl = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=$tP&radius=[YOUR_RADIUS_VALUE]&type=[YOUR_TYPE]&name=panera&key=[YOUR_KEY_HERE";
$results = file_get_contents($requestUrl);
//Do what you want with response JSON data
}
SHORT ANSWER: Use logical types with your needs.
In my case i used food types instead of supermarket. In some cases, my local market named A101 wasnt found under supermarkets. To find which keywords is best for you, you can search below url with your location and map_key and find most common keywords under types for each query and use it.
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=40.986527896166244,%2029.24326049097467&rankby=distance&keyword=a101&key=YOUR_MAP_KEY

How do I get a Price for Amtrak rail when using the Sabre RailShopRS

I am trying to implement AMTRAK Rail bookings using Sabre's RailShopRS.
I've been able to get a list of available journeys but now I'm struggling to figure out how I get a price for those journeys. It looks like the price should be part of the availability response but there never appears to be a price anywhere.
Is this something that should be part of the initial availability response or do I have to make a new request with details of the specific train and faretype?
Does this help?
http://files.developer.sabre.com/doc/providerdoc/rail/RailServicesDescription_v1.12.0.html#amtrak
Here are some sample request and responses:
http://files.developer.sabre.com/doc/providerdoc/rail/RS_Sample_RQ_RS_1_12_0.zip
There should be a list of 'Offers' within the response, with a reference to a JourneyId that can be used to match the fares with its corresponding journey/train option.

How does Google Maps decide when to use a specific icon?

I am using the Google Maps Places library to do a search for nearby hospitals, but it returns results that aren't necessary hospitals (but have 'hospital' as one of their types). However, I've noticed that actual hospitals have a hospital icon on the map, so Google must somehow know which establishments are actually hospitals. Does anyone know if the public has access to this data?
This is the icon I'm referring to: https://www.dropbox.com/s/1jfqcayxavjhlyi/Screenshot%202015-03-17%2017.20.19.png?dl=0
Example of request I'm making:
var request = {
location: self.location,
radius: 20000,
types: ['hospital'],
keyword: 'hospital'
};
Example result that isn't a hospital:
{"geometry":{"location":{"k":44.815958,"D":-68.808244}},
"icon":"http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png","id":"de6e60bd70b90ba4cb86afe149a60169553607f1",
"name":"Penobscot Community Health Center",
"opening_hours":{"open_now":true,"weekday_text":[]},
"photos":[{"height":320,"html_attributions":[],"width":320}],"place_id":"ChIJj--4INRKrkwRN0z2XkoJtVU",
"rating":3.1,
"reference":"CoQBdAAAADmf3YA0659efzMbCSPOK6SZttkfus7aWBDhrZZyX63Szl256BRcpz81LH6rIuONldYv256tsN7Zv-N6ZkOkJadlD2VS01bs7C4ierKvGUMyJOJu657xL5MvidF3Tgs9iejeJcXsxjDJYOwtN3m3sbfClfWYVnnIL4hMLYV8P9TnEhBurfJv_30CAG2wp1V73POVGhR-7fz1mCdh4OYWSa3Pw0mPupckoQ",
"scope":"GOOGLE",
"types":["hospital","pharmacy","store","health","establishment"],
"vicinity":"1012 Union Street, Bangor",
"html_attributions":[]}
My guess is there are a couple ways to get around this. You might remove the keyword argument from the API, which acts like a search term rather than a specific match on a type of location like the type field does.
You may want to be careful about your radius value choice.
Next, if you do a search on Google Maps in general you'll get a broad assortment of results. Do you need every result to be an actual hospital or can you do your own filtering afterwards?
If you do your own filtering it looks like type information and even icons are embedded in the result JSON. You might see if there's a distinguishing characteristic between the types of results you want and filter by that. Otherwise, any additional graphical data would not be accessible via the API.

How to use Facebook Graph api

I am using facebook graph Api for my application where i want the data of this page.
http://www.facebook.com/pages/
In this page there is option TV SHOW I want collect all information of that page.
But i didn't any graph api method for this page.
Please help me for this problem.
As far as I can tell, this isn't something you can do. It has to do with what Facebook sets as "indexable" columns in their tables. For example, the page table has a type ID and the TV SHOWS category ID appears to be 89, so you'd think you could run a FQL query such as:
https://api.facebook.com/method/fql.query?query=SELECT page_id, name FROM page WHERE type=89
or perhaps:
https://api.facebook.com/method/fql.query?query=SELECT page_id, name FROM page WHERE type='TV SHOW'
But you'll get this notice:
Your statement is not indexable. The
WHERE clause must contain an indexable
column.
Unfortunately, the only two indexable columns for WHERE statements using the page table are page_id and name. So you can only query this table for one page at a time. Which makes sense when you consider how expensive a search like that would be on billions of records.
You can do a generic graph search for "TV SHOWS" but it won't give the the results on the page index as you requested:
https://graph.facebook.com/search?q=TV%20SHOWS&type=page
The Graph API is more about introspection/connections between objects than an open search protocol.

Resources