Indoor mapping in iOS - ios

I have map of my office room. I am trying to implement indoor mapping inside the office room for iOS. I watched the video from the WWDC2014 on Corelocation and indoor mapping. I also have the sample code from them. I am not sure what exactly they mean by "floor plan pixel". I have an image of the office and how can I use the following image to use as the floor plan pixel? I will really appreciate if somebody can guide me how to do or let me know if there are githubs or other resources are doing indoor mapping and tracking in iOS.
Thank you

You will need to apply for your venue to be mapped on Apple's Map Connect Website. You will have to declare that you are the manager for the venue, then instructions will follow. This will involve you providing blueprints for the venue to Apple, locations of Wi-Fi base stations and (possibly) iBeacons. You will have to use Apple's specific app (that you find in the Appstore) to map the venue. When all the process is done, you will be online: you should be able to see your venue in Apple maps and do whatever your need to do.
Having said that, Apple seems, still, focussed on venues that have at least one million visitors per year. If your venue is smaller you are stuck with iBeacons and your own implementation of a positioning / proximity algorithm. Take a look at Open Tagger, as an example in Swift, it will give you an idea of the task and hopefully a very good starting point.
https://github.com/PaoloLongato/open-tagger/tree/github-master

Related

Why ARGeoTrackingConfiguration is not available everywhere?

I already posted this question on the apple dev forum without any answer, so I try my luck here :
The ARkit is a great tool, I have my small app doing things, and it's fun !
but I wanted to try to migrate from ARWorldConfiguration to ARGeoTrackingConfiguration
and then we can see that this configuration is limited to a couples of USA cites only !
But I can't manage to figure Why and most importlantly if, in the near future, this will be expanded world wide ?
That's because ARGeoTrackingConfig doesn't use Google Maps. Apple runs its own LiDAR-equipped vehicles for digitizing cities to supply Apple Maps with all necessary information stored on Apple servers. That info contains precise GPS coordinates and Machine Learning mlmodel that visually recognises every pre-digitized location. And that specific info is indispensable when you're running ARKit's app with geo anchors.
At the moment only several US cities are available for seeding ARGeoAnchors. However, in 2021 some European and Asian cities will be available for ARKit's geo anchoring as well.
Look at this post to find out how to implement ARGeoTrackingConfig.

Is there any restriction for number of requests in Mapkit and MKDirections?

I used Google Maps API https://maps.googleapis.com/maps/api/directions/json for drawing route and getting direction, but when its usees increases, we have to pay charges.
I check in iOS and get that we use mapkit's MKDirections but I have a question that
Is there any charges for its uses or any limitation?
If there is no limits, is there any the drawbacks of using MapKit?
Is there any cases when Google Maps API become more helpful?
I don't think either is a stronger offering by map quality alone. However, google maps requires expensive fees if you gain scale where as "MapKit is free forever" so that's advantage by Apple. Additionally, MK won't require a heavy third party dependency like GMaps (12+ MB compiled), so that's another advantage Apple. Where GMaps shines is street view and for directions in less urban international places, for example MapKit directions and local places/businesses are fine in the US but I wouldn't rely on them in Argentina or New Zealand.
Another advantage of Mapkit is that MapKit has a much better integration with CoreLocation and CoreAnimation. The “Follow user location” mode is missing in Google Maps; as well, the ability to add advanced animations to annotations (MKAnnotation is represented by a UIView, while a GMSMarker is represented by a UIImage) can give your app an appealing touch that the Google Maps SDK just can’t.
As you are going to show address and picture on the marker, so Apple's Map Kit will be better option to work with.
Show this for more information about Mapkit
Personally I prefer MapKit over Google Maps because of the better integration in iOS, a more powerful API and the better looking map material. However Google maps is in some (or most?) areas better than Apple Maps when it comes map details and correctness. This might change since Apple is creating new map material at the moment. But it will take some time to create new maps for the whole world.
Apple Maps is free. Its included in the package the customer buys when purchasing an Apple product. There is a request limit. I experienced timeouts when sending about 200 Requests / min (for resolving large amounts of addresses). Your requests will work again after 5 min or something. So exceeding the request limit is not that easy and it won't be "banned" for too long.

How Indoor Navigation works in iOS using iBeacon?

I am working on a project that has a requirement of Indoor navigations by using iBeacon. Have been searching a lot, I only found some paid sdk and other tools. I know how iBeacon used for indoor navigation,but there is some problem. I want move user location first beacon to another but only on specific path,but now when user move than location not follow path as given by me.
Please let me know. Thanks in advance!!
While it is possible to build an indoor navigation system using beacons, it is not a trivial exercise. Beacons only provide a very small building block needed to create the overall system. Think of beacons as being a brick used to build a house. Are you up for building a house from scratch out of a pile of bricks and many other components?
You may be better off using an off-the-shelf SDK, even if it is paid, rather than building this yourself. If you do want to build it from scratch, there are several components you must build:
Beacon location configuration: You need a system to register the location of each beacon in latitude/longitude and get this configuration into the mobile app.
Position determination: Based on detecting the closest beacon(s), you must build a module that determines the position of the user's mobile phone based on the configuration above.
Map rendering engine
Coordinate system conversion from the beacon location configuration reference frame to the map coordinate frame.
Wayfinding module: Based on configured routes on the map, the wayfinding module would determine where to direct the user along these routes to get to a destination.
I worked on a team that built a beacon-based indoor nav system for the Consumer Electronics Show. It took multiple team members a few months to build the system from scratch using hundreds of beacons and low-level tools. Don't underestimate the effort involved.
This answer is assuming that the user will have no other location services (GPS etc), it could be achieved using multiple iBeacons.
The all possible routes between the start and end destination would need to have to iBeacons on them.
Register that the user has arrived at the first beacon, and display to them your chosen route.
If you detect them getting close to any beacons which are not on your chosen route, then you know they're probably not following it.
So with enough beacons, you can accurately plot the user's location in an indoor environment (provided you know the exact location of the iBeacons beforehand).

