How do I plot the points (data) from the database to the OpensStreetMap? - database

I wonder how the mapping thing works in the OpenStreetMap. I'm building an app that uses my own database(which I will build using OSM dumps using Osmosis; same as in the OpenStreetMap website). I have really no idea how it works. Thanks in advance! :D

http://wiki.openstreetmap.org/wiki/Develop is your friend for these kind of answers. They explain (depening on the page) pretty detailed how things work.
I don't know how Osmosis does things since we are working with osm2pgsql but I assume they are almost similar: It basically looks for certain tags (since everything is "tagged" by the OSM community) and stores it in the database. So if you have a supermarket POI "some_supermarket" that has a tag "supermarket" an entry in the database will reflect these infos and the coordinates. Streets, buildings and so on are only coordinates that get connected when rendering or processing it.
If you ask for the rendering of the tiles/geo-images, there are renderes available that do these tasks. The wiki from above will give you lots of answers, just search for "renderer". They just retrieve the information (depenging on zoom level and your setting) from the database for a certain bounding box and interpret the data from the database e.g. the know that a street is connected and needs to be colored in grey.

Related

Fetch live sports data that changes from website to Google sheets

Update:
I have found a better website for getting the data. If you press my link, you can see in the top of the screen there are multiple future games. I would like to get details about the games that BC Copenhagen plays. The details should be live stats (points, players' points...). Is this possible?
Website: https://basketligaen.dk/
I have a pretty difficult question.
I want to fetch live data from a basketball game website. However, this is very tricky, because first of all:
The live games change all the time, and I'm only interested when one team is playing: "BC Copenhagen". (However, if I get more data from different teams, that would work as well)
When you click on the list, you get moved to a detailed screen about the live game. And this is the data I'm interested in.
So I need to somehow get data from the live games. Is it even possible to do this with Excell commands, or do I need to work with APIs like Zapier or Make? However, I have no idea how to do this.
Do you maybe have to give the Link to the game every time the game starts? But this would really not be a reliable solution.
Note: I'm using this data for a Glide App
Website: https://official.mvpapp.dk/live.php
You could try IMPORTHTML, but the link provided above shows no data for me. Most likely this requires much more scripting than that. Ideally, there would be an API data feed that could be used. Again, I see no data, so I can't say for sure.
A worst case scenario would be using #google-apps-scripts to parse the listing of games, grab the game you want, and get the data from that page. That would be out of scope of a Stack Overflow question.

Storing Images in SQL Server database

I'm trying to create a sample ASP.NET MVC application with a ViewModel and onion architecture - very simple online shop.
So as you suppose this shop has products, and each product should have one very small image and when user clicks on that product, he is redirected to a details page, and of course he should see a bigger image of the product.
AT first I thought, it's a simple application, I would (internet) links to the pictures in the database. But then I thought, ok what about when this image is erased from internet, my product will no longer have an image.
So I should store those pictures in the database somehow. I have heard about something called FileStream that is the right way but I found no material to understand what is that.
I hope someone would help me.
There are several options. You could save the picture in the database using a varbinary.
Read here how to read it using MVC.
When you opt for a solution where you split database and file storage, which is perfectly possible, you should consider that it could mean extra maintenance for cross-checking deleted records, etc.
If you choose the last option, the information in the article will mostly suite your needs too.

Do you have to host your data with MapQuest?

From what I've read so far, it seems like the only way for me to map custom data points from my own dataset is to host that data with MapQuest. Am I correct in that or have I just not read deep enough?
And if it's possible, does anyone have a link to more information about how to go about it? Their API documentation is subpar.
Thanks :)
Disclaimer: I work at MapQuest
While the MapQuest Data Manager makes it easy to store custom data with MapQuest so that you can query it through the Search API, you don't have to store data with us in order to show custom points on a map.
Are you trying to do something along the lines of storing data in MySQL or PostgreSQL and then use something like PHP to query your own database, loop through the results, and then show the results on a MapQuest map using the JavaScript API? Unfortunately I don't have any easy/quick examples that show how to do that, but it is possible.
The forums on the Developer Network are also good place to look to see if others have had issues similar to the one that you are facing.
Also, let me know exactly which MapQuest APIs/tools you are using and I will do my best to provide more information depending on what you need.

Chronological data model

On the twitter website if you click on the connect tab on the top of the screen (https://twitter.com/i/connect) you get this nice little chronological display of your tweets and when new people followed you, etc.
I'm curious what could be the data model behind this to allow them to build a UI like this. I'm trying to recreate it on my own and was wondering if anybody had an idea what it could be? For example, modeling connections between people seems trivial enough, you can use some type of graph, but then being able to keep track of dates when you added somebody or somebody un-followed you seems non-trivial. Any ideas?

Mapping without Google Maps (on a stand-alone server)

I've been asked to create a stand-alone site/app that's not connected to the web (all on a local server).
One part of it is to have a map of a natural reserve with a bunch of links that will show footpaths, different animals habitat areas, visitor centres and such.
So there's a map (static picture) and when you click on it some overlay goes on top of it.
At least that's the way I see it now.
I've looked here: http://www.carto.net/williams/yosemite/ but it just looks mucho ugly.
Getting Maps Premium is not an option as it's not that cheap. And the reason they don't want to use Maps/Earth free API is because internet connection is still very slow there (sattelite internet only and when optic cable will be hooked up nobody knows).
Looking for some recommendations as to how to proceed there. Drawing paths/areas on the picture of the maps seems extremely insufficient and time consuming.
I'd need some way to use coordinates to automatically draw areas and lines over the map (and then somehow export that as a graphis file (or SVG) that'll be layered on top of original map simply using ajax.
Will ARCGIS pro edition be the way to go or should I start learning SVG. Do you know some good SVG books/tutorials (as related to mapping)? Maybe there's some other way around altogether...
They do have detailed maps of the area in ARCGIS (whatever format they are in I don't know yet).
Just looking for some ideas, any help will be appreciated. Thanks in advance.
Do you know GeoServer? More or less all-in-one, compatible with different types of datasets, widely customisable.
Starting from "raw" SVG and write the whole thing yourself will probably be prohibitively time consuming.
If you have very little data (say less than 50 geometries) that is fixed, you could also use OpenLayers without any backend server.
For the data you could use a OpenLayers.Layer.Image if your (overlay-) map consists of a small raster image. For vector data, you can use OpenLayers.Layer.Text or a OpenLayers.Layer.Vecor together with protocols OpenLayers.Layer.KML or .JSON.
You can click through the current release examples.
I admit that this is not an easy task for a beginner, but it's fun hacking the maps together.

Resources