Select to view content in your preferred language

ArcGIS API for javascript - how to get records count of zipped shapefile

708
1
Jump to solution
08-26-2020 05:52 AM
MichaelLev
Frequent Contributor

ESRI example code in Create a FeatureLayer from a shapefile adds zipped shapefile into map.

This code uses ArcGIS REST API Generate to create the feature collection, but it is limited and can't create if total recors number is greater than 4000.

So, I want to analyze the zipped shapefile prior to generating features using Generate operation, in order to know the number of records, either total, or better - per layer.

My questions are:

  1. How can I add in this code a query to only get the total number of records (in the input zipped shapefile (in order to know apriory if it is greater than 4000)?
  2. How can I add in this code a query to get the total number of records per layer (I know the layer names, but maybe I could get the number of records per layer also without knowing apriory the layer names)?

I'll appreciate help,

Michael

0 Kudos
1 Solution

Accepted Solutions
MichaelLev
Frequent Contributor

I assume it's impossible, becaue zip file could be analysed only after esri had read it, and from WAB (Developer Edition) Web Application, if number of total records > 4000, esri can't read it, since esri had limited the "generate" service to limit of 4000 records.

Michael 

View solution in original post

0 Kudos
1 Reply
MichaelLev
Frequent Contributor

I assume it's impossible, becaue zip file could be analysed only after esri had read it, and from WAB (Developer Edition) Web Application, if number of total records > 4000, esri can't read it, since esri had limited the "generate" service to limit of 4000 records.

Michael 

0 Kudos