Indoor positioning on iOS with Core Location - not accurate?

Using the sample code provided from WWDC, I've been trying to write a simple proof-of-concept app that performs indoor positioning in my office building. I have a floor plan image and replaced the standard image in the demo code. I've also done the requisite mapping of GPS coordinates to pixels for the two anchor points.
When I run the app in the simulator and specify static GPS coordinates, I see the position updated as expected in the simulator. When I run it on my phone, however, the experience isn't nearly as seamless as Apple advertised in the video. On my iPhone 5s, the positioning is all over the place, and rarely anywhere close to accurate. Even sitting next to a window with a clear line-of-sight to the sky I still get very inaccurate results.
I would assume that this might have something to do with our physical layout, WiFi topology, or other such parameters. However, I also noticed that Apple has a portal where you can register your facility for use with indoor positioning. Does this have something to do with the poor results in my app? I can't imagine how Apple would be able to help with such a scenario, but thought it might have something to do with it.
Are there other steps I should take to increase the accuracy of my app? Is there a way to leverage iBeacons for improved positioning indoors? I haven't found any documentation indicating so, but thought maybe someone here would know.
You're right, Apple has the portal available at https://mapsconnect.apple.com
At this portal you can add your venue and Apple will guide you on setting it up. However, your venue must have all of the following attributes:
Accessible to the general public
Annual visitors in excess of 1 million per year
Availability of complete, accurate, and scaled reference maps
Wi-Fi throughout the area
Associated app that's authorized by venue owner
If your venue has all the required attributes, then you also will need to answer these questions about your usage:
How are you planning to use indoor positioning? (Ads, Navigation, Delivering content)
How many venues would you like to enable with indoor positioning?
What type of venue do you have? (Airport, Hospital, Museum, Mall, Office)
What type of floor plans do you have? (CAD, BIM, GeoJSON, AI, PDF, PNG, etc)
Are the venues equipped with Wi-Fi and/or iBeacon?
Name of the largest venue
Address of the largest venue
Once you have completed the entire form and jumped through the last hoop, you will be brought to a page that confirms the details. Once done, it's all in their hands and they will contact you.
Indoor Positioning does not work well without addional devices like iBeacons.
There is no useable GPS receivement in buildings, the reflected signal is often far worse than 50m .
GPS might work indoors if it is a single floor building with a thin roof, but this is usually not the case in indoor buildings.
The only thing that works well, is to buy some iBeacons and mount them at various locations in the office.
You have to manage the location of that beacons: they only send you an id, and (maybe?) the distance to that iBeacon. (Please check wheter you get distance to beacon)
But ios LocationService will not use that iBeacons.
So either use iBeacons or forget your project. There is no well working solution for indoor positioning. Some use magnetic fields, there is even an App for that, but this needs measuring your whole office in detail.
Why don't you try with the indoor SDK which can be integrated in iOS applications. Also try to give the accuracy level appropriately when you use location framework API.

Techniques for offline reverse geocoding on a mobile device?

I am working on a mobile mapping application (currently iOS, eventually Android) - and I am struggling with how to best support reverse geocoding from lat/long to Country/State without using an online service.
Apple's reverse geocoding API depends on Google as the backend, and works great while connected. I could achieve similar functionality using the Open Street Maps project too, or any number of other web services.
What I really want however is to create a C library that I can call even when offline from within my application, passing in the GPS coordinates, and having it return the country and/or state at those coordinates. I do not need finer granularity than state-level, so the dataset is not huge.
I've seen examples of how to do this on a server, but never anything appropriate for a mobile device.
I've heard Spatialite might be a solution, but I am not sure how to get it working on iOS, and I wonder if it may be overkill for the problem.
What are some recommended techniques to accomplish this?
Radven
You will need to get the Shapefiles (lat/lng outline) of all the administrative entities (US states, countries, etc). There are a lot of public domain sources for these. For example, the NOAA has shapefiles for US states and territories you can download:
http://www.nws.noaa.gov/geodata/catalog/national/html/us_state.htm
Once you got the shapefiles, you can use a shapefile reader to test if a lat/lng is within a shape. There are open source readers in C, just google. I seen stuff at sourceforge for shapefiles, but have not used these myself.
The Team at OpenGeoCode.Org
If you're looking for an approach based on a quadtree, try Yggdrasil. It generates a quadtree based on country polygon data. A Ruby example script can be found here.
I can suggest good written offline geocoding 3rd party library.
https://github.com/Alterplay/APOfflineReverseGeocoding

Resources