How to convert point shapefile to polygon - shapefile

I have United kingdom point shapefile, I want to know how to convert that into polygon file.
Currently I am working on web project, where I need to outline city boundaries on google map.
Thanks in advance.

Related

Shapefile has multiple "maps" in R

I am fairly new to using shapefiles in R.
I downloaded a shapefile of Africa and imported it into R.
africa<-st_read(paste0(shape_file_directory, "africa_map/afr_g2014_2013_0.shp"))
I then wanted to check out how the shapefile looks.
plot(africa)
Somehow the shapefiles includes multiple maps of Africa?:
shapefile maps
I just want a simple outline of Africa and its countries.
Sorry if this is a trivial question and let me know if you need any more info.
Thanks.
By default plot.sf will create one plot for each attribute (non-geometry column) in a spatial data frame. You can choose a single attribute to plot or show just the geometry by changing the data you pass to plot. See this vignette for details:
https://r-spatial.github.io/sf/articles/sf5.html

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

Gaze tracking with a webcam (openCV and C++)

I'm trying to realize a tool that returns the 2D coordinates of the point that the user is looking at. To do that I'm using openCV, c++ language and a low-cost webcam. I have the 2D coordinates of the center of the two pupils (leftPupil, rightPupil) but I don't know how to find the user's gaze.
I suppose that some information is missing but I don't know the right formula to estimate the gaze.
Is it mandatory to add a laser to get the distance of the user from the webcam? Must I analyze the geometric form of the pupil (if they are circles or elipses)? In this case, how can I detect the case in which they are eliptic or round?
Thank your for your ideas

PCL: cylinderes segmentation;point cloud

I'm working on my graduation project which consist on segmenting a pillar in point cloudinto its different cylinderes.
First step i did is i extracted the whole cylinder englobing the pillar with PCL library cylinder-segmenting code(c++), wich is composed of the different existing cylinderes seperated by a little gap (as shown in the photo), what i have as proposition is to segment these cylinderes by those gaps the thing that i really have no idea how to code it and i didn't find similar thing on internet.
enter image description here
and thanks in advance for any help.

how to query the database to return all zip codes with a given distance (ie 5 miles) from a given zip code using geopy

Hi frens I am using geopy to calculate the latitude and longitude. Now I want to get the list of areas given distance from a zipcode.How to get that?
Well, as I can see, geopy doesn't have any built-in capability to get a list of areas around some coordinates.
But you can use a workaround. Take your geocode and calculate coordinates (latitue and longitude). Then imagine a grid on the map with a cell size equal to area of the smallest one you need to find around your location.
Use geopy to get an area name belonging to the each cell corner of your grid. Is that ok for you? It will get you some kind of approximation because a grid is not a circle and you may miss some small areas. But I think in most cases the solution will work fine.
It is much easier to locate zipcodes inside a rectangle than in a circle so I would recommend that you approximate your problem by looking for zipcodes inside a given rectangle.
Here are answers to the question of how to get list of zipcodes in given polygone: Find zipcodes inside polygon shape using google maps api
Summary
You need geometry for each zipcode. Once you have that you need to be able to query it using database that supports geoquery. One such database is Google's Fusion Table and there is already a geometry data table for zipcodes available here: https://www.google.com/fusiontables/DataSource?docid=1AxB511DayCdtmyBuYOIPHIe_WM9iG87Q3jKh6EQ#rows:id=1
Here's the sample query for Fusion Table data.
Another approach is server side code using PHP and CSV data. Here's live demo: http://daim.snm.ku.dk/demo/zip/. The page also has download for code.
If you use any of above technique please make sure to upvote answers of original authors :).