Show HN: Tool shows UK properties matching group commute/time preferences
closemove.comAs this is more of an MVP for now, I mainly rely on APIs such as Google Geocoding API, Mapbox, etc in the backend, but this is certainly limited. If there was a dedicated user base who found value in this, I'd look to increase granularity/accuracy and reduce costs by working with raw spatial data and doing GIS/network analysis type stuff in-house instead.
Although, I do use OSM on the site as a map view source!
You can do that! You can filter once the search results are returned - but thanks, I will try to make this more obvious within the UI and allow filters earlier on :)
* If coordinates of commute locations are not cached in s3, reaches out to Google Geocode API to get them.
* Based on commute inputs, calculates the intersectional commute area for all housemates. If this is 0, then the program can return 0 properties to the user early as there are no houses there...
* The intersectional commute area is often a multipolygon (multiple shapes), and many APIs do not accept multiple shapes as a query input. Many APIs also do not like complex geometries (often only accepting x max points).
* To get around this, each polygon within the multipolygon is simplified with the Douglas-Peucker algorithm iteratively until the points in the resulting polygons within the multipolygon sum to a total of (x - 2(n-1)) where x is the maximum allowed shape points on an API and n is the number of individual polygons.
The remaining simplified multipolygon is then connected with nearly-infinitely-small bridges [which adds 2 points between each shape, hence x - 2(n-1)]. Once this geometry is calculated, valid properties can be found and returned to the user based on bedroom, bathroom, budget etc preferences.Vanilla JS frontend - uses leaflet.js for the map functionality.