Package com.esri.gpt.framework.geometry

Examples of com.esri.gpt.framework.geometry.Envelope


* Sets the user selected envelope.
* @param envelope the new envelope
*/
public void setSelectedEnvelope(Envelope envelope) {
  _selectedEnvelope = envelope;
  if (_selectedEnvelope == null) _selectedEnvelope = new Envelope();
}
View Full Code Here


* Gets the visible envelope (can be projected).
* @return the visible envelope (never null)
*/
public Envelope getVisibleEnvelope() {
  if(_visibleEnvelope == null) {
    this.setVisibleEnvelope(new Envelope());
  }
  return _visibleEnvelope;
}
View Full Code Here

* Sets the visible envelope (can be projected).
* @param envelope the visible envelope
*/
public void setVisibleEnvelope(Envelope envelope) {
  _visibleEnvelope = envelope;
  if (_visibleEnvelope == null) _visibleEnvelope = new Envelope();
}
View Full Code Here

/**
* Reset <b>this</b> object to default.
*/
public void reset() {
  this.setSelectedEnvelope(new Envelope());
  this.setSelectedBounds(OptionsBounds.anywhere.name());
  this.setVisibleEnvelope(new Envelope());
}
View Full Code Here

   
    this.dcatSchemas = ApplicationContext.getInstance().getConfiguration().getCatalogConfiguration().getDcatSchemas();
    LOGGER.info("Beginning processing " +numberOfHits+ " DCAT records...");
    for (int i = 0; i < records.size(); i++) {
      IFeedRecord record = records.get(i);
      Envelope envelope = record.getEnvelope();
      printRecord(record, envelope, i < records.size() - 1);
     
      if ((++counter)%1000==0) {
        LOGGER.info("Processed "+counter+"/" +numberOfHits+ " DCAT records ("+(100*counter)/numberOfHits+"%)");
      }
View Full Code Here

public SearchParameterMap getParams() {
  SearchParameterMap map = new SearchParameterMap();
  map.put(SaveParams.selectedBoundOption.name(),
      map.new Value(this.getSelectedBounds()));
 
  Envelope envelope = this.getSelectedEnvelope();
  map.put(SaveParams.maxX.name(), map.new Value(String.valueOf(envelope.getMaxX())));
  map.put(SaveParams.maxY.name(), map.new Value(String.valueOf(envelope.getMaxY())));
  map.put(SaveParams.minX.name(), map.new Value(String.valueOf(envelope.getMinX())));
  map.put(SaveParams.minY.name(), map.new Value(String.valueOf(envelope.getMinY())));
 
  envelope = this.getVisibleEnvelope();
  map.put("visible.minx", map.new Value(String.valueOf(envelope.getMinX())));
  map.put("visible.miny", map.new Value(String.valueOf(envelope.getMinY())));
  map.put("visible.maxx", map.new Value(String.valueOf(envelope.getMaxX())));
  map.put("visible.maxy", map.new Value(String.valueOf(envelope.getMaxY())));
  map.put("visible.wkid", map.new Value(String.valueOf(envelope.getWkid())));
  return map;
}
View Full Code Here

public void setParams(SearchParameterMap parameterMap) {
 
  String tmp = parameterMap.get(SaveParams.selectedBoundOption.name()).getParamValue();
  this.setSelectedBounds(tmp);

  Envelope envelope = new Envelope();
  try {   
    tmp = parameterMap.get(SaveParams.maxX.name()).getParamValue();
    envelope.setMaxX(tmp);
    tmp = parameterMap.get(SaveParams.maxY.name()).getParamValue();
    envelope.setMaxY(tmp);
    tmp = parameterMap.get(SaveParams.minX.name()).getParamValue();
    envelope.setMinX(tmp);
    tmp = parameterMap.get(SaveParams.minY.name()).getParamValue();
    envelope.setMinY(tmp);
  } catch (NullPointerException e) {
    envelope = new Envelope();
    LOG.log(Level.WARNING, "Could not get envelope parameters " +
        "in Spatial Search Filter defaulting to" + envelope.toString(),e);
  }
  if (envelope.isEmpty()) envelope = new Envelope();
  this.setSelectedEnvelope(envelope);
 
  envelope = new Envelope();
  try {
    envelope.setMinX(parameterMap.get("visible.minx").getParamValue());
    envelope.setMinY(parameterMap.get("visible.miny").getParamValue());
    envelope.setMaxX(parameterMap.get("visible.maxx").getParamValue());
    envelope.setMaxY(parameterMap.get("visible.maxy").getParamValue());
    envelope.setWkid(parameterMap.get("visible.wkid").getParamValue());
  } catch (NullPointerException e) {
    envelope = this.getSelectedEnvelope().clone();
  }
  if (envelope.isEmpty()) envelope = this.getSelectedEnvelope().clone();
  this.setVisibleEnvelope(envelope);
    
}
View Full Code Here

                app.append("dc:language", ii.getCulture());
                app.append("dc:type", ii.getTypeKeywords());
                app.append("dc:type", ii.getTags());
                app.append("dc:subject", ii.getType());
                if (ii.getExtent()!=null && ii.getExtent().isValid()) {
                  Envelope e = ii.getExtent();
                  document.append("<ows:WGS84BoundingBox>");
                  document.append("<ows:LowerCorner>");
                  document.append(Double.toString(e.getMinX())).append(" ").append(Double.toString(e.getMinY()));
                  document.append("</ows:LowerCorner>");
                  document.append("<ows:UpperCorner>");
                  document.append(Double.toString(e.getMaxX())).append(" ").append(Double.toString(e.getMaxY()));
                  document.append("</ows:UpperCorner>");
                  document.append("</ows:WGS84BoundingBox>");
                }

                document.append(endDcTemplate);

                return document.toString();
              } catch (Exception e) {
                throw new IOException("Error occured while retrieving metadata, cause : " + e.getMessage());
              }
            }
          };
          resources.add(publishable);
        }
