How to get all the points' longitude and latitude values in a polyline - google-polyline

I have an encoded polyline, this is the content:
kbwyFyycpDiEhA~QnIvYTlSvk#pK_CjaBte#fxApKah#mmBqIoh#aEgEot#iS_To[mSoEaLu[mv#fQuKoRiEkc#aOkYgr#NiVlQySlDsHwIez#g]aU`J`AnO{InBsEuQ~G_Z_ScKwO_`#uScMyXhEuUre#c]fOuQfl#kDsCwAoRaj#v_#_FdNuB|YwZ|[wDnSeJvJ}MwHuRiu#cW}`#oByXgJ{Gc\fW_S_G_Qx#yGtMy[fGaEjL_ViG}|#g|ArZom#dKgCE}FeSoTcWuM}v#cSqb#cb#gP_IwX_l#aJcd#qTqUip#sM_ClAbBrEwEj#mE{FvE`GfEk#uAoEhByNDvKfr#xO|RlTrI~b#xYzm#zO`Hbb#ra#zmAx`#|TlWYlEuIxAiF`IuSvg#tZdb#tVjk#|_#|TkBrH_E_E`AfOjFrLqGAmLtXuR`QyAhIt#lJhHfJ}ChDrDtLwEzRtUtw#cPdNwD~Lj#zXjQbU~QjJjCpYrHbEj#dJnTtGnG~Fn#`IhaAqDv_#ai#dJgYjWeIz[ud#z]_QjAqEyEu[|H_Pna#k_#v{AhLr~A}GhE`HnH~m#jJzSve#p]re#jO~y#oScIg#iBiNvEqIuN{`#rEsNl`#iJmTyIxD[
How can I find the longitude and latitude values for all the points in the polyline?
I used Interactive Polyline Encoder Utility but with this I get the values point by point.

Using the Interactive Polyline Encoder Utility, you can already get the latitude and longitude values using the "Decode Polyline" button . Under the "Locations List" box you should see all the coordinates for the polyline. Those points in the Locations List box are already the latitude and longitude values that you need.

Related

spotfire lat/long search box that places point marker on map

Is it possible to have a latitude and longitude or coordinate search box that places a point on a map chart in spotfire
and how can this be done?
Or can the search field box on the map layer create points on a map?

Python: Is there a way to overlay a matplot color map graph over a GeoDataFrame map plot using latitude and longitude coordinates?

I have a GeoData frame (created from a shape file) that contains latitude and longitude coordinates for all of the counties in the United States. When graphed, it displays the map with all of the county outlines drawn.
I have another set of values with Lat/Long coordinates that I am running a KNN algorithm on to generate a color map. Is there a way to overlay the color map onto the GeoData frame map?
I have tried just plotting them at the same time:
df_usa.plot()
mplot.scatter(x, y, c=approx_values, cmap='viridis)
mplot.show()
But this plots the color map far from where the geomap is in the map frame.
Any advice on how to do this is greatly appreciated. I am using geopandas, pandas, and shapely on Python 3.7.

ShapeFile Points to Longitude/Latitude

I have loaded my shapefile with the following columns.
[NumberOfParts],[ContentLength],[NumberOfPoints],[Points],[RecordNumber],[ShapeType],[XMax],XMin],[YMax],[YMin],[AU12],[NAME].
I successfully derived geo spatialcolumn from the formula geometry::STGeomFromText(Points,4326). Now the issue is I need to get the Longitude/Latitude from the Shapefile. The Shapefile has details for New Zealand. Please help me to derive Latitude/Longitude. I also have a projection file but I have no idea how to use the file to derive Lat/long.
First, you would probably want to create a Centroid column and use STCentroid() to populate it.
Next, you can derive the latitude / longitude with STX and STY. For the U.S., I use this to export lat/long coordinates: CAST(centroid.STY AS decimal(8,6)) and CAST(centroid.STX AS decimal(9,6)) because the longitude can be up to 3 places to the left of the decimal and latitudes are only 2. New Zealand would be different.

Can dimensions be skipped in queries against R/R*/X-Trees?

Let's say we have a 4 dimensional tree with dimensions longitude, latitude, altitude and for illustration purposes, price.
Can we query against longitude and latitude and optionally against either altitude and/or price?
Yes, obviously you can do that. For window queries, just ignore the dimensions or query with an infinite rectangle in that dimension. For range or knn, use a distance function that skips these dimensions.
However, for range/kNN queries, a distance function using both latitude/longitude and e.g. price is nontirival to define. Euclidean distance obviously is not very sensible, as $1 is not the same "distance" as 1 degree in latitude.
The R*-Trees in ELKI should support this out of the box AFAICT. If you query the tree with a projected distance, it will use only these attributes.

Converting a lat/lon values to a small map

I have a list of coordinates of lat/lon values consisting of cities around the world. I have put together a SVG map of the US which I would like to display the major cities of the world as pins on top of the SVG map. So far I've figured out that the map projection that I am displaying is a Mercator projection of the US so the next step is how can I get the X/Y coordinates for that map of the map for each city? Once I get the mercator projection from the lat/lon then how is that converted to X/Y values and then to relative X/Y values based on the size of my map?
The Wikipedia article on the Mercator projection provides the equations you need to implement. The Mercator projection transforms lat/long to x/y, that's what map projections do. All you have to do once you have the x/y values is translate them into (in your case) pixels or whatever measure you use.

Resources