hotosm / galaxy-api

Backend to fetch data from Underpass
https://galaxy-api.hotosm.org/latest/redoc
GNU Affero General Public License v3.0
14 stars 5 forks source link

Extracting raw data based on polygon input #116

Closed ramyaragupathy closed 2 years ago

ramyaragupathy commented 2 years ago

An API endpoint, where the user can extract a certain OSM feature type for a specific hashtag within the input polygon and the timeframe that the user has supplied. Eg: buildings with #hotosm-project-1234 on 7th Dec 2021

Available only for permissioned users since we share user metadata on features and tasking manager statistics.

Endpoint: /rawdata POST

Source:

Insights - so that data always remain consistent over a period of time

Sample Request Body:

{
“feature_type”: [“building”,”highway”, “landuse”, “waterway”],
“Hashtag”: [“hotosm-project-1234”,”missingmaps”],
“From_timestamp”: “2021-08-27 09:00:00”,
 “to_timestamp”:”2021-08-31 09:00:00”,
  “Output_type”: GeoJSON/KML/SHP
 "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              71.08154296875,
              34.125447565116126
            ],
            [
              71.83959960937499,
              34.125447565116126
            ],
            [
              71.83959960937499,
              34.615126683462194
            ],
            [
              71.08154296875,
              34.615126683462194
            ],
            [
              71.08154296875,
              34.125447565116126
            ]
          ]
        ]
      }
}

Acceptance Criteria:

ramyaragupathy commented 2 years ago

cc @robsavoye @omranlm @JorgeMartinezG

ramyaragupathy commented 2 years ago

The current data from Insights is a historical snapshot for the given time period. So instead of using raw-data endpoint let's rename it to historical-snapshot.

@itskshitiz321 @omranlm @JorgeMartinezG @robsavoye

kshitijrajsharma commented 2 years ago

We can keep rawdata as prefix to make it more clearer ? like this , rawdata/historical-snapshot/ , so that when we provide current snapshot we can say , rawdata/current-snapshot @ramyaragupathy What do you think ?

ramyaragupathy commented 2 years ago

sounds good @itskshitiz321