Tabelau geographical heatmap and overlaying data from two different datasets - google-maps

Now I'm trying to overlay latitude and longitudinal points from two different data sets, resulting in two different markers for each one on a geographical map. There is no relationship between the two data sets. Tableau doesn't seem to be able to accomplish this directly. I don't want to group the data at all, just plot the lat and lon points. Any suggestions?
I would also like one of the datasets above to be a heatmap, i.e. each data point plotted has its intensity correlated to the dimension. Besides the overlaying problem above, accomplishing a geographical heat map alone is not working for me. My geographical heat map by latitude and longitudinal points is not conveying the information I want. The lighter color marks are on top of the darker color marks. However, I want the darker color marks to be in front. How do I achieve this?
Would Google Maps or Fusion Tables be a better option for me?

I solved this problem by combining the two datasets into one using UNION ALL, making sure to add an extra column with a descriptor designating the originating source (i.e., which of the two datasets). I then set up a calculated field to determine what data to visualize and how to visualize it.
As regards to the heatmap, the solution was to bin the data and then sort it when plotting. Without binning, sorting appears not possible using Tableau.
I took a look at Google Maps and Fusion Tables, but the functionality and visual aesthetics are currently not at the Tableau level.

Related

OpenStreetMap: building a weighted graph

I would like to create a fairly big (~1bln nodes) weighted graph, with nodes being locations and edges being the roads that are present in OpenStreetMap data. Let us say we want to focus on some country, to keep the size within the above limit. The weights of the edges can be the actual lengths of the roads they represent. What would you do? Should I write my own parser for XML data and construct it in a straightforward way?
You may find gis.stackoverflow.com useful. The keywords are PostGIS and pgRouting. See e.g. https://gis.stackexchange.com/questions/21680/collecting-street-data-to-populate-a-graph-stucture-for-routing/21682#21682
and similar questions.

MySQL Spatial Object for multiple polygons that may or may not be connected

I have a set of of polygons. Sometimes they are completely disconnected (like separate patches). Other times, two sides of two polygons may touch each other (when the polygons are adjacent like on a chess board). The polygons never cross each other. In other words, their intersection is always empty.
I need to check if a point is contained in any one of those polygons. Is there a way I can build a single geometry using these polygons and check if the point is in it?
Currently I'm building a long WHERE close with OR conditions and do something like the below:
st_contains(st_GeomFromText('POLYGON(("+polygon+"))'), st_GeomFromText(CONCAT('POINT()')))
Thanks.

Finding intersecting areas in MySQL spatial db

In a MySQL database, how do I find circular areas that fall entirely or partially within a certain distance from another point? There are plenty of examples to find points within a certain radius, but not circular areas that intersect that certain radius.
I have a list of contractors that service certain areas (point and radius). Customers need to be able to find these contractors based on a distance from them.
I think you are looking for ST_Buffer, which will buffer a geometry by a certain distance. In your case this will turn your point into a circle, and you can then use ST_Intersects to find intersecting circles representing contractor areas.
Something like:
Select id from contractor c where intersects(c.geom, st_buffer(point, radius));
where obviously you need to provide values for point and a radius.

Mysql two points to be checked if they are in rectangles

I'm in a process of developing an application and I would appreciate some help regarding an idea how to store data in mysql table.
I have two points - point A and point B which are start and end point.
I've already wrote some php function that will create rectangles similar to:
http://googlegeodevelopers.blogspot.com/2010/05/search-along-route-made-easy-with.html
However depending on the route and radius it generates different amount of rectangles. What is the best way to save those rectangles into the database, so later I can query the DB and check if another two points (start/end) are in any of those rectangles.
Can you give me an example?
The easiest way to do it is to store your rectangles as polygons, per
http://dev.mysql.com/doc/refman/4.1/en/polygon-property-functions.html
You can then use MBRIntersects to figure out if they intersect (or use MBRWithin or MBRContains, if you'd prefer), per
http://dev.mysql.com/doc/refman/5.1/en/functions-for-testing-spatial-relations-between-geometric-objects.html#function_mbrintersects
For funky-shaped polygons, this isn't adequate, but the MBR (minimum bounding box) of a rectangular bounding box will be exactly the same as the rectangle itself.

GIS: Converting multi polygons to multiple features

I am involved in a GIS project. I have a base map file (shape file) that contains the road layer for a large portion of a town. The problem is that the shape file contains only two features each containing around 500000 points each. The features are multipolygons containing a large no of polygons inside. I wish to convert it to numerous features each containing not more than one polygon. Is it possible? If yes, how?
Seems like what you have here is a multi-part feature. If you are using ArcGIS, you need to add the advance editor toolbar in your arcmap. Start an editing session and use the explode multi-part feature tool and then you will have one geometry for each record.
If you have connectivity information (e.g. you have polygons and not just points) it's not too tough to do a decent job of polygon reduction.
What I've done in the past consisted of two steps.
Any vertex that is surrounded by polygons, all of which are coplanar, can be removed. I did this by "sliding" the vertex to a neighbor vertex, that neighbor getting all of the test vertex's neighbors and any triangles that become degenerate (e.g. any triangles shared between the two vertices) were removed.
Any vertex which has two edges leaving opposite one another, where the polygons on either side are either completely nonexistent or are coplanar can also be similarly collapsed into a neighbor vertex, but obviously only one that is along one of the parallel edges.
note-
Two polygons are coplanar if they share at least one point in common and if they have the same normal. Since the candidate polygons are always attached to the candidate vertex, you just need to compare polygon normals. The normal can be computed by taking the cross product of two of the edges of the polygon.