United States Weather Radar Data Feed or API? - dataset

Is there a government or private API for accessing weather radar data in the United States?

NOAA has a SOAP API: http://www.nws.noaa.gov/forecasts/xml/
Several private APIs are listed here:
http://www.programmableweb.com/apis/directory/1?apicat=Weather

I was looking for radar data awhile back to overlay on a google map. This site offers it for free and they provide some sample code to get started for google maps and some other online maps:
IEM Open GIS Consortium
The map tiles they provide are not limited to radar and as far as I can tell they are all free to use.

Radarmatic has a JSON API at http://radarmatic.com/api.html
Update: link broken, project no longer active

A better way to apprach this would be to use the "Weather and Climate Toolkit" offered at : The Weather and Climate Toolkit homepage.
The software can batch process raw radar data - and you can get just about anything you
want this way if you are able to place it on your map after processing. It can export in JSON, geoTIF and some other formats. If you want more options for your app/project, this is the easiest way to do it - as you can get rain, snow, hail, wind velocity, dual polarization products, etc quite easily once you learn your way around the software.
Weather radar data feed from every WSR-88D radar site comes in 2 raw forms : Level-2 and Level-3. Level 2 data ("super resolution" and base data) is available from the Amazon AWS servers (NEXRAD on AWS) and level-3 data is available from the NWS server at This link from the Radar Operations Center.

You can get images updated every three minutes from NWS RIDGE. It's not really an API -- just images sitting in a directory -- but the naming convention and structure of the images is fully documented.

Related

OSM 3d tileset JSON file

I am using Cesium, and I would like to make a 3d city representation.
I would like to retrieve a .json of the current location I am from OpenStreetMap.
I have the position and the altitude of where I am.
The problem is that I do not understand/can't find from which url source I can retrieve buildings ID and their relative height for a defined tileset position in openstreetmap
I found a lot of exemple on internet and lib that do this, but I need to do it from source, and I do not quite know how.
Basically, how does for exemple this : https://osmbuildings.org/ get the data from
OSM has the data that's necessary to set up such a service, but the various providers use different formats as there's not really a clear standard yet (unlike with 2D raster and, arguably, vector maps). For use with Cesium, you probably want Cesium 3D Tiles.
Cesium is offering their own building layer based on OSM data, called Cesium OSM Buildings (no relationship with OSM Buildings), on their Cesium Ion platform. It does not fully support the OSM data model at this point, but the Cesium integration is obviously well done.
I'm not sure what OSM Buildings is currently using, but it does not seem to be the same as Cesium's 3D Tiles. Some older info on GitHub mentions using GeoJSON, but looking at the network traffic, it now seems to be using Mapbox Vector tiles, which is not a format specialized for 3D data, but rather a general-purpose solution for transmitting OSM data (and other data sources) as tiled vector maps. On osmbuildings.org/data, they mention that they are willing to provide data in other formats for commercial customers, though, if that's an option for you.
Finally, some people have experimented with providing OSM for Cesium using open source software (see e.g. the osm-cesium-3d-tiles and osm2cesium repos). This might be a starting point for setting up your own service if you're willing to go down that path, but it's definitely not a complete and polished solution at this point.

how to export a mapbox studio map as .mbtiles file

