-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1111 from ngageoint/reader-rewrite
rewrote GeoWaveRasterReaderState
- Loading branch information
Showing
2 changed files
with
71 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 53 additions & 36 deletions
89
...er/src/main/java/mil/nga/giat/geowave/adapter/raster/plugin/GeoWaveRasterReaderState.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,86 @@ | ||
/* | ||
* GeoTools - The Open Source Java GIS Toolkit | ||
* http://geotools.org | ||
* | ||
* (C) 2008, Open Source Geospatial Foundation (OSGeo) | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; | ||
* version 2.1 of the License. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
*/ | ||
|
||
/******************************************************************************* | ||
* Copyright (c) 2013-2017 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Apache License, | ||
* Version 2.0 which accompanies this distribution and is available at | ||
* http://www.apache.org/licenses/LICENSE-2.0.txt | ||
******************************************************************************/ | ||
package mil.nga.giat.geowave.adapter.raster.plugin; | ||
|
||
import org.geotools.geometry.GeneralEnvelope; | ||
|
||
/** | ||
* Holds the state of the reader making it thread safe | ||
* This class allows us to make the GeoWaveRasterReader thread safe by storing | ||
* its state here | ||
*/ | ||
|
||
public class GeoWaveRasterReaderState | ||
{ | ||
private boolean xAxisSwitch = false; | ||
private final String coverageName; | ||
private boolean axisSwap = false; | ||
private GeneralEnvelope requestedEnvelope = null; | ||
private GeneralEnvelope requestEnvelopeTransformed = null; | ||
private GeneralEnvelope requestEnvelopeXformed; | ||
|
||
public GeoWaveRasterReaderState( | ||
final String coverageName ) { | ||
this.coverageName = coverageName; | ||
} | ||
|
||
/** | ||
* @return the coverageName | ||
*/ | ||
public String getCoverageName() { | ||
return coverageName; | ||
} | ||
|
||
public GeneralEnvelope getRequestedEnvelope() { | ||
return requestedEnvelope; | ||
/** | ||
* @return the boolean value of axisSwap | ||
*/ | ||
public boolean isAxisSwapped() { | ||
return axisSwap; | ||
} | ||
|
||
public void setRequestedEnvelope( | ||
final GeneralEnvelope requestedEnvelope ) { | ||
this.requestedEnvelope = requestedEnvelope; | ||
/** | ||
* @param axisSwap | ||
* the boolean value to set | ||
*/ | ||
public void setAxisSwap( | ||
boolean axisSwap ) { | ||
this.axisSwap = axisSwap; | ||
} | ||
|
||
public GeneralEnvelope getRequestEnvelopeTransformed() { | ||
return requestEnvelopeTransformed; | ||
/** | ||
* @return the requestedEnvelope | ||
*/ | ||
public GeneralEnvelope getRequestedEnvelope() { | ||
return requestedEnvelope; | ||
} | ||
|
||
public void setRequestEnvelopeTransformed( | ||
final GeneralEnvelope requestEnvelopeTransformed ) { | ||
this.requestEnvelopeTransformed = requestEnvelopeTransformed; | ||
/** | ||
* @param requestedEnvelope | ||
* the requestedEnvelope to set | ||
*/ | ||
public void setRequestedEnvelope( | ||
GeneralEnvelope requestedEnvelope ) { | ||
this.requestedEnvelope = requestedEnvelope; | ||
} | ||
|
||
public boolean isXAxisSwitch() { | ||
return xAxisSwitch; | ||
/** | ||
* @return the requestEnvelopeXformed | ||
*/ | ||
public GeneralEnvelope getRequestEnvelopeXformed() { | ||
return requestEnvelopeXformed; | ||
} | ||
|
||
public void setXAxisSwitch( | ||
final boolean axisSwitch ) { | ||
xAxisSwitch = axisSwitch; | ||
/** | ||
* @param requestEnvelopeXformed | ||
* the requestEnvelopeXformed to set | ||
*/ | ||
public void setRequestEnvelopeXformed( | ||
GeneralEnvelope requestEnvelopeXformed ) { | ||
this.requestEnvelopeXformed = requestEnvelopeXformed; | ||
} | ||
|
||
} |