CARTO Animation Time Series Map - animation

Hello I am making a animation time series map in CARTO builder. The animation works fine, but I would like my points to continuously move from point A to B, not just populate from point A to B like its doing now if theres a vast distance for the particular ID for that point. I know this would work if I had many more coordinates filling in from point A to B like in this example, but I don't. So is there a way to do this in cartodb?

CARTO BUILDER allows you to analyze and visualize your data according to your values. So as you pointed out, you would need to enrich your dataset with data among those dates and locations. Regarding dates, you can use generate_series PostgreSQL function as explained here. In relation to generating points between two coordinates, you would need to create a line (via Connect with lines analysis or ST_MakeLine) and then apply ST_DumpPoints).

Related

How does one creates a raster layer from SQL Server in GeoServer

I want to implement a weather layer that displays temperatures from -40 to 40 degress in a map using GeoServer. I got an SQL Server table that looks something like:
create table temperature (id int identity primary key, geom geometry, temperature float)
Geom contains a Point for which a given temperature measure is applicable. I have added the table as layer in GeoServer but i'm stuck to actually be able to render it. Right now, the best i get is a big red square :D So, it seems like it renders as a pure point, and not a raster.
How does one creates correct bindings etc for the raster to be displayed nicely?
Is it done on SLD level or somewhere else?
You could use the BarnesSurface transformation as described in this question. But since the transformation will be carried out each and every time the map is displayed it would be more efficient to rasterize the points once and then use that raster in GeoServer.

How to manage 2D data in a procedural game world

