Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ags-stream

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ags-stream

Stream features from an ArcGIS Server instance

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by66.67%
Maintainers
1
Weekly downloads
 
Created
Source

ags-stream

ags-stream creates a readable stream of GeoJSON Features from an ArcGIS Server instance. This can be useful for scraping records from any ArcGIS Server or any other ETL process.

ags-stream is currently used in fulcrum-ags-import to import ArcGIS Server records into Fulcrum and ags-shapefile to export shapefiles from ArcGIS Server instances.

Installation

npm install ags-stream

Usage

var AgsStream = require('ags-stream');
var agsStream = new AgsStream(<service_url>, <options>?)

agsStream.on('data', function (data) {
  // data is an array of GeoJSON features
  data.forEach(function (feature) {
    doWhatever(feature); // Add the feature to you database, write to file, whatever
  });
});

agsStream.on('error', function (error) {
  console.log('Oh boy, this happened: ', error);
});

agsStream.on('end', function () {
  console.log('All done.'); // There is no more data to read.
});

The service_url parameter represents a single layer in an ArcGIS Server map service. It should look something like http://gis-web.co.union.nc.us/arcgis/rest/services/PWGIS_Web/Operational_Layers/MapServer/5.

options is optional and accepts the following:

OptionDescriptionDefault
chunkSizeThe number of features to fetch per request to the AGS instance50
whereThe where clause for querying the service layer'1=1' (all features)
outSRThe srid for the returned geometry4326 (lat, lng)
qsAn object of query strings to append to the url. These will be url encoded automatically.null

Keywords

FAQs

Package last updated on 04 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc