Represents a GeoJSON featurecollection
Exemple #1
0
        /// <summary>
        /// Creates the GeoJSON feature collection from list of <see cref="ArcDeveloper.REST.Core.Interfaces.IFeature"/>.
        /// </summary>
        /// <param name="features">The features.</param>
        /// <returns>A GeoJSON feature collection</returns>
        public static GeoJSONFeatureCollection CreateFeatureCollectionFromList(List <IFeature> features)
        {
            GeoJSONFeatureCollection featCollection = new GeoJSONFeatureCollection();

            foreach (IFeature feat in features)
            {
                featCollection.Features.Add(GeoJSONFeature.CreateFromIFeature(feat));
            }
            return(featCollection);
        }
        public string GetAsGeoJSON(IRecordSet recordset)
        {
            GeoJSONFeatureCollection jsonFeatures = new GeoJSONFeatureCollection();
            ICursor cur = recordset.get_Cursor(false);

            IFeature f = (IFeature)cur.NextRow();
            if (f != null)
            {
                while (f != null)
                {
                    jsonFeatures.Features.Add(GeoJSONFeature.CreateFromIFeature(f));
                    f = (IFeature)cur.NextRow();

                }
            }

            return "{}";
        }
Exemple #3
0
        public string GetAsGeoJSON(IRecordSet recordset)
        {
            GeoJSONFeatureCollection jsonFeatures = new GeoJSONFeatureCollection();
            ICursor cur = recordset.get_Cursor(false);

            IFeature f = (IFeature)cur.NextRow();

            if (f != null)
            {
                while (f != null)
                {
                    jsonFeatures.Features.Add(GeoJSONFeature.CreateFromIFeature(f));
                    f = (IFeature)cur.NextRow();
                }
            }

            return("{}");
        }
 /// <summary>
 /// Creates the GeoJSON feature collection from list of <see cref="ArcDeveloper.REST.Core.Interfaces.IFeature"/>.
 /// </summary>
 /// <param name="features">The features.</param>
 /// <returns>A GeoJSON feature collection</returns>
 public static GeoJSONFeatureCollection CreateFeatureCollectionFromList(List<IFeature> features)
 {
     GeoJSONFeatureCollection featCollection = new GeoJSONFeatureCollection();
     foreach(IFeature feat in features)
     {
         featCollection.Features.Add(GeoJSONFeature.CreateFromIFeature(feat));
     }
      return featCollection;
 }