Safety Spot location map for testing NMASafetySpotWarnerDelegate class - here-api

To test a class with NMASafetySpotWarnerDelegate protocol I need locations off Safety Spots (NMASafetySpot), to setup a equivalent rout for Turn-By-Turn navigation.
As well i search locations where realistic views (NMANavigationManagerDelegate) are supported.
Exist a HERE map with this type of information?
How can I test the callbacks for safety spots and realistic views?

You can look at the coverage information in the user guide to get an idea of the number of safety spots present in each country. Also, you can make the safety spots visible on the NMAMapView to look for them using the safetySpotsVisible property.
For Realistic View, this feature is dependent on having proper lane and junction information which should be widely available in HERE map data. You can get an overview of which countries have high quality navigation data here. Note that in order to turn on Relistic View you must set the realisticViewMode and realisticViewAspectRatios properties of the NMANavigationManager

Related

Can I request a truck route with a maximum gradient or elevation change?

I am setting up a routing service specific to certain types of trucks. I have been searching the HERE documentation for a way to specify a maximum gradient for the route, but cannot seem to find such a function. Am I missing something? Is this possible? My users indicate that 5% is a good threshold for certain trucks.
Fleet Telematics API provides you the capability to handle such situation. PDE layer supports slope information in ADAS_ATTRIB_FCn. Below are some methods to achieve the above ask. You can pick any of the suggested ways depending on your usecase. Hope you find it useful.
Set fuel consumption on slope to very high number – calculateroute.json method provides a requestParameter “customConsumptionDetails” in which the slope value could be set very high number that the route calculation tries to avoid such routes. Refer https://cle.api.here.com/swagger-ui.html?app_code=xxxx&app_id=xxxx#!/Routing_%26_Route_Matching/calculateRouteUsingGET
Request for adas attributes and avoid slope links - Set requestParamater “attributes=ADAS_ATTRIB_FCn (SLOPES)” and get adas layer. Determine the links you would want to traverse and trigger same query setting “avoidLinks” requestParameter. Refer https://cle.api.here.com/swagger-ui.html?app_code=xxxx&app_id=xxxx#!/Routing_%26_Route_Matching/calculateRouteUsingGET. Also https://tcs.ext.here.com/pde/layer?region=WEU&release=18144&url_root=pde.api.here.com&layer=ADAS_ATTRIB_FC1 for explanation on ADAS attributes.
Add custom overlay – This method is used widely by our current customers. You can add a custom layer on top of Here Map layers where you can avoid links/roads where your trucks should pass through. Read more on overlays - https://developer.here.com/documentation/custom-routing-extension/topics/resource-overlay.html

Check if a railway track is near location

I've been looking into this for quite a bit, but couldn't find a solution. Is there a way to find out whether railway tracks are near a users position?
The APIs don't provide a places search like this (see Google Places supported types for this). One possibility would be to download the OpenStreetMap dataset for your region, import it in a database and extract the datasets Railways. Then you could pass the users position to your database (PostGIS) and check if there is a railways matching your filters.
Moreover there is the OpenRailwayMap, if you just need a possibility to do some visual identification of railway tracks. See OpenRailwayMap API site for further usage information.

Insta-like filters on Google Street view imagery

Is it eligible to apply real-time insta-like filters on Google Street View imagery retrieved via the google street view API that will be published online as a part of a slideshow in a web app?
No Google street view Content will be cached on a third party server in the process.
Do you think this would be in alignment with google's terms?
Streetview seems to be under the Google Maps umbrella as far as the api TOS goes. The document isn't that long, but your use case doesn't seem to be in direct violation. I would still be wary of something such as Section 8.3 (a):
Content (including but not limited to map data, traffic, directions,
and places) is provided for planning purposes only. You may find that weather conditions, construction projects, closures, or other events may cause road conditions or directions to differ from the results depicted in the Content. You should exercise judgment in your use of the Content.
Although that seems more like a caveat emptor warning admonishing them of liability if their data is inaccurate and tells you to turn left off of a cliff. I insist that you should really read the actual terms. There are a lot of little things that they seem to be worried about in there and I would definitely recommend having an attorney help you navigate what's going on in there.
I'd hazard to say you'd be fine especially with no caching, but you should really consult with an attorney and read the terms.

