001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2003-2006, Geotools Project Managment Committee (PMC)
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or (at your option) any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: */
016: package org.geotools.data.vpf.io;
017:
018: import org.geotools.data.vpf.ifc.VPFHeader;
019:
020: /**
021: * SpatialIndexHeader.java Created: Tue Mar 11 23:42:48 2003
022: *
023: * @author <a href="mailto:kobit@users.sourceforge.net">Artur Hefczyc</a>
024: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/unsupported/vpf/src/main/java/org/geotools/data/vpf/io/SpatialIndexHeader.java $
025: * @version $Id: SpatialIndexHeader.java 22482 2006-10-31 02:58:00Z desruisseaux $
026: */
027: public class SpatialIndexHeader implements VPFHeader {
028: /**
029: * Variable constant <code>SPATIAL_INDEX_HEADER_LENGTH</code> keeps value
030: * of
031: */
032: public static final int SPATIAL_INDEX_HEADER_LENGTH = 24;
033:
034: /**
035: * Describe variable <code>numPrims</code> here.
036: *
037: */
038: private int numPrims = 0;
039:
040: /**
041: * Describe variable <code>xmin</code> here.
042: *
043: */
044: private float xmin = 0;
045:
046: /**
047: * Describe variable <code>ymin</code> here.
048: *
049: */
050: private float ymin = 0;
051:
052: /**
053: * Describe variable <code>xmax</code> here.
054: *
055: */
056: private float xmax = 0;
057:
058: /**
059: * Describe variable <code>ymax</code> here.
060: *
061: */
062: private float ymax = 0;
063:
064: /**
065: * Describe variable <code>numNodes</code> here.
066: *
067: */
068: private int numNodes = 0;
069:
070: /**
071: * Creates a new <code>SpatialIndexHeader</code> instance.
072: *
073: * @param numPrims an <code>int</code> value
074: * @param xmin a <code>float</code> value
075: * @param ymin a <code>float</code> value
076: * @param xmax a <code>float</code> value
077: * @param ymax a <code>float</code> value
078: * @param numNodes an <code>int</code> value
079: */
080: public SpatialIndexHeader(int numPrims, float xmin, float ymin,
081: float xmax, float ymax, int numNodes) {
082: this .numPrims = numPrims;
083: this .xmin = xmin;
084: this .ymin = ymin;
085: this .xmax = xmax;
086: this .ymax = ymax;
087: }
088:
089: // SpatialIndexHeader constructor
090:
091: /**
092: * Returns particular <code>VPFHeader</code> length.
093: *
094: * @return an <code>int</code> value of header length.
095: */
096: public int getLength() {
097: return SPATIAL_INDEX_HEADER_LENGTH;
098: }
099:
100: /**
101: * Method <code><code>getRecordSize</code></code> is used to return size in
102: * bytes of records stored in this table. If table keeps variable length
103: * records <code>-1</code> should be returned.
104: *
105: * @return an <code><code>int</code></code> value
106: */
107: public int getRecordSize() {
108: return -1;
109: }
110:
111: /**
112: * Gets the value of numPrims
113: *
114: * @return the value of numPrims
115: */
116: public int getNumPrims() {
117: return this .numPrims;
118: }
119:
120: // /**
121: // * Sets the value of numPrims
122: // *
123: // * @param argNumPrims Value to assign to this.numPrims
124: // */
125: // public void setNumPrims(int argNumPrims)
126: // {
127: // this.numPrims = argNumPrims;
128: // }
129:
130: /**
131: * Gets the value of xmin
132: *
133: * @return the value of xmin
134: */
135: public float getXmin() {
136: return this .xmin;
137: }
138:
139: // /**
140: // * Sets the value of xmin
141: // *
142: // * @param argXmin Value to assign to this.xmin
143: // */
144: // public void setXmin(float argXmin)
145: // {
146: // this.xmin = argXmin;
147: // }
148:
149: /**
150: * Gets the value of ymin
151: *
152: * @return the value of ymin
153: */
154: public float getYmin() {
155: return this .ymin;
156: }
157:
158: // /**
159: // * Sets the value of ymin
160: // *
161: // * @param argYmin Value to assign to this.ymin
162: // */
163: // public void setYmin(float argYmin)
164: // {
165: //this.ymin = argYmin;
166: // }
167:
168: /**
169: * Gets the value of xmax
170: *
171: * @return the value of xmax
172: */
173: public float getXmax() {
174: return this .xmax;
175: }
176:
177: // /**
178: // * Sets the value of xmax
179: // *
180: // * @param argXmax Value to assign to this.xmax
181: // */
182: // public void setXmax(float argXmax)
183: // {
184: //this.xmax = argXmax;
185: // }
186:
187: /**
188: * Gets the value of ymax
189: *
190: * @return the value of ymax
191: */
192: public float getYmax() {
193: return this .ymax;
194: }
195:
196: // /**
197: // * Sets the value of ymax
198: // *
199: // * @param argYmax Value to assign to this.ymax
200: // */
201: // public void setYmax(float argYmax)
202: // {
203: //this.ymax = argYmax;
204: // }
205:
206: /**
207: * Gets the value of numNodes
208: *
209: * @return the value of numNodes
210: */
211: public int getNumNodes() {
212: return this .numNodes;
213: }
214:
215: // /**
216: // * Sets the value of numNodes
217: // *
218: // * @param argNumNodes Value to assign to this.numNodes
219: // */
220: // public void setNumNodes(int argNumNodes)
221: // {
222: //this.numNodes = argNumNodes;
223: // }
224: }
|