This is an API for NASA/USGS Landsat-8 images. Landsat-api enables you to make geospatial, date and text queries on Landsat-8 metadata.
The metadata is released in csv format by USGS on a daily basis. You can download the raw metadata from here.
Download and install the lastest version of elastic search zip from ES website
Landsat-api powers a number of projects including Libra and AstroDigtal's Imagery Browser.
- MongoDb [2.6 or higher]
or
- ElastiSearch [1.6 or higher]
Install packages
$: npm install
Set environment variables on your system or add an .env file to the root directory of the app:
DB_TYPE=mongochoices aremongooresES_HOST=example.com:9200if you are using ElasticSearchMONGODB_URL=mongodb://user:[email protected]:11111/db_nameif you use MongoDbAREA_LIMIT=500000The area limit in (sq. km) for use in geo-spatial queries.REDIS_USE=trueWhether to active the caching. Default is false.REDIS_HOST=127.0.0.1default is127.0.0.1REDIS_PASSWORD=redispasswordRedis db password. Default is null.REDIS_DATABASE=myredisdbName of the redis db. Default is null.REDIS_PORT=6379Redis port. Default is 6379.LANDSAT_PAYLOAD_LIMITLimit of payload size for POST in bytes. Default is 2048000.
To run the api:
$ node index.js
To run the database updater
$ node updater.js
Note: updater.js works with MongoDb. If you plan to update an ElasticSearch installation replace updater.js with examples found here.
$ npm test