GTFS/NextBus/Google Maps - transit distance traveled

I am trying to get the distance traveled on a transit route -- particularly San Francisco MUNI, but the standards NextBus, GTFS, and Google Maps API appear to be universal. I'm comfortable using any of these APIs, I'm just not sure how to go about this problem.
The easy way - ask Google Maps (this using webservices, but there is also the javascript API):
http://maps.googleapis.com/maps/api/directions/json?origin=37.7954199,-122.397&destination=37.7873299,-122.44691&sensor=false&mode=transit&departure_time=1348109609&alternatives=true
this JSON includes distance traveled, but there are two issues:
Google does not allow you to use this data unless you're displaying a map, which I don't want to do
I would need to ensure that the distance returned is for the correct route/line, since it can/will give multiple routing options. This is probably doable but would require more logic.
EDIT: using alternatives=true (or provideRouteAlternatives: true using the javascript API) only returns a maximum of 3 routes, which here in SF often doesn't include the route I'm looking for (other transit agencies, multiple lines on the same route, etc). So this isn't such a great option.
NextBus:
example route config:
http://webservices.nextbus.com/service/publicXMLFeed?command=routeConfig&a=sf-muni&r=1
The coordinates for each stop are given, but connecting the dots on those is not the same as the route taken -- it will cut corners, etc, and I need this to be accurate. The actual route taken is given under <path>/<point>, but I don't see any obvious correlation between stop and path coordinates. Plus, NextBus says in their documentation (p.10 near the bottom) that you should NOT connect points between <path> segments, they're only meant for drawing on a map and can overlap.
GTFS:
The GTFS data also separates stop and "shape" coordinates (like NextBus paths). Unfortunately, the coordinates are slightly different for the same stops between NextBus and GTFS (rounding), though the stop ID/tags are the same. Also, the data files are in the megabytes, and I need to use this for a mobile app. I suppose I could put all the data in a database and query that, but that still leaves figuring out how to correlate the stops with the shape. The "shapes_distance_traveled" column in the shapes.txt file is especially promising. MUNI chooses to leave the optional "shapes_distance_traveled" field out of stop_times.txt, though.
Any advice would be appreciated, I understand this seems like an epic task to get a simple value. Maybe I'll just throw a map in to legitimately use the distance :)
Instead of using Google Maps, I would look into the un-encumbered licensing of OpenStreetMap. There are multiple
routing engines that can use OSM data. Personally, I would use routing in PostGIS or SQLite, but depending on your skillset you might choose another.
You've clearly done your research, (+1), and as you said, the easy way is to ask Google. If it is worth for you then you might want to look into purchasing a business licence to use the Google Maps API, and negotiate with them about the requirement of displaying a map. That's the only legal way I can think of with the Google API. Alternatively, you can try building you own routing engine with data from the TIGER data set, which is freely available from the US Census Bureau, but again, as you said, it may seem like an epic task. :-)

Howto visually design a mashup query for programatic extraction

I'm into development of an application that fetches various inputs from internet pages whereas each information snippet comes from a different location (mashup).
I would like to generate the mashup building block (snippets) through a visual tool.
Do you know of anything similar that can be used for such a project? (Already made control, a sample code, article, etc.)
Preferred development environment is .NET - but not mandatory.
IMO the major challenge will be to extract the appropriate information from each feed in semantic form. Wikipedia describes mashups as:
There are many types of mashups, such
as consumer mashups, data mashups, and
enterprise mashups. The most common
type of mashup is the consumer mashup,
aimed at the general public.
Data mashups combine similar types of
media and information from multiple
sources into a single representation.
One example is AlertMap, which
combines data from over 200 sources
related to severe weather conditions,
biohazard threats, and seismic
information, and displays them on a
map of the world; another is Chicago
Crime Map, which indicates the crime
rate and location of crime in Chicago.
The classic mashup - Chicago crime - works because key information such as dates and geolocations are available semantically. Other types of common information are persons, organisations, and domain-specific identifiers.
When you have identified these you may wish to consider the RDF-based tools that the semantic web is developing. Note that governments are starting to emit their data in RDF so I would see this as a key technology
If your web pages do not have semantic information immediately you will probably have to create screen scrapers and HTML parsers. That's not very glamorous, there are no special tools and tends to be just hard work.

Resources