So I'm guessing the answer to this is "no", but is there any way to export a map I've designed online with mapbox studio (https://www.mapbox.com/studio/) into a .mbtiles file so I can host it myself?
Honestly, I'd be willing to pay money for this (saving me the trouble of getting a world .pbf file and getting it into a postgresql db is really a pain, especially with a mediocre computer like mine)
It sounds like maybe there used to be a way to do this, but as of now it looks like they've taken away this ability. I can see a lot of different ways to use a map I've created, but everything forces me to use mapbox as the hosting service... it seems there's no way to download a map I've created.
I think your assumption is correct. It does seem MapBox wants you to use their APIs and API keys.
However, there is a partial solution with raster tiles if you can fallback to that. Or you can get vector mbtiles from OSM data instead of from mapbox servers.
mapbox offline support for android/ios
I've contacted mapbox support in April 2017, and what I've been told is that although the style files that you can download from MapBox studio don't contain tiles, there's a way to have them render offline on Android/iOS.
If you would like to use Mapbox maps offline, you would need to follow the examples shown for Android or iOS, depending on your platform. Essentially, the mobile SDKs take in a style URL that points to your custom style created in Mapbox Studio, and the SDKs handle the downloading of all other resources needed to keep the map offline (fonts, icons, tilesets, etc). Check out our guide on offline maps to read more about how this works.
Links:
Offline Maps with MapBox
Mapbox Android-SDK Offline example
Mapbox iOS-SDK Offline Example
From a quick look at the example code, it would seem that the downloading of the tiles is done within the App, but done ahead of time, for instance just after you install the app and you still have
network connectivity. I don't immediately see whether or not your Mapbox API keys are involved at all in this download, with respect to your billing concern. There is a 6000 offline tile limit per offline region.
Not for desktop: The site also mentions that offline is not an option for MapboxGl-JS, so you'd have to hack it up to make your offline region available on desktop web browsers.
mapbox studio export as mbtiles...
There was supposedly a non obvious option in settings to download your source as an mbtiles file in mapbox studio classic. A mapbox classic issue on github has a screenshot of where the button should be. It's possible that option is gone now.
That github project, https://github.com/klokantech/vector-tiles-sample, provides links to projects/tools that can break the mbtiles file into its contained pbf files, which are a protobuf compressed format for each vectorial tile (https://github.com/mapbox/mbutil). Slightly outdated.
An approach which might otherwise work, is to cache the network requests ahead of time for each tile retrieved from MapBox, and then in your APP proxy the requests to your cache. I'm not sure whether that's against the ToS though. You'd probably have to do it programmatically with all XYZ coords you wish to cache.
Taking a dive with tippecanoe to produce vector tiles
You can create vector tiles with tippecanoe (and host them yourself). It's not MapBox, I know. But it might get your farther in the long run.
Nice short blog article about it: http://fuzzytolerance.info/blog/2017/02/02/Making-your-own-tiles-with-Tippecanoe/
The mbtiles you create, you can layer them, and possibly style them with the open source maputnik (which is somewhat like the style editor of mapbox). Then you take serve mbtiles with your own server, and plug in your style into mapboxGL-js or openlayers.
TileMill -- (.mbtiles with raster tiles) fallback
There is TileMill which is still available (but deprecated), runs on the desktop, and will allow you to create maps from shapefiles (e.g. you can get openstreetmap shapefiles for single cities at https://mapzen.com/data/metro-extracts/ ).
TileMill, will give you a mbtiles file at the end of the process. Although, that mbtiles contains raster tiles, not vector tiles. Vector tiles can be styled dynamically so it's nice on mobile when you want to accommodate various situations with fonts or adapt lighting.
Raster tiles might suffice, because in your app you probably will be able to render other interactive objects on top of that base layer. OpenLayers is one portable framework where you'd be able to do that, for instance -- allowing the user to draw objects or click points of interest that you've loaded from a database separately from the map data.
Get OSM-based vector tiles instead of mapbox
There seems to be an alternative maker of Vector tiles now, http://openmaptiles.org (used to be http://osm2vectortiles.org ).
You can go here, and download an mbtiles file for a city of your choice for instance: https://openmaptiles.org/downloads/#city , then serve that file (locally) for your app with a tile server. (or use one of the tools mentioned above to break it into the individual pbf files and read the files from local disk / memory)
With this approach, you combine a vector mbtiles from OSM, with the style you've created in mapbox studio (mapbox studio lets you download a zip file with your .json style in it), and you can still use MapBoxGL to display it.
There's Maputnik http://maputnik.com/ which you can use to edit a mapboxgl style file (the editor works with local storage). and there's presumably https://github.com/boundlessgeo/ol-mapbox-style which allows you to convert that style into a piece of code suitable for OpenLayer's style API.
As far as I know Mapbox does not provide map downloads. You could download vector maps directly using their vector tiles API and be charged against your vector tile count. 200K tiles are free per month. In my experimentation, 80K tiles represent about 200 sqaure km of area. So you'd run out of free tiles very quickly for large areas and would have to pay 1$ per about every 10km more of square km area. (all very approx values based on nominal observation). Also, these leaves the challenge to actually package the .mvt files into a MBTiles format.
I suggest an alternative way instead.
You can create MBTiles from any .osm.pbf file using this tool - https://github.com/systemed/tilemaker
Download .osm.pbf file from Geofabric. To download for a custom area, you can use Protomaps or BBBike Extract
Download tilemaker
Execute the following command
tilemaker --input netherlands.osm.pbf --output netherlands.mbtiles --process resources/process-openmaptiles.lua --config resources/config-openmaptiles.json
You can read more about it in this blog post - https://blog.kleunen.nl/blog/tilemaker-generate-map
To use the same style that you created in Mapbox Studio, you can download your style's JSON file by clicking on Share -> Download. This zip will contain your JSON file which describes all the colors, etc you customised.
If you are planning to show this MBTile on Android app, you'll just have to embed this JSON that you downloaded and the MBTiles file in the app and point the JSON to the MBTiles file. I've written how to do this in this blogpost. I tried to make the JSON work but only partly succeed after some edits. However ideally it should work since its based on the openmaptiles schema.

Is there a way to access to the database of Google Maps for the public transport?

I'd like to have access to the numbers and type of public transportation and for each of them, their stops of a certain city. So for instance, I'd like to have :
Number Type Stops
1 Metro Stop1.1, Stop1.2, Stop1.3, ...
6 Bus Stop6.1, Stop6.2, Stop6.3, ...
17 Tram Stop17.1, Stop17.2, Stop17.3, ...
... ... ...
Of course, I don't really care about the format, I just want to know how to have access to the data, in order to do not re-enter it manually in my website!
Thanks for any help :-)
GTFS Data Exchange
GTFS Exchange was retired in 2016.
It is still useful for legacy gtfs files that are not updated/available anymore. However, you should now refer to the following databases for static GTFS:
Transitland
TransitFeeds
TransitWiki
Google's own compilation: PublicFeeds.wiki
They overlap a lot but not completely, so it's always good to check all of them out. Also know that some smaller transit agencies still don't share their data with these services, so it's worth checking their website.
Finally, Google map uses these same files as their source data to my knowledge. In their reference page for GTFS, they mention the following:
Submitting a Transit feed to Google
If you're at a public agency that oversees public transportation for your city, you can use the GTFS specification to provide schedules and geographic information to Google Maps and other Google applications that show transit information.
If you provide a transportation service that is open to the public, and operates with fixed schedules and routes, we welcome your participation; it is simple and free.
For live updates though, I think that google uses GTFS RealTime.
Is there a way... in a word, no. This data isn't available through the Maps API (yet).

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

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.

Google Wave applications

My understanding is that Google wave is a communications and collaboration tool. But is it only limited to IM/Twitter type interface or can it do much more? Can it be something completely different than the top-down conversation format?
Say I want to build a collaborative photo editing app with google wave. which API should I use? or am I not getting it?
That would be a gadget, I believe (possibly combined with a robot). I'm not sure whether photo editing would really be a practical application of Wave, although a "collaborative canvas" certainly works.
The gadget would be used for the user interface side of things, and the robot could be used for more complex effects that you didn't want to implement in JavaScript. You'd add a bit of data representing "I want posterisation applied" (for example) and the robot would see that, apply the effect and then send back the modified blip with the posterised version.
The main problem I'd see with collaborative photo editing is the amount of potentially changed data for each edit. I suspect it would technically work, but it may not be great in terms of space/bandwidth usage...
If you are interested in collaborative diagramming, take a look at the video demo on the following page:
http://www.googlewaveblogger.com/collaboration/gravity-the-best-business-example-of-google-wave-period/
Midway through the video, you can see several users collaboratively editing a SAP business process (flowchart). Super cool.
There are three aspects to Google Wave:
A product: Wave is a web app using HTML5 built on GWT
A protocol: Wave also denotes the underlying format for storing and sharing waves
A platform: Wave provides a set of open APIs for developers
The platform can further be divided into Wave extensions, and the Embed API. Wave extensions include robots and gadgets, and the Embed API allows you to embed waves into third party applications and websites. A gadget is an application that runs within a wave, and a robot is an automated participant in a wave.
Some links that might be useful to you:
Google wave blog post: http://googleblog.blogspot.com/2009/05/went-walkabout-brought-back-google-wave.html
Google Wave API overview: http://code.google.com/apis/wave/guide.html
Google Wave Federation Architecture whitepaper: http://www.waveprotocol.org/whitepapers/google-wave-architecture
Google Wave Data Model and Client-Server Protorol whitepaper: http://www.waveprotocol.org/whitepapers/internal-client-server-protocol
Google Wave Extensions, An Inside Look: http://mashable.com/2009/06/11/google-wave-extensions/
Here is a searchable collection of Google Wave Gadgets and Robots in order to look at some examples of what you can do.
You can check out the Cards gadget, for example that has source code available.

Resources