Giter Site home page Giter Site logo

ifpb / sdi-search-engine Goto Github PK

View Code? Open in Web Editor NEW
5.0 10.0 0.0 7.29 MB

Search Engine for Infraestrutura Nacional de Dados Espaciais - INDE

Python 62.76% HTML 7.27% JavaScript 0.97% TypeScript 14.62% Shell 0.52% Dockerfile 0.72% SCSS 0.27% PLpgSQL 12.88%
search-engine sdi ogc ogc-services tagging-temporal thematic-filter spatial-search spatial-data-infrastructure

sdi-search-engine's Introduction

SDI Search Engine

Executar a ferramenta

  1. Baixar arquivo de insert para a tabela auxiliar place link de download
  2. Não mude o nome do arquivo 05_place_insert.sql.
  3. Insira o arquivo em /db

Na primeira inicialização:

./build.sh

A partir da segunda+ incialização:

./start.sh

Para parar:

./stop.sh

Integração como serviço secundário. (Somente para a integração que a ferramente teve com outro trabalho de pesquisa)

Serviços

  • db_postgres: Container postgres com os feature types e services extraidos da INDE. Use o Link para fazer o donwload do backup do banco com parte dos dados da INDE. Após o download import os dados no banco através de uma conexão localhost na porta :5433 database:inde_database_docker.

  • solr_app: Container Solr para busca temática da ferramente. Use o arquivo backup/features_and_services_backup.json para inserir o backup dos dados.

  • api_search_engine: API Flask responsável por disponibilizar endpoints para consulta ao dados da ferramenta.

Passos para importar os dados no solr

Após iniciar o container do solr execute os sequintes passos:

  1. Acesse a interface web do solr através da url http://localhost:8983/solr/#/

  2. Selecione o core inde na barra de menu esquerda. Imagem abaixo.

  1. Selecione a opção Documents abaixo do select de cores.

  2. Selecione a opção JSON e copie os dados do arquivo backup/features_and_services_backup.json para o campo Document(s)

  3. Envie os dados clicando em Submit Document

Construir imagens e inicar containers

Use o script build.sh para criar as imagens e fazer o download de suas dependências. Ao final, o script já iniciará os containers para uso. Caso queira parar use o comando Ctrl + c e aguarde as mensagens container_name done.

Reiniciar containers

Use o script start.sh para iniciar novamente os containers. Desta vez os mesmos ficarão em background.

Parar sem remover os containers

Use o scrtip stop.sh para parar os containers em uso.

API

 - Similar Service
 - Returns a list of services similar to the one sent, according to your bounding box and theme
GET /similar/services/{service_id} HTTP/1.1
Host: api_search_engine:5000


 - Similar feature type
 - Returns a list of feature types similar to the one sent, according to your bounding box and theme
GET /similar/feature-types/{feature_type_id} HTTP/1.1
Content-Type: application/json
Host: api_search_engine:5000


 - Similar feature types bounding box
 - Returns the types of features most similar to the sent bounding box
GET /find/feature-type/bounding-box HTTP/1.1
Content-Type: application/json
Host: api_search_engine:5000
Content-Length: ...

{
	"xmin": "-47.320429043949524",
	"ymin": "-23.132468267449756",
	"xmax": "-46.74008861210897",
	"ymax": "-22.69721294356934",
	"start_date": "",
	"end_date": "",
	"theme": ""
}

 - Retrive data
 - Retrieves the information from the id
 - resource_type: 'feature-type' or 'service'
POST /retrieve/{resource_type} HTTP/1.1
Content-Type: application/json
Host: api_search_engine:5000
Content-Length: ...

[
	"23125c81-f581-46e6-93e7-64d74c07ab6d",
	"d0c8bb6b-81b9-4700-a6ca-0b310a2b2a1f"
]

sdi-search-engine's People

Contributors

dependabot[bot] avatar leanderson-coelho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.