Project

General

Profile

« Previous | Next » 

Revision 2938

Added by harris over 18 years ago

Some style changes and small changes to the spatial querying system.

View differences:

src/edu/ucsb/nceas/metacat/spatial/SpatialQueryProcessor.java
156 156
        
157 157
        log.warn("----------------------------------------------------------");
158 158
        log.warn("----------------------------------------------------------");
159
        log.warn("-----Spatially Selected Document: "
160
                +(String) _docs.elementAt(i)+"-----");
161
        log.warn(_docMinX+ " "+  _docMinY + " " +_docMaxX+ " " + _docMaxY);
159 162
        log.warn("----------------------------------------------------------");
160 163
        log.warn("----------------------------------------------------------");
161
        log.warn(_docMinX+ " "+  _docMinY + " " +_docMaxX+ " " + _docMaxY);
162 164

  
163 165
        
164 166
        _doc.setDocid((String) _docs.elementAt(i));
......
168 170
        _extents.setYMax(_docMaxY);
169 171
        
170 172
        
171
        if ( _xmax==_xmin &&  _ymax==_ymin ) {
173
        // set it as a point -- if it is one
174
        if ( _xmax==_xmin && _ymax==_ymin ) {
172 175
          _extents.setIsPoint(true);
173 176
        } else {
174 177
          _extents.setIsPoint(false);
175 178
        }
176
        
177
        
178
        
179
                
179 180
        // set the extents
180 181
        _doc.setExtents(_extents);
181 182
        _data.add(_doc);
src/edu/ucsb/nceas/metacat/MetaCatServlet.java
773 773
    /**
774 774
     * handles all spatial queries -- these queries may include any of the 
775 775
     * queries supported by the WFS / WMS standards
776
     
777
     handleSQuery(out, params, response, username, groupnames,
778
                            sess_id);
776
     * 
777
     * handleSQuery(out, params, response, username, groupnames,
778
     *                        sess_id);
779 779
     */
780 780
    private void handleSpatialQuery(PrintWriter out, Hashtable params, 
781 781
                                    HttpServletResponse response,
......
800 800
                      "\nxmin: " + _xmin + "\nymin: " + _ymin);
801 801

  
802 802

  
803
      // is it UTM or lat/long
804 803

  
805
      // issue the query 
804
      // issue the Spatial query 
806 805
      MetacatSpatialDataset _data =  
807 806
        _spatialQuery.queryDatasetByCartesianBounds(_xmin, _ymin, _xmax, _ymax);
808 807

  
808
      // report the number of documents returned:
809
      logMetacat.warn("\nThe number of documents in the BBOX query: " 
810
              + _data.size()+" the doc. list: '" + _data.toTXT().trim()+"'" );
811
      
809 812
      // create an s-query
810
      //DocumentIdQuery.createDocidQueryParams(_data.getDocidList(), params);
811
      //params.put("query", DocumentIdQuery.createDocidQuery(_data.getDocidList()) );
812 813
      String[] queryArray = new String[1];
813 814
      queryArray[0] = DocumentIdQuery.createDocidQuery(_data.getDocidList());
814 815
      params.put("query", queryArray);
815
                      
816
      
817
      // qformat        
816 818
      String[] qformatArray = new String[1];
817 819
      qformatArray[0] = "knp";
818 820
      params.put("qformat", qformatArray);

Also available in: Unified diff