Find map coordinates based on street and cross streets information - dictionary

Example:
I have a street BECK STREET and two cross streets WESTCHESTER SQUARE and KIRK STREET. As well as direction W.
Result:
Need to drop a pin at this location. If it's easier I would also be ok with drawing a geofence.
What would be a good way to calculate this.

Related

Voronoi approach to making districts while also using a multilinestring

I have a spatial objects with multiple points (buildings) on a map. What I wanted to do is divide an area based on the nearest point. The calculated Voronoi looks quite promising, but has some strange aspects if you know the "real world". For example a small part of a district is also at the other side of a river because of the closeness (surprise).
What I want to do is combine this with a multi linestring which contains rivers, railroads. What I want to do either end the district at this line OR add a penalty for 'crossing' it. Is anyone able to shed light on the problem, or possible suggest an alternative voronoi method that works?

TomTom reverse Geocode not returning street name for some gps coordinates

For some GPS coordinates, no street name is returned. For example
https://api.tomtom.com/search/2/reverseGeocode/47.532289,-122.251843.json?key=MYKEY&roadUse=[%22LocalStreet%22]&returnRoadUse=true
returns
{"summary":{"queryTime":102,"numResults":1},"addresses":[{"address":{"routeNumbers":[],"countryCode":"US","countrySubdivision":"WA","countrySecondarySubdivision":"King","countryTertiarySubdivision":"Seattle East","municipality":"Mercer Island","postalCode":"98040","municipalitySubdivision":"Mercer Island","country":"United States","countryCodeISO3":"USA","freeformAddress":"Mercer Island, WA 98040","boundingBox":{"northEast":"47.535094,-122.241410","southWest":"47.534766,-122.242287","entity":"position"},"countrySubdivisionName":"Washington"},"position":"47.534897,-122.242287","roadUse":["Publicly Accessible","LocalStreet","Terminal"]}]}
Which contains no street name. Is there anyway to tell the TomTom API to return results that ALWAYS include a street name?
This may be a hack, but if we create a pedestrian route starting with that location (in the middle of Lake Washington) the first instruction starts usually at the closest street that can be navigable, isn't?
These coordinates are pointing to a lake. And the nearest road is some living street with no name. So that is not a perfect example.

Feature engineering of X,Y coordinates in neighborhoods of San Francisco

I am participating in a starter Kaggle competition(Crimes in San Francisco) in which I want to predict the category of a crime using a bunch of predictor variables including X and Y coordinates of a crime. As I doubt of the predictive power of the coordinates, I want to transform these variables to something more relevant to the crime category.
So I am thinking that if I had the neighbourhood of San Francisco in which the crime took place, it would be more informative than the actual coordinates of the crime. I can find the neighbourhoods online but of course I cant use the borders of each neighbour to classify the corresponding crime because their shapes are not rectangular or anything like that.
Does anyone have any idea about how I could solve this one?
Thanks guys
Well that's interesting AntoniosK and it's getting close to what I want to accomplish. The problem is that the information " south-east and 2km from city center" can lead to more than one neighborhoods.
I am still thinking that the partition of the city in neighborhoods is valuable because the socio-economic and structural differences between them ( there is a reason why the neighborhoods of each city are separated as such, right?) can lead to a higher probability for a certain category crime and a lower one for another.
That said, your idea made me thinking of using the south-east etc mapping and then use the angle of the segment(point to city center) with x axis to map the point to appropriate neighborhood. I am on it right now. Thanks
After some time on the problem I found that the procedure I want to perform is titled " reverse geocoding". It also turns out that there are some api's to solve this. The best according to my opinion is revgeocode() function contained in ggmap package(google's edition). This one though has a query limit per day(2500 queries) unless you pay for extra.
The one that I turned to though is geonames package and GNneighbourhood function that turns coordinates to neighbours. It is free, though I have experienced some errors(keep in mind that this one is only for US and Canada cities)
revgeocode function-ggmap package
Gnneighbourhood-geonames package

Approaches for spatial geodesic latitude longitude clustering in R -- Follow-Up

Mine are follow-ups to the question & answer in Approaches for spatial geodesic latitude longitude clustering in R with geodesic or great circle distances.
I would like to better understand:
Question #1: If all the lat / long values are within the same city, is it necessary to use either fossil or distHaversine(...) to first calculate great circle distances ?
or, within a single city, is it OK to run clustering on the lat/long values themselves ?
Question #2: jlhoward suggests that :
It's worth noting that these methods require that all points must go into some cluster. If you just ask which points are close together, and allow that some cities don't go into any cluster, you get very different results.
In my case I would like to ask just ask "which points are close together", without forcing every point into a cluster. How can I do this ?
Question #3: To include one or two factor variables into the clustering (in addition to lat/long), is it as easy as including those factor variables in the df upon which the clustering is run ?
Please confirm.
Thanks!
"within a single city, is it OK to run clustering on the lat/long values themselves ?"
Yes, as long as your city is on the equator, where a degree of longitude is the same distance as a degree of latitude.
I'm standing very close to the north pole. One degree of longitude is 1/360 of the circumference of the circle round the pole from me. Someone ten degrees east of me might only be ten feet away. Someone one degree south of me is miles away. A clustering algorithm based on lat-long would think that guy miles away was closer to me than the guy I can wave to ten degrees east of me.
The solution for small areas to save having to compute great-circle ellipsoid distances is to project to a coordinate system that is near-enough cartesian so that you can use pythagoras' theorem for distance without too much error. Typically you would use a UTM zone transform, which is essentially a coordinate system that puts its equator through your study area.
The spTransform function in sp and rgdal will sort this out for you.

How to detect "MINIMAL" cycles in a graph

I have a question regarding graphs.
I have a street network (imagine Manhattan, NY as an example, but it could be any street network) represented as a graph (where junctions are represented as nodes und the streets are links between the nodes).
The problem now is that I somehow have to get the "city blocks" (think of the blocks in Manhattan for instance), i.e. the set of arcs that define a city block. I thought of cycle detection algorithms but that obviously won't give me the real blocks only, but also all the other cycles that I don't really need. Of course I could filter those out probably quite easily but this can't be the real solution.
Do you have any (simple) idea how I can get the "real" city block from a graph?
Thanks in advance!

Resources