cornellh4i / greenzone

A data visualization tool for Mongolian rangeland herders.
MIT License
0 stars 0 forks source link

Construct the MongoDB #30

Closed DannyThorne01 closed 2 weeks ago

DannyThorne01 commented 1 month ago

Great work so far team! For your next tickets you'll be doing some code refactoring and implementing the MongoDB

NOTE: We were supposed to have our MongoDB meeting last Friday, but it got pushed back so the schema isn't fully finalized. Nevertheless, I want you to get exposure with creating schemas, controllers and routes. I will give you example data to POST and GET in the Notion file under Setting Up the MongoDB Creation. Use PostMan to test your routes. I'm thinking of setting up automatic Jest tests in the future but not top priority right now.

For the research aspect, there's many ways to store the type of GeoJSON data we're working with, so I would you like guys to do some research and optimize the way you store the GeoJson Data in our MongoDB. I've included a starting to link that shows how to index this type of data. Enable GeoJSON indexing on MongoDB for faster geographic queries. MongoDB supports 2Dsphere indexes which optimize geospatial queries and allow you to query hexagon tiles within specific geographic bounds.

Working Directory: -backend/src/controller - make a controller for hexagons, province and soum -backend/src/models - make a schema for hexagons, province and soum -backend/src/routes.ts -backend/src/server.ts

Tutorials: