Package edu.isi.karma.geospatial

Examples of edu.isi.karma.geospatial.WorksheetToFeatureCollection


//          .getTagsContainer().getTag(TagName.Outlier), workspace
//          .getSemanticTypeModelHandler(), workspace.getOntologyManager());
//    }

    OntologyManager om= workspace.getOntologyManager();
    WorksheetToFeatureCollection geo = new WorksheetToFeatureCollection(worksheet, om, selection);//ying
    //WorksheetToFeatureCollections geo = new WorksheetToFeatureCollections(worksheet);
    // Send an error update if no geospatial data found!
    if (geo.hasNoGeospatialData()) {
      return new UpdateContainer(new ErrorUpdate(
          "No geospatial data found in the worksheet!"));
    }

    try {
      //final File file = geo.SaveSpatialData();
      // Transfer the file to a public server
      final String kmlFileName = geo.SaveSpatialDataAndReturnKMLString();//new RandomGUID().toString(); // save this line for using networkLink in GE plugin (see geospatial.js)
      final String zippedSpatialDataPath = geo.getZippedSpatialDataPath();
      final boolean transfer = true;//transferFileToPublicServer(kmlFileName,file); // save this line for using networkLink in GE plugin (see geospatial.js)
      //if (!transfer) { // save this line for using networkLink in GE plugin (see geospatial.js)
      //  logger.error("Published KML file could not be moved to a public server to display on Google Maps!");
      //}
View Full Code Here


  public UpdateContainer doIt(Workspace workspace) throws CommandException {
    Worksheet worksheet = workspace.getWorksheet(worksheetId);
    SuperSelection selection = getSuperSelection(worksheet);

    OntologyManager om= workspace.getOntologyManager();
    WorksheetToFeatureCollection geo = new WorksheetToFeatureCollection(worksheet, om, selection);//ying
   
    // Send an error update if no geospatial data found!
    if (geo.hasNoGeospatialData()) {
      return new UpdateContainer(new ErrorUpdate(
          "No geospatial data found in the worksheet!"));
    }

    try {
     
      geo.SaveSpatialDataAndReturnKMLString();
      final String zippedSpatialDataPath = geo.getZippedSpatialDataPath();

      return new UpdateContainer(new AbstractUpdate() {
        @Override
        public void generateJson(String prefix, PrintWriter pw,
            VWorkspace vWorkspace) {
View Full Code Here

TOP

Related Classes of edu.isi.karma.geospatial.WorksheetToFeatureCollection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.