I’m building a Starflight-inspired 2D space exploration game with a procedural world. The gameplay is divided into different « scenes » (to use Godot terminology) to manage the different « depths » of the game. For example, interstellar flight is a scene where the star systems are simply represented by star sprites. When the player gets in range, the view is moved to the solar system scene, where the player moves his ship inside the actual solar system.
So far so good, I generate the universe (the solar systems) from a hard coded array of coordinates and seeds. Now I also want to make the universe generation procedural, but I’m guessing that loading a whole universe (there is no real limit to the number of solar systems once it becomes procedural) in memory won’t be efficient.
I’m thinking of generating the universe on the first run and saving the data to a file, but I’m wondering how to load the relevant data in an efficient way that would let me load only a certain « radius » of data around the player’s ship. I feel like it would be the way to go if I use my generation algorithms that generate « realistic » galaxy shapes, since it implies many steps of data processing (different cluster shapes are generated, arms, blobs, etc. and then stars are spinned around the center to simulate the galaxy rotation, etc.) that would be probably too long to calculate in realtime.
I’m wondering which approach I should take on this problem. It’s not really language or engine dependant, so references to generic articles and algorithms on the subject would suffice.
I also read a bit about QuadTrees and I think I’m getting to something there, but I’m not exactly sure how to use that with a file on disk.
Thanks in advance for your help!
I have some suggestions:
Do not generate the whole universe on the first run, generate only the areas that are somehow visible. Then, instead of loading the whole universe from disk, you just generate it whenever your spaceship (or whatever) come within view distance of that area. This makes game initialization much faster and allows an (almost) infinite universe.
If you want the universe to be modifiable, store only the `edits' that a player makes. So if you want to show a part of the universe, generate the part from your seed and then overlay the stored edits. This makes storage much smaller.
For storage on disk, have a look at R-Tree, especially R*Tree and R+Tree, they are designed for storing data in disk pages.
as TilmannZ suggested, you should not be generating the whole dataset for the galaxy when you start the game, because there is likely no need (unless the player needs to see/interact with all the data at once - e.g. all stars). If this is the case, for example for a starmap, then you may be better loading all the data once and saving the result in an image file.
Instead, you should only genereated the data as needed around the player. The most obvious way to do this would be to construct a grid around the player, and keep this grid centered on the player as they move around. As the player moves around, you only need to update the conceptual galaxy coordinates of each cell (not the rendered coordinates). Then for each cell you can then use the coordinates as the input into a value or gradient generator like Perlin to determine what features should spawn in that location.
As for 'shaping' the galaxy or universe, one effective way is to sample the pixel data of a greyscale image of a galaxy which has the shape you want. You could load the image's RGB data at run time, and use the coordinates of your grid as you generate the stars to get the RGB value, which you can use as a density factor for the star generation; the whiter the pixel, the higher the star density at this location and visa-versa for black pixels. This method lets you effectively draw the shape of the galaxy in paint.
Maybe think about different layers of abstractions. Each layer uses the parent layer, designer input, events & procedural generation algorithms to generate the needed data.
The Universe layer contains user or randomly placed galaxy polygons & types.
The Galaxy layers can add more details (number & density of spiral arms) or a density map.
A cluster of solar systems.
The solar system adds the stars & planets.
And only create the details for currently needed elements.

"Live" graph d3.js with simulated data

I have created a simple line graph with data from a mySQL database using PHP to return the data in JSON format.
https://gist.github.com/5fc4cd5f41a6ddf2df23
I would like to simulate "live" updating something similar to this example, but less complicated:
http://bl.ocks.org/2657838
I've been searching for examples on how to achieve this simply as new to D3 - to no avail.
I've looked at Mike Bostock's http://bost.ocks.org/mike/path/ path transitions, but not sure how to implement this using json data.
Can anyone help with either an example or some direction on how I could accomplish this?
Doing that kind of line transformations is tricky in SVG because moving large number of points just a little and rerendering the complete line can hurt performance.
For the case when interactivity with each data point is not paramount and the time series can grow to contain arbitrary number of points, consider using Cubism. It is a library based on d3 but meant specially for visualizing time-series data efficiently. To prevent rerendings of SVG, it draws the points on a canvas, allowing for cheap pixel by pixel transitions as new data arrives.

PointCloud with multiple Kinects

I am trying to make a PointCloud mapping user with multiple kinects on Processing. I get the user's front and back with 2 kinects on opposite sides and generate both PointClouds.
The trouble is that the PointClouds X/Y/Z are not syncronized, it just puts the two of them on screen and it surely looks messy. There is a way to calculate or make a comparison between them, to translate the second PointCloud to "join" the first? I could translate the position manually, but if I move the sensors it will go off again.
Supposing all the Kinects are stationary, I guess you would have to go in this order:
decide on which Kinect to use as a global reference,
get parameters for a 3D transformation for each of the other Kinects - I'd try to
use PMatrix3D and applyMatrix(), although it may be slow,
apply the transformations on to each of the other Kinects' point clouds and draw
the clouds
I don't (yet) know how to get the transformation parameters for a Procrustes transformation, but assuming they won't change, you'd probably have to set up multiple reference points, maybe by displaying the point clouds from each pair of Kinects and registering the points you know are the same in both point clouds. After getting enough of them, construct a PMatrix3D and apply it inside push/popMatrix.
This is the approach used by this guy: http://www.youtube.com/watch?v=ujUNj1RDL4I
An alternative approach would be to use an Iterative Closest Point algorithm and construct 3D transform from its output. I'd really like an ICP or PCL library for Processing, if anyone knows a good one.

Plotting dots to a map given latitude and longitude

Summary: I need a tool that can put 60m+ points on a map image. I'm trying to show density map and would like to plot a dot for each point (lat/long) on the map.
Hi I'm working on project that requires a density map. I have latitude and longitude and all the tools that I have seen (Ammap, FusionCharts maps, google charts/map) requires either XML or JSON or some other data type with the data points. Problem here is that, I have 60 million + data points and transferring any type of object with that many data point is not feasible.
One solution I can think of is mapping latitude and longitude to pixels of the map image. That requires a lot of time and work. I was wondering if you guys have done something similar and know of tools that can do this for me. It doesn't have to be free.
You'd be much better off creating a heatmap instead of passing all of the individual points to the map, which would get very busy, very quickly.
There are already a few discussions over at GIS.StackExchange about this exact topic. Search the the [heatmap] tag.
Since you mentioned FusionCharts, assuming you can load all of your data into a Google Fusion Table, it looks like you should be able to make a heat map in Google Fusion Tables).

Resources