It also provides HTML to let users browse available services and view them in maps.
View a live demo.
The application handles ArcGIS REST API requests to custom "data providers", and returns their output in ArcGIS JSON format.
Here are two sample "data providers":
- CityBikes: Provide data from http://api.citybik.es.
- GeoHub: Provide data from geoJSON files stored in GitHub Repositories and Gists.
- CurrentWeather Provide data from NOAA weather stations across the U.S.
The framework lets you build your own "data providers":
dataproviderbase.DataProviderBase. Override only what you need to.
- Add instances of your subclass to the
At a glance, this is how it works:
- urls: Construct Adaptor and Template REST Endpoints.
- output: Construct JSON output. Format HTML output for JSON.
- dataproviderbase: Describe the service (fields, idField, nameField, etc.) and return features when requested. Inherit from this and selectively override to add a data provider. It also provides an in-memory
GeoStorecaching framework which data providers may opt in to.
By using the Esri Terraformer library's
GeoStore component, the application is able to support spatial caching and indexing for data providers. Terraformer also provides outputting in geoJSON by specifying
Note: This project is very much a proof of concept on how to implement the ArcGIS REST API. Another good example can be found in Koop.
- Clone the repo and run
npm updatein the repo folder
- Run the node server with
- Browse to http://localhost:1337
Sample Data Providers
The Citybikes sample data provider makes use of the awesome API at CityBik.es providing bike share data (almost) globally. This sample Data Provider adapts the data into Geoservices format output. The root REST endpoint for the CityBikes data provider can be found live here (this is where you might point ArcCatalog): http://geonode.geeknixta.com/citybikes/rest/services
Making use of the GeoHub repo, this sample provider allows a client to request geoJSON files from either a GitHub repository (example) or from a GitHub gist (example). This sample uses the
dataproviderbase GeoStore cache framework. For more details, see the GeoHub Plugin Readme.
- Only a limited subset of the Geoservices REST Specification is implemented.
- Only spatial references 4326 and 102100 are supported.
- The application will convert from 4326 to 102100 only.
- Queries only work against the layer end point.
Query (Feature Service)is declared as a capability but not yet implemented.
- HTML Browsing is not available for Query endpoints. All queries return JSON.
- Only a subset of
Query (Feature Service\Layer)is implemented:
outSR(4326 and 102100 only)
- Authentication and tokenization is not implemented. All services are considered public.
- ArcGIS REST Specification
- Terraformer by Esri
- node.js documentation
- express.js documentation
- CityBikes API
- geoJSON Specification
Find a bug or want to request a new feature? Please let us know by submitting an Issue.
Anyone and everyone is welcome to contribute.
Copyright 2013 Esri
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
A copy of the license is available in the repository's license.txt file.