View Full Code Here

    SearchCriteria gptSearchCriteria) {
 
  CswSearchCriteria cswClientCriteria = new CswSearchCriteria();
  cswClientCriteria.setSearchText(
      gptSearchCriteria.getSearchFilterKeyword().getSearchText());
  Envelope gptEnvelope =
    gptSearchCriteria.getSearchFilterSpatial().getEnvelope();
  double maxX = 180;
  double maxY = 90;
  double minX = -180;
  double minY = -90;
  if(gptEnvelope != null && !gptEnvelope.isEmpty() &&
      !gptSearchCriteria.getSearchFilterSpatial().getSelectedBounds().equals(
          ISearchFilterSpatialObj.OptionsBounds.anywhere.toString())) {
    if(!gptEnvelope.isValid()) {
      gptEnvelope.setMaxX(maxX);
      gptEnvelope.setMinX(minX);
      gptEnvelope.setMaxY(maxY);
      gptEnvelope.setMinY(minY);
    }
    if(gptEnvelope.getMinX() < minX || gptEnvelope.getMinX() > maxX) {
      gptEnvelope.setMinX(minX);
    }
    if(gptEnvelope.getMaxX() < minX || gptEnvelope.getMaxX() > maxX) {
      gptEnvelope.setMaxX(maxX);
    }
    if(gptEnvelope.getMaxY() < minY || gptEnvelope.getMaxY() > maxY) {
      gptEnvelope.setMaxY(maxY);
    }
    if(gptEnvelope.getMinY() < minY || gptEnvelope.getMinY() > maxY) {
      gptEnvelope.setMinY(minY);
    }
    cswClientCriteria.setEnvelope(new com.esri.gpt.server.csw.client.Envelope(
      gptEnvelope.getMinX(), gptEnvelope.getMinY(),
      gptEnvelope.getMaxX(), gptEnvelope.getMaxY()));
   
  }
  //Work around reset of pagecursor if there are no totalRecordCounts
  int tmp = gptSearchCriteria.getSearchFilterPageCursor().getTotalPageCount();
 
View Full Code Here

          // it has to be at least either singleFusedMapCache or serviceType...
          if (singleFusedMapCache.length() != 0 || serviceType.length() != 0) {

            // extract envelope; depending on the service it ight be named "initialExtent" or just "extent"
            Envelope extent = readExtent(strContent, "initialExtent");
            if (extent == null) {
              extent = readExtent(strContent, "extent");
            }

            // prepare final values to create renderer
            final Envelope finalExtent = extent;
            final boolean isImageService = serviceType.startsWith("esriImageService");

            setter.set(new ArcGISRenderer() {

              @Override
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.geometry.Envelope

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.