Adding topography to an Open Street Map based application - ios

I have an application that successfully uses a pre loaded tile cache of Open Street Map .png files for a small city area about 20km x20km to support the presentation of tourist information on the web, iPad and iPhone. It is written in HTML5 and uses MoSync to create the wrapper to deliver it on the mobile devices.
This approach works well for cities but I would like to extend the app to work in countryside areas (in the UK initially) where if I could access it, Ordnance Survey mapping 25000,50000 and 250000 would deliver a much better user experience.
My specific questions are:
How do I get hold of topographic tiles?
Can I get tiles that have the same slippy map structure as OSM.
Can I use Ordnance Survey as a source for the UK and if so is it a one off license fee?
What zoom levels are available? I expect 25000, 50000 and 250000. Is 100000 available?
What formula do I use to identify the specific tile from a lat and long pair?
Will all the tiles at a specified zoom level be the same delta lat and delta long? If not how do I tile them?

Answering a few of your questions:
There are several OSM based maps with topographic elements. Take a look at the list of tile servers and the list of OSM based services. Remember to check each usage policy first before using them in your application.
For determining the filenames of the slippy map for a given latitude, longitude and zoom level, read the slippy map tilenames page in the OSM wiki.

Related

How to use custom offline map in iOS app

I'm developing an iPhone offline map application. I've illustrator map georeferenced (using mapublisher), have geodatabase (http://goo.gl/isw6IP) and parking data (shp/csv).
Requirements:
The map should Pan, Pinch & zoom.
Search addresses and parking (addresses have alternate names too) on map.
Routing/Navigate to parking/address.
GPS Positioning.
App will work offline without internet connection once installed.
Questions:
In which formate I should export the illustrator map, geodatabase & parking data to be used in a iOS app.
Which iOS offline maps SDK is recommened for above requirements.
Few iOS SDKs like Route-ME, MapBox, Alpstein, Altus, Skobbler, cloudmade, ArcGis iOS SDK, nutiteq etc are using OSM data or their own hosted MAP data but I want to use my own illustrator map and all data will be available local for offline use.
I've search alot but could not find any concreat solution. Few links in my research.
http://goo.gl/m9Lp1w
http://goo.gl/IMKF4p
http://goo.gl/gsrv5Q
http://goo.gl/J4Ne5y
https://goo.gl/1wP29H
Same question (similar to what I need) was asked long time ago but without any answer
http://goo.gl/knoA1C
1:
In my opinion, OpenStreetMap is the best one for all-around purposes such as the ones you mentionned: addresses, parkings, routing, maps.
You can answer all requirements with that format. Depending on your project, you may better transform your data in a specific format for each requirement.
2:
You'll probably have to use a few components to match all requirements :
The map should Pan, Pinch & zoom.
Any of the SDK listed will do it.
Search addresses and parking (addresses have alternate names too) on map.
You can query a local database then create markers.
Routing/Navigate to parking/address.
I would recommend GraphHopper
GPS Positioning.
It can be done manually using CLLocationManager. Create a marker (according to the chosen SDK) then update it's coordinates.
App will work offline without internet connection once installed.
That's the main requirement. You have to chose between vector and raster first, then pick the SDK. You'll probably have to make a few transformation here.

Offline Map for Private Property with Navigation in iOS

I have an idea of building offline Map for my University Campus (its covering almost 3-4 miles). Like new students or guests can navigate to various blocks in campus. Student can see himself/herself marked on map at current location & can chose destination from pre-defined list of places and application will navigate them.
I have explored alot like maptiles can help me in showing maps. But is there any other efficient way of showing campus map ? And I have no idea how will I navigate user (since being a private property area is out of reach of Google's Maps (or some other) API).
Any suggestions will be helpful. :)
EDITED
Here is Google Map link to my place.
I am studying ArcGIS from last few days, learned to create its 'geodatabase' using 'ArcGIS for Desktop' for rendering offline maps on iPhone.
However, now my concern is how to Navigate user.
And I will welcome any suggestion/idea for accomplishing it using any different approach.
You can achieve that with MapBox.
MapBox is an alternative to GoogleMaps and supports offline maps.
Mapbox iOS SDK
There are three methods available to the Mapbox iOS SDK
for offline maps. With cache-based methods, the RMTileCache for an
RMMapView can be configured to keep map tiles around based on their
count or based on their age in the cache.
Caching based on previous user interaction
Tiles are automatically cached once they are downloaded for display
based on the user’s panning and zooming of the map. For example, if a
user views the map, then zooms out, then zooms back in later when
offline, the original tiles will be present in cache and will display
without need for a network connection.
Proactive background caching for certain map regions
Using RMTileCache and the RMTileCacheBackgroundDelegate protocol, the
developer can enable the user to download a certain bounding box and
zoom range in the background in advance of actually displaying them on
screen. Callbacks trigger, allowing the developer to report progress
to the user or even to cancel a download in progress.
Tiles that already exist in cache will be skipped over during this
background download instead of re-downloaded.
MBTiles prepackaged tiles
Using the MBTiles format for map tile storage, developers can build
apps that read the tiles straight out of the MBTiles file and do not
ever need a network connection. Since MBTiles is an open format, files
can be created manually or with TileMill, as well as many other
applications and utilities such as mbutil.
You need the last one (i.e. MBTiles prepackaged tiles).
Source: https://www.mapbox.com/help/ios-offline/
If you go the OpenStreetMap way (map your property directly in OpenStreeMap) then you can also use the Scout SDK.
It's OSM based and provides full support for offline maps, offline routing & TBT navigation. If you properly connect the road segments then the SDK will be able to create car, bike & pedestrian routes on your data.
While not free, the Scout SDK has a free tier that might be large enough for your particular needs (if not you'll move to a "pay-as-you" model)

Map with more than 3k Markers

I'm trying to draw a map with a lot of markers on it. Just say more than 3000 markers, and this is taking a very long time to process and is using a lot of memory.
But I have the same map on Google Earth and this open very quickly. Somebody knows a way to speedup the process using gmLib?
Take a look at RTree structures.
R-trees are tree data structures used for spatial access methods,
i.e., for indexing multi-dimensional information such as geographical
coordinates, rectangles or polygons.
A common real-world usage for an R-tree might be to store spatial
objects such as restaurant locations or the polygons that typical maps
are made of: streets, buildings, outlines of lakes, coastlines, etc.
and then find answers quickly to queries such as "Find all museums
within 2 km of my current location", "retrieve all road segments
within 2 km of my location"
Queries like the one you expect will become almost immediate... :)
I use the RTree extension available in SQLite3. Our Open Source framework interfaces this kind of virtual tables with Delphi classes. BTW it works from Delphi 6 up to XE5.
If you are afraid of using a RTree, just ordering the data in order will help a lot searching e.g. via a binary search algorithm.

snap to road for apple maps

I have a project which is constrained to working with apple maps, corelocation and apple's mapkit -- 3rd party interfaces aren't allowed.
I need to display a map view showing the user's current location (standard blue dot) and simultaneously place a pin on the road nearest the user's current location -- a 'snap to road' which is a best estimate of the user's nearest location.
I know how to retrieve the user's current address and use the returned street name and address, but i don't know how to add the pin to the resulting street in mkmapview. I've looked at the mkdirectionsrequest but am unsure how to adapt the returned data to solve this problem.
thanks in advance for your help!
I think you can get the road-snapping done by Location Services, by adjusting the location service mode.
Apple's Developer docs on CLLocationManager offer four 'Activity' modes:
Other ~ unspecified
Automotive ~ in a car, truck, road vehicle
Fitness ~ pedestrian related activity
OtherNavigation ~ trains, planes, boats
(no comment about the ambiguity between the first and fourth... there's a bit more detail in the developer docs too than my few-word summaries above)
Basically you set CLActivityType to CLActivityTypeAutomotiveNavigation, and it will do sensible things on the assumption you're in a road vehicle. From what I've seen, this more aggressively snaps to vehicular roads, though you're still limited by the fidelity of Apple's maps.
For a snap to road feature you need the sequence of latitude and longitude coordinates of that street. You usually never get that vector info, because the owner of that vector data (TomTom and Nokia) do not allow that.
Only OpenStreetMap based data is free, and vector data is available.
ios uses TomTom data, and as expecdted you will not get the coordinates of the polyline of a street.

Good examples of MapServer / OpenLayers

I want to convince some clients to use MapServer and OpenLayers. Please can anyone suggest attractive websites to show off the possiblities!
The clients will be impressed by:
A density map (otherwise known as a heat map, colour-shaded grid coverage, contour plot...).
The ability for the user to download the underlying data for the density map, restricted to the area being viewed, in some format such as netCDF.
Standard OpenLayers stuff. Zooming, panning, scale bar, overview map...
Different base layers. Could be WMS, Google, Bing...
Searching for a placename, map is panned to display the place.
Exposing the heatmap data for other people to use in mashups as WMS or WCS
MapServer.org is back up but demo.mapserver.org seems to be down right now :( But from memory their examples didn't have the "wow" factor. The OpenLayers examples demonstrate only one or two features per example - I want something to wow the clients by showing all the capabilities in one example.
PS If you have good examples that use some other open source tools, post them by all means. But just JavaScript please: customer says no rich client.
EDIT Come on StackOverflow, someone must have an example that uses a density map?? I'm even offering a bounty now...
Note this answer is no longer relevant. The open source maps have since been replaced with a commercial alternative by a different company
http://maps.seai.ie/wind/ - mapping onshore and offshore wind speeds and farms in Ireland
http://maps.seai.ie/geothermal/ - mapping geothermal temperatures in Ireland, and borehole data
uses WMS services (and TileCache) for all the layers, so can be accessed by other client GIS's (well once I've set up metadata etc..)
has a variety of different base maps to choose from
built using MapFish / ExtJS
has drop down gazetteers for County and Townland (an Irish administrative unit)
all the basic map navigation tools and a simple info tool
right click on a layer to set transparency
uses MapServer opensource back-end, plus SQL Server 2008
The systems (and a third more complex Bioenergy Intranet system) got a mention here: http://www.geoconnexion.com/uploads/renewableenergy_intv9i4.pdf
http://haiticrisismap.org/ openlayes + geoxt
would it be possible to create a template map for the client with a bunch of data on it, census, socio, create some simple fake buffers.
Maybe have a look at the HeatMapAPI for Google Maps (not sure you'll wow the client with that though).
Another density map: http://maps.glassfish.org/server/ (showing the use of GlassFish around the world).
We're using the OpenLayers Heatmap layer, mostly because (for us) it handles large data volumes better than the Google Map version (your mileage may vary)
http://www.patrick-wied.at/static/heatmapjs/demo/maps_heatmap_layer/openlayers.php
By large data volumes, I mean location datasets with 100K+ rows
It also works nicely as an ASPX page with dynamic realtime data retrieval from an SQL Server database. I've used a stored procedure to pre-process the data into the array format, grouped by Latitude & Longitude.
For those that need a translation table to convert their UK Postcodes into Latitude & Longitude, here's a good source:
http://www.doogal.co.uk/UKPostcodes.php
The OneGeology Portal (http://portal.onegeology.org/OnegeologyGlobal/) has been online for about 10 years, currently running OpenLayers 2, with an OpenLayers 3 version in development.
The portal attempts to create a geological map of the world by pulling together disparate OGC services provided by data suppliers (mostly Geological Surveys) from across the globe. The portal provides access to data from WMS, WFS (simple and complex feature), and WCS. The portal uses CSW to help manage which functionality is available to a user, and provides the ability to style WMS layers through the application of custom SLD. Map contexts can be saved, shared and loaded using WMC.
There is a gazetteer to help you zoom to a location of choice, the ability to change projections, and scales, and the ability to create a KML file to allow the service to be used in Google Earth. Transparency can be changed on all layers.
There are currently 353 layers.
When the OneGeology project started, all documentation was geared to the support of services provided by MapServer, and many of the services in the portal are MapServer services. However, because the portal utilises open standards, any software that can provide services to those standards can be included.
This is an example of a classified grid generated in MapServer and displayed by OpenLayers: https://maps.greenwoodmap.com/sublette/mapserver/map#zcr=1/2690000/1170000/0&lyrs=slopesZ,townlim,ownership,roads. The raw, unclassified slope data can also queried by map click.

Resources