I have a .osm file, don't know what to do next? - mapping

I created an indoor map file in JOSM, with different levels and tags for each room etc. Now I have it as a .osm file. How do I make it operational. Like how do I deploy it so that it can be used for indoor navigation. I also need some other features like calculating path from one place t other and search index.

You are basically searching for an offline routing and map drawing solution. This has already been answered multiple times. You could even use a full-featured offline solution such as OsmAnd if you convert your map into a suitable format with the OsmAndMapCreator.

So I figured out a way by converting the given .osm file of my indoor map to GeoJSON using OSM2GEOJSON and then displaying that in awesome leaflet library. It's optimized for phones too. Displaying the map in leaflet was a sort of a hefty task but there are lot of plugins and forum answers that helped me. Reading geojson using ajax in leaflet and creating seperate layers for each floors,filtering those geojson layers based on there features.properties.level and then adding leaflet easy-buttons to display each layer. There are also other plugins which can help.

Related

how to draw custom lands for OSM

I would like to know how to draw custom lands for an Openstreetmap project. My final purpose is to reproduce a fantasy map with OSM technology.
It's not clear to me how I can generate lands data (continents, islands and so on).
I know is it possible because the project https://opengeofiction.net/ do basically the same thing.
I am a new OSM user and I am moving the firsts steps with GIS software.
I have built my own tile server on the cloud (Ubuntu 18-04) following different tutorials.
I installed JOSM and QGIS to edit maps, but I feel a bit lost with all that options and features.
I already posted questions in openstreetmap forum but I got no response.
I am sure I need only a little hint to get started.
My expected result is to be able to draw a little "imaginary" island.
On a small scale you can use JOSM without OSM download/upload, and just save your edited data locally as an OSM XML file.
That again can then be fed into the different renderers as source file.
On a large scale you would end up creating a copy of the whole OSM stack, serving your own data, like https://wiki.openstreetmap.org/wiki/OpenGeofiction does

Q: Creating and running own planet map with openlayer

I would like to create a osm like map for a fantasy planet.
Which already brings me to my questions:
Can I use openlayers-3 for a map that is not the map of the earth?
How do I create my own tiles for this planet? Is there a guide that you maybe can recommend?
Thank you very much!
Well, you'd have to design your map first, and then encode it into a format that OpenLayers uses, such as a KML Polgon file, PostGIS database, SHP Shapefile etc.
Tools like QGIS would possibly be a good place to start building your map, adding details etc. Then you can export them to one of the supported formats and point OpenLayers at it to be rendered.
N.B. NEVER done this, so a lot of the above is conjecture.

Adding many custom markers and many custom info windows in Google Maps SDK

I am really just looking for the best way to accomplish this. I've seen the code how to do these individually, but is there a away to do it for say, 100 points? Or do i need to set the custom image and custom info for every point I create?
Also, is there a backend, say SQLite, that i could incorporate the help accomplish more efficiently?
The app I'm building could have 1000's of points, and I REALLY wouldn't want to code everyone of those...but i would!
Thanks
Consider using Google Fusion Tables - they support 100,000 points per layer and 5 layers, for 500,000 points altogether. You access them via an SQL-type language that runs on Google's servers - exactly where your data will be when you upload it and that makes them very fast.
The infowindows are programmable too.
You load your CSV into a Fusion Table (like an Excel spreadsheet) in your Google drive and get a key to that table and you then use the key in your Javascript.
I created the following website with Fusion Tables and I don't have a clue about Javascript! See Skyscan website here. I won't mind if you click View Page Source :-) By the way, if you click on Modern Collections on that page, you are actually turning on/off 25,000 markers and it is almost instantaneous. There is also Marker Clustering available which lets you de-clutter maps with massive numbers of markers and automagically replace them with a single "fatter" marker.
There is a good tutorial here.

In a GeoJson file, how do I combine features (states) into a single feature (region)

I'm drawing a map of the US with D3. Problem is the design on the project has changed and I need to draw regions as a whole instead of the individual states. I can't for the life of me find any good info on how to combine state features into a single region feature.
I'm assuming the gdal is the right tool for the job, but I can't seem to find how to do this.
The tutorial Mike T posted is a great resource, but it didn't solve the specific problem I had.
What I finally discovered is that when you're using topojson there is a topojson.merge method to combine multiple paths into a single path.
Follow this tutorial to convert a Shapefile into GeoJSON, then to TopoJSON, then to a D3 project. There is even an example of US (counties?) included with the project.

How to store openstreetmap data locally on an iphone

I'm working on a project for college and I'm having great difficulty with part of it.
Simply put, I am looking to do the following 5 things:
download the open street map data for my city
store that data locally on the phone's harddrive.
view that data in my iOS application as a map
place markers on the map.
draw paths along roads between those paths.
I have been working on this particular part of the project for a number of weeks and I'm getting nowhere with it. I haven't even been able to figure out how to store the map on the phone let alone view the map data. I've tried using the "Route-Me" library but cannot get it working (although it seems to be one of the best libraries for using openstreetmap data so I am looking to learn how to use it). I feel pretty goddamned defeated.
If anyone has accomplished any of the tasks I am trying to do could you please link me to tutorials/guides/videos that you have used.
I'm not looking for people to give me code or do the work for me, I want to learn how to do this, but if anyone can point me in the right direction of sites that I could learn off I would be very grateful.
Any advice or feedback would be much appreciated
Here's how I ended up solving the problem.
Since Tilemill doesn't natively read .osm/.o5m/.pbf files I used Osmosis to convert a .osm file into .shp files.
I then created a new project in Tilemill and added the particular .shp files I wanted as layers to the new project. It takes a little bit of tinkering to get the map to look like you want it to but it's very similar to css and pretty easy to pick up as you go.
Once I had the map looking the way I wanted it I exported it as a .mbtiles file. This takes a long time to make and the files can be very large depending on how detailed the tiles are. I did one map of Ireland with zoom levels between 7-14 inclusive and I did one map of just Dublin city with zoom levels of 11-17 inclusive. Even though the map of just the city of Dublin had much less tiles, they were both ~200MB in size.
I then found this tutorial online which explains how to store the .mbtiles file in you application and how to read it: http://martinsikora.com/creating-mbtiles-db-for-ios-mapbox-from-hi-res-map-image
Here are a few other links that I found useful:
http://www.kindle-maps.com/blog/using-tilemill-with-openstreetmap-data.html
http://mapbox.com/developers/mbtiles/
http://mapbox.com/mapbox-ios-sdk/api/
http://mapbox.com/developers/api/#static_api
http://support.mapbox.com/discussions
I hope this is useful to someone
I would suggest trying the MapBox iOS SDK. It is actually forked from the Route-Me library and will allow you to accomplish everything on your list.
A key point to remember is that you have another step in between downloading the OSM data and storing it locally on the iOS device, that is, generating the map tiles and storing them in some sort of database.
Here is an example iOS app using the MapBox SDK that has both online and offline map sources and is a good place to start.

Resources