Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
ags-stream
Advanced tools
Readme
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.
npm install ags-stream
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:
Option | Description | Default |
---|---|---|
chunkSize | The number of features to fetch per request to the AGS instance | 50 |
where | The where clause for querying the service layer | '1=1' (all features) |
outSR | The srid for the returned geometry | 4326 (lat, lng) |
qs | An object of query strings to append to the url. These will be url encoded automatically. | null |
FAQs
Stream features from an ArcGIS Server instance
The npm package ags-stream receives a total of 4 weekly downloads. As such, ags-stream popularity was classified as not popular.
We found that ags-stream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.