When it comes to setting up a Geospatial backend there are generally only 3 camps:
- ArcGIS Online/Enterprise
- Geoserver
- Postgres/PostGIS + Server
These servers while extremely capable are difficult to manage and often come with a lot of bloat and can be difficult to configure if you are not someone inclined to work in Windows Server.
That is until I recently found out about KoopJS a solution that is under the Open Source license to provide an Node backend built with Express to serve up GeoServices which are a standard in the industry to distribute Geospatial specific data.
What am I using it for
Where it really excels is creating a custom solution (like I was looking for) for the purpose of creating a real-time data solution for transit. As of right now I am able:
- convert GTFS-RT and distribute real-time updates
- backup information into a datalake
- preform scheduled tasks
- query my datalake with AWS Athena all within Koop and Node.
Building your own provider
If you are interested in building your own provider I recommend you looking at the koop-app-example and koop-provider-example.
The koop-app-example
is the framework that I used to build my providers by configuring the files in the src/
file and adding custom providers. In the repo it is already setup for Craigslist and GitHub providers.
I used koop-provider-example
as a template for all of my custom providers by configuring the index.js
and model.js
files. While there are an extended list this was all I needed to focus on. Below is the list of files and their purposes in the standard Koop provider.
The only requirement (that I have found) to creating a custom connection is to be able to provide a GeoJson output of the Model.prototype.getData()
.
In the index file you just really need to update the name and that will be the name of your service. Example call for feature service would be formatted like this:
http://localhost:8080/:name/FeatureService/0
From here you can append query?where=...
and input your standard where GeoService parameters
Takeaways
Out of the box there are quite a few different connections that you can setup including s3, PostGres, Craigslist, BigQuery and others which makes it really alluring considering there are ways to connect existing datasources that will adhere to a laundry list of url parameters. I think there is a strong case for using this type of server for real-time and big data queries as these are typically locked behind another license in the geospatial server world.
Top comments (0)