The title kind of saids it all. I am attempting to export a featurelayer to a shapefile and am not having any luck finding a library which includes this functionality or relevant code to see where to get started here. Is this possible? If so, any ideas on how to accomplish the task?
I currently have made a button to make a featurelayer from a selection as follows:
protected void doActionPerformed(ActionEvent e) { IFeatureSelection featureSelection = getFeatureSelection(); if (!(featureSelection instanceof IFeatureLayer)) { return; } FeatureLayer featureLayer; try { featureLayer = Casting.cast(featureSelection, FeatureLayer.class); Date currentDate = new Date(); SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd hh:mm:ss"); String dateString = dateFormat.format(currentDate); IFeatureLayer selectionLayer = featureLayer.createSelectionLayer(featureLayer.getName() + " " + dateString, true, "", ""); ActiveMapContainer mapContainer = ActiveMapContainer.getInstance(); mapContainer.getMap().addLayer(selectionLayer); } catch (Exception e1) { Log.error("CreateLayerFromSelectionAction.class doActionPerformed(ActionEvent e)", e1); e1.printStackTrace(); }}
أكثر...
I currently have made a button to make a featurelayer from a selection as follows:
protected void doActionPerformed(ActionEvent e) { IFeatureSelection featureSelection = getFeatureSelection(); if (!(featureSelection instanceof IFeatureLayer)) { return; } FeatureLayer featureLayer; try { featureLayer = Casting.cast(featureSelection, FeatureLayer.class); Date currentDate = new Date(); SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd hh:mm:ss"); String dateString = dateFormat.format(currentDate); IFeatureLayer selectionLayer = featureLayer.createSelectionLayer(featureLayer.getName() + " " + dateString, true, "", ""); ActiveMapContainer mapContainer = ActiveMapContainer.getInstance(); mapContainer.getMap().addLayer(selectionLayer); } catch (Exception e1) { Log.error("CreateLayerFromSelectionAction.class doActionPerformed(ActionEvent e)", e1); e1.printStackTrace(); }}
أكثر...