pelias / pelias/spatial

Point-in-polygon for point-based geometries

Open
#6 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
32
Forks
8
Avg merge
13m
Merged PRs (30d)
1

Description

The title is a bit of a misnomer...

The idea is that we can use point-based geometries in the PIP engine so that they are returned in results when they lie within a specified distance from the target point.

This is super useful for geographic areas where polygon data is not available, or for sources like OpenStreetMap where postcodes and suburbs are commonly just given a lat/lon (an OSM node).

Eg. https://www.openstreetmap.org/node/279655026

It's likely that all data sources will have some data which represents an area but is provided as a point.

There are two ways of achieving this:

  • 'Buffer' points into circles on import
  • Perform an additional 'distance from point' check at query-time

The former would probably be more performant but, regardless, it would be more flexible to do the latter since it allows dynamic selection of the buffer radius while the other approach would require a re-index of the database (time-consuming).

Related: https://github.com/pelias/spatial/issues/5
Related: https://github.com/pelias/spatial/issues/4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the point-in-polygon engine and the related issues linked as #5 and #4. Compare buffering points on import with a query-time distance check, then define how point-based geometries should be included and how a selectable buffer radius would be verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.