Arcgis feature server vs map server?

970 views
Skip to first unread message

ralphm...@gmail.com

unread,
May 31, 2018, 9:49:51 AM5/31/18
to cesium-dev
Hello I wanted to ask a question about how I can include an ArcGis feature service. I'm trying to use a certain layer from the services.arcgis.com. But the feature server content are not working compared to map servers? What should I do differently to include the desired layer that isnt a map server but feature server.

Gabby Getz

unread,
Jun 4, 2018, 10:08:57 AM6/4/18
to cesium-dev
Hi there,

I'm assuming the ArcGIS service is returning a WFS layer, correct? In that case, it's not returning an imagery layer, which is what ArcGisMapServerImageryProvider and other imagery providers show. Currently, I don't think there is a way to directly load a WFS layer, but there is an available Cesium plugin to load WFS data from a community member.

Thanks,
Gabby

Kevin Ring

unread,
Jun 4, 2018, 8:17:17 PM6/4/18
to cesiu...@googlegroups.com
TerriaJS, which uses Cesium for 3D visualization (and also Leaflet for 2D), has support for WFS and ArcGIS FeatureServers. WFS pretty much works just by constructing a WFS URL to ask the server for GeoJSON. You can find the code here:

ArcGIS FeatureServers are a little more involved. The code is here:

But the most important part is the conversion of Esri REST features to GeoJSON, which is here:

The usual caveats with loading large GeoJSON datasets (i.e. it may be slow and crash your browser).

Kevin

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Left Gully

unread,
Jun 5, 2018, 8:58:58 PM6/5/18
to cesium-dev
Kevin, that sounds awesome! I will take a look at the code, when i have time at a desktop, but can you tell me if there is any support built in Terriajs for reprojecting ArcGIS services from projected CRS to WGS84? Our regional and city GIS services are all in state plane feet, and so far useless to me in Cesium. Thanks! -Jon

Kevin Ring

unread,
Jun 5, 2018, 9:20:27 PM6/5/18
to cesiu...@googlegroups.com
Hi, it depends exactly what you mean.

For GeoJSON, TerriaJS will reproject vector data in almost any projection to WGS84 by using proj4. There are hooks in GeoJsonDataSource to do the same in pure Cesium if necesary.  For Esri FeatureServers, TerriaJS will turn any Esri "wkid" to "urn:ogc:def:crs:EPSG::<wkid>" and then try to reproject that using proj4. 

For raster data, ArcGIS MapServers can usually do the reprojection themselves via the "export" service. However, if a pre-cached tile layer is using an unsupported projection, TerriaJS and Cesium can't use it. In theory they could still use the (slower) export service instead, if the server supports it (but it may not). You can force it to try using export instead of the pre-cached tiles by passing false for "usePreCachedTilesIfAvailable" to the ArcGisMapServerImageryProvider constructor (TerriaJS will do this automatically).

Kevin


On Wed, Jun 6, 2018 at 10:58 AM, Left Gully <lft...@gmail.com> wrote:
Kevin, that sounds awesome! I will take a look at the code, when i have time at a desktop, but can you tell me if there is any support built in Terriajs for reprojecting ArcGIS services from projected CRS to WGS84? Our regional and city GIS services are all in state plane feet, and so far useless to me in Cesium. Thanks! -Jon
--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages