Giter Club home page Giter Club logo

featureservice's Introduction

featureService

Travis CI status Docker Pulls

What's this?

The featureService is a simple JSON REST API that enables you to work with the OpenStreetMap data-set.

Using the featureService you can, for example, discover all the locations or points of interest in a particular area or look up properties of locations such as their bounding box, centroid or name.

Setup

System dependencies

In order to run this project on your machine, you will need to install the following system-level dependencies:

Azure resources

You will need to set up an instance of Azure Databases for PostgreSQL for the featureService.

You can run the following snippet in a Bash shell (such as the Windows Subsystem for Linux) to set up a new instance of Azure Databases for PostgreSQL using the Azure CLI:

dbname="----CHANGEME----"             # e.g. myfeaturesservicedb
dbuser="----CHANGEME----"             # e.g. admin
dbpassword="----CHANGEME----"         # e.g. featureService1!Rocks
dbsku="----CHANGEME----"              # e.g. GP_Gen4_2
resource_group="----CHANGEME----"     # e.g. myfeaturesserviceresourcegroup
resource_location="----CHANGEME----"  # e.g. eastus

az group create \
  --name="${resource_group}" \
  --location="${resource_location}"

az postgres server create \
  --name="${dbname}" \
  --admin-user="${dbuser}" \
  --admin-password="${dbpassword}" \
  --resource-group="${resource_group}" \
  --location="${resource_location}" \
  --sku-name="${dbsku}"

Next, enable clients to connect to the database. You can either white-list particular IPs or a range of IPs:

az postgres server firewall-rule create \
  --server-name="${dbname}" \
  --resource-group="${resource_group}" \
  --start-ip-address="0.0.0.0" \
  --end-ip-address="255.255.255.255" \
  --name="AllowAll"

Running the application

Once the system dependencies are installed and your Postgres database has been created, you can run the project via Docker:

docker build -t featureservice .

docker run \
  -p 3035:80 \
  -e FEATURES_DB_USER="${dbuser}@${dbname}" \
  -e FEATURES_DB_PASSWORD="${dbpassword}" \
  -e FEATURES_DB_HOST="${dbname}.postgres.database.azure.com" \
  -t featureservice

The first time that you run this command, it will take about 90 minutes while your Postgres on Azure instance is getting populated with over 2GB of global geo-spatial features and appropriate indices are being built. On subsequent runs, the start should be instantaneous.

Using the application

After starting the service, you will be able to call the featureService, for example via the following requests:

featureservice's People

Contributors

timfpark avatar c-w avatar erikschlegel avatar jcjimenez avatar

Stargazers

 avatar

Watchers

Anthony Turner avatar  avatar James Cloos avatar Limor Lahiani avatar  avatar Kevin Hartman avatar David Douglas avatar Beat Schwegler avatar Petro Soininen avatar Anastasia Zolochevska avatar Stephanie Marker avatar Nate avatar Andrei Ermilov avatar  avatar Sara Spalding avatar  avatar

Forkers

isabella232

featureservice's Issues

Standup / Populate Feature Master DB

We need to deploy and populate the feature service master DB for all global place shapes from whos on first. The old instance doesnt seem like its accessible.

Crashes with ECONNRESET

I set up the featureService in Kubernetes using the manifests in install-featureservice.sh. The database is Azure Databses for PostgreSQL.

This setup crashes with some odd errors:

image

The same setup works fine when run via docker-compose on my machine.

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.