I know this question has been asked a few time on here, but I don't seem to be getting a clear answer.
We have serveral WFS & WMS services published on our ArcServer machines and want users to be able to extract them.
We want users to select parcels with a tool then allow them to export to shpfile or kmz with a simple UI in a WebApp.
This is what I've tried so far.
1. Geoprocessing service example: Clip And Ship—ArcMap | ArcGIS Desktop - Not sure if this works with WFS? I can't get this to really work. Is this meant for what I'm trying to accomplish ?
2.
Add "Export to SHP" or "Export to GDB" option to WAB Select Widget -
The following work-around was provided by Esri development:
This process is not ideal for us. We would also like to have KML.
These are the Tools I have available:
FME
ArcServer
Portal/Enterprise
Is there a way I can publish a GP tool on our servers with the FME module. To accomplish this.
Thanks !
I've gotten this to work with geojson files. I have added a button that exports drawn shapes (generated in Robert's Modify Widget, which uses DrawBox to make them).
I did not get it to work with kml/z and I found the same thing you did about shapefiles. Export to them is unsupported, probably because to import them they have to be zipped, so they didnt want to figure the inverse of that out.
_onExportDrawnArea: function(){
//get graphics layer
//export graphics layer as geojson
require(["jimu/BaseFeatureAction", "jimu/exportUtils", "jimu/FeatureActionManager", "esri/tasks/FeatureSet"], lang.hitch(this, function( BaseFeatureAction, exportUtils, FeatureActionManager, FeatureSet) {
var graphicFeatures= [];
var graphicsLayerGraphics = this.graphicsLayer.graphics;
for (var f = 0; f < graphicsLayerGraphics.length; f++)
{
//console.log("graphicsLayerGraphics.length"+graphicsLayerGraphics.length);
//console.log(graphicsLayerGraphics);
graphicFeatures.push(graphicsLayerGraphics[f]);
};
var drawnShapeData = new FeatureSet();
drawnShapeData.features = graphicFeatures;
var ds = exportUtils.createDataSource({
type: exportUtils.TYPE_FEATURESET,
filename: 'features',
data: drawnShapeData
});
ds.setFormat(exportUtils.FORMAT_GEOJSON);
ds.download();
}));
},