Using shapefile polygons in Spotfire to select points - shapefile

I have a map in Spotfire with several different polygons overlaying it. These polygons are all stored in a shapefile and loaded on the map as a feature layer. Also on the map are several xy points with data associated to them. I would like to be able to select a polygon and in turn, that polygon select all the xy points inside of it.
Thanks,
-Andrew Pruet

Related

PowerBI - Show lines on a map from one point to another

We got several OLAP Cubes in PowerBI Datasets.
One of the cubes has a dimension "dim_location" which contains columns for latitude and longitude. But each dataset has 2 pairs of values, let's call them start_latitude, start_longitude and end_latitude, end_longitude.
I got a fact table connected to that dim_location and want to show some of the measures on a map.
It works perfectly fine with both the map visual and the ArcGIS visual, if I use either the end or the start coordinates. I can show the values as circles with changing size or changing color dependent on the value of a measure. So far so good.
But what I instead want to accomplish is to show a line on the map for each dataset. Each line shall go from start point to end point, color dependent on measure value.
Is there a way to offer the coordinates in the cube dimension in some string syntax that will create a shape, like a polygon with only 2 points, which would result in a line, which can then be shown on the map?
As stated before everything works fine on the map and the ArcGIS visual with one point (lat/lon) per dataset. Tried to find help online for some polygon syntax but came up empty.

Power BI maps: something in between ArcGIS Maps and Shape Maps

I'm trying to create a colored heat map on some polygons (originally a .kmz file that I converted to TopoJSON - .json with mapshaper.org) and overlay on them a few coordinate points.
I tried first with ArcGis: I used Longitude and Latitude to visualize the location of certain objects and then I overlapped a layer I found online on ArcGis (that's the same I would like to use). The problem is that I cannot color the polygons in this layer and it seems not possible (https://community.powerbi.com/t5/Desktop/ArcGIS-geographic-ID-mapped-onto-a-polygon-layer/m-p/339432). I cannot even upload the data on ArcGis because the data are private company data.
Then I tried with Shape Map: I uploaded the TopoJson and colored them with the data I had associated with these zones, but I cannot find a way to display the objects with coordinates on top of them.
Do you have any suggestion on what can I do? or is it an impossible task at the moment?
I can show here the results (the dots with the coordinates are in the center of the image on the left):
Here there are some mock up data and the PBI file I created: https://drive.google.com/open?id=1rloRkCdi0-M-4ljPdOU9cxg_KpcU5GnT
Pay attention to data format: I converted some of them during the import.
Thanks, any help is appreciated.
It looks like this is not possible to be achieved in Power BI at the moment:
https://community.powerbi.com/t5/Desktop/Shape-Map-ArcGIS-Map-can-I-combine-them/m-p/838523#M402722

create 3D surface (CGAL::make_surface_mesh) by set(10 million ) of points 3D

I have 10 million points as input data and I want to create 3D surface(3D-Delaunay triangulation) by them.
I understand that I should use CGAL library.
In example here as input data is sphere and it is defined by formula.
I want to create surface by points, not by formula.
Please help me with this issue.
The link you give cannot take points as input. Please have a look at several algorithms for surface reconstruction for point sets.

Plotting/finding perimeter of data on a scatter plot

Regarding the included graph (It's been ListLinePlotted to show the data sets more clearly),
1: How would I find and or plot the perimeter of each data set; ideally in List form, so it will scale when I plot it using LisLogPlot alongside the original data. (Similar to FindCurvePath, but for a non-round shape)
2: How would I fill the entire area encompassed by the data set on the ListPlot. i.e. the resulting graph would have four block color areas in the shape of each region.
Essentially I'm just trying plot graphs which clearly show the different regions. If there are better ways then I'd be open to suggestions!
P.S. the regions will never intersect for this particular plot.

Check which mesh element is inside the original polygons

I have a set of non-overlapping polygons. These polygons can share nodes, edges, but strictly no overlapping.
Now, I am going to mesh them using Constrainted Delaunay Triangulation (CDT) technique. I can get the mesh without problem.
My problem is, after the mesh, I want to know which mesh element belongs to which original polygon. MY current approach is to compute the centroid for each mesh element, and check which of the original polygon this centroid falls into. But I don't like this approach as it is very computationally intensive.
Is there any efficient ways to do this ( in terms of Big O the runtime)? My projects involve tens of thousands of polygons and I don't want the speed to slow down.
Edit: Make sure that all the vertices in a mesh element share a common face is not going to work, because there are cases where the all the vertices can have more than one common face, as below ( the dotted line forms a mesh element whose vertices have 2 common faces):
I can think of two options, both somehow mentioned :
Maintain the information in your points/vertices. See this other related question.
Recompute the information the way you did, locating each mesh element centroid in the original polygon, but this can be optimized by using a spatial_sort, and locating them sequentially in your input polygon (using the previous result as hint for starting the next point location).
What about labeling each of your original vertices with a polygon id (or several, I guess, since polys can share vertices). Then, if I understand DT correctly, you can look at the three verts in a given triangle in the mesh and see if they share a common label, if so, that mesh came from the labeled polygon.
As Mikeb says label all your original vertices with a polygon id.
Since you want the one that's inside the polygon, just make sure you only go clockwise around the polygons, this makes sure that if the points overlap for two polygons you get the one facing the correct direction.
I would expect this approach to remain close to O(n) where n represents number of points as each triangle can at only have one or two polygons that overlap all three points.
Create a new graph G(V,E) in the following way. For every mesh create a node in V. For every dashed edge create an edge in E that connects the two corresponding meshes. Don't map solid edges into edges in E.
Run ConnectedComponents(G).
Every mesh will be labeled with a label (with 1-to-1 correspondence to polygons.)
Maybe you can call CDT separately for each polygon, and label the triangles with their polygon after each call.