Project

General

Profile

« Previous | Next » 

Revision 2935

Added by harris over 18 years ago

Fixed the way the text query was written.

View differences:

src/edu/ucsb/nceas/metacat/spatial/PersistentMetacatSpatialDataset.java
65 65
public class PersistentMetacatSpatialDataset {
66 66
  
67 67
  private String textQueryAsciiFile = "/tmp/mso_metacat_textquery.ascii";
68
  private String metacatTextQueryShapeFile = "/tmp/mso_metacat_textquery.shp";
68 69
  private String metacatSpatialCacheAsciiFile = "/tmp/mso_metacat_cache.ascii";
69 70
  private String metacatSpatialCacheShapeFile = "/tmp/mso_metacat_cache.shp";
70 71
  
......
91 92
     try{
92 93
      Process p = Runtime.getRuntime().exec(command);
93 94
     }
94
     catch(IOException ioe){}
95
     catch(IOException ioe){
96
         log.error("ERROR - writing the shapefile at: " + 
97
                 metacatSpatialCacheAsciiFile+" "+metacatSpatialCacheShapeFile);
98
         ioe.printStackTrace(); 
99
     }
95 100

  
96 101
  } catch (FileNotFoundException fnfe) {
97 102
    log.fatal("ERROR: could not find the file ");
......
114 119
    out.println("#HEADER x y z segid");
115 120

  
116 121
    out.println( dataset.getExtentsDataAsAscii());
117

  
122
    
118 123
    out.close();
124
    
125
    // make the shapefile 
126
     String command = "metacat_shapefile "+textQueryAsciiFile+" "+metacatTextQueryShapeFile;
127
     try{
128
      Process p = Runtime.getRuntime().exec(command);
129
     }
130
     catch(IOException ioe){
131
         log.error("ERROR - writing the shapefile at: " + 
132
                 metacatSpatialCacheAsciiFile+" "+metacatSpatialCacheShapeFile);
133
         ioe.printStackTrace();
134
     }
119 135

  
136
    
120 137
  } catch (FileNotFoundException fnfe) {
121 138
    log.fatal("ERROR: could not find the file ");
122 139
    fnfe.printStackTrace();

Also available in: Unified diff