svn-gvsig-desktop / branches / v10 / libraries / libLidar / src / com / dielmo / lidar / LidarHeader.java @ 25423
History | View | Annotate | Download (6.31 KB)
1 |
/* DielmoOpenLiDAR
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2008 DIELMO 3D S.L. (DIELMO) and Infrastructures
|
4 |
* and Transports Department of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
* For more information, contact:
|
22 |
*
|
23 |
* DIELMO 3D S.L.
|
24 |
* Plaza Vicente Andr?s Estell?s 1 Bajo E
|
25 |
* 46950 Xirivella, Valencia
|
26 |
* SPAIN
|
27 |
*
|
28 |
* +34 963137212
|
29 |
* dielmo@dielmo.com
|
30 |
* www.dielmo.com
|
31 |
*
|
32 |
* or
|
33 |
*
|
34 |
* Generalitat Valenciana
|
35 |
* Conselleria d'Infraestructures i Transport
|
36 |
* Av. Blasco Ib??ez, 50
|
37 |
* 46010 VALENCIA
|
38 |
* SPAIN
|
39 |
*
|
40 |
* +34 963862235
|
41 |
* gvsig@gva.es
|
42 |
* www.gvsig.gva.es
|
43 |
*/
|
44 |
|
45 |
/*
|
46 |
* AUTHORS (In addition to DIELMO and CIT):
|
47 |
*
|
48 |
*/
|
49 |
|
50 |
package com.dielmo.lidar; |
51 |
|
52 |
import java.nio.ByteBuffer; |
53 |
|
54 |
|
55 |
/**
|
56 |
* Interface Lidar point
|
57 |
*
|
58 |
* @author Oscar Garcia
|
59 |
*/
|
60 |
public interface LidarHeader{ |
61 |
|
62 |
// max value for an unsigned int variable.
|
63 |
final int UNSIGNED_INT_MAX = (int)(Math.pow(2, 32)-1); |
64 |
// max value for an unsigned short variable.
|
65 |
final int UNSIGNED_SHORT_MAX = (int)(Math.pow(2, 16)-1); |
66 |
|
67 |
public static final int LAS10F0 = 0; |
68 |
public static final int LAS10F1 = 1; |
69 |
public static final int LAS11F0 = 2; |
70 |
public static final int LAS11F1 = 3; |
71 |
public static final int BIN20010712 = 4; |
72 |
public static final int BIN20020715 = 5; |
73 |
public static final int UNEXPECTED= 9999; |
74 |
|
75 |
/**
|
76 |
* Read the header file
|
77 |
*
|
78 |
* @return true if success else return false
|
79 |
*/
|
80 |
public boolean readLidarHeader(); |
81 |
|
82 |
/**
|
83 |
* Write the header file
|
84 |
*
|
85 |
* @return true if success else return false
|
86 |
*/
|
87 |
public boolean writeLidarHeader(ByteBuffer bb); |
88 |
|
89 |
// GET METHODS
|
90 |
/**
|
91 |
* Return Size, in bytes, of the header file
|
92 |
*
|
93 |
* @return header size
|
94 |
*/
|
95 |
public int getHdrSize(); |
96 |
|
97 |
/**
|
98 |
* Return the total number of points records within the file
|
99 |
*
|
100 |
* @return number of points of file
|
101 |
*/
|
102 |
public long getNumPointsRecord(); |
103 |
|
104 |
/**
|
105 |
* Return Number of bytes from the beginning of the file
|
106 |
* to the first point record data.
|
107 |
*
|
108 |
* @return offset to data
|
109 |
*/
|
110 |
public long getOffsetData(); |
111 |
|
112 |
/**
|
113 |
* Return the x scale factor for the scale corresponding X values
|
114 |
* within the point record.
|
115 |
*
|
116 |
* @return X scale
|
117 |
*/
|
118 |
public double getXScale(); |
119 |
|
120 |
/**
|
121 |
* Return the y scale factor for the scale corresponding Y values
|
122 |
* within the point record.
|
123 |
*
|
124 |
* @return Y scale
|
125 |
*/
|
126 |
public double getYScale(); |
127 |
|
128 |
/**
|
129 |
* Return the z scale factor for the scale corresponding Z values
|
130 |
* within the point record.
|
131 |
*
|
132 |
* @return Z scale
|
133 |
*/
|
134 |
public double getZScale(); |
135 |
|
136 |
/**
|
137 |
* Return the x offset used to set the overall offset for the point record
|
138 |
* @return X offset
|
139 |
*/
|
140 |
public double getXOffset(); |
141 |
|
142 |
/**
|
143 |
* Return the y offset used to set the overall offset for the point record
|
144 |
* @return Y offset
|
145 |
*/
|
146 |
public double getYOffset(); |
147 |
|
148 |
/**
|
149 |
* Return the z offset used to set the overall offset for the point record
|
150 |
* @return Z offset
|
151 |
*/
|
152 |
public double getZOffset(); |
153 |
|
154 |
/**
|
155 |
* Return maximum x of coordinate extent of the file.
|
156 |
*
|
157 |
* @return X max
|
158 |
*/
|
159 |
public double getMaxX(); |
160 |
|
161 |
/**
|
162 |
* Return maximum y of coordinate extent of the file.
|
163 |
*
|
164 |
* @return Y max
|
165 |
*/
|
166 |
public double getMaxY(); |
167 |
|
168 |
/**
|
169 |
* Return maximum z of coordinate extent of the file.
|
170 |
*
|
171 |
* @return Z max
|
172 |
*/
|
173 |
public double getMaxZ(); |
174 |
|
175 |
/**
|
176 |
* Return minimum x of coordinate extent of the file.
|
177 |
*
|
178 |
* @return X min
|
179 |
*/
|
180 |
public double getMinX(); |
181 |
|
182 |
/**
|
183 |
* Return minimum y of coordinate extent of the file.
|
184 |
*
|
185 |
* @return Y min
|
186 |
*/
|
187 |
public double getMinY(); |
188 |
|
189 |
/**
|
190 |
* Return minimum z of coordinate extent of the file.
|
191 |
*
|
192 |
* @return Z min
|
193 |
*/
|
194 |
public double getMinZ(); |
195 |
|
196 |
|
197 |
// SET METHODS
|
198 |
|
199 |
/**
|
200 |
* Set size of the header file
|
201 |
*/
|
202 |
public void setHdrSize(int newValue); |
203 |
|
204 |
/**
|
205 |
* Set the total number of points records within the file
|
206 |
*/
|
207 |
public void setNumPointsRecord(long newValue); |
208 |
|
209 |
/**
|
210 |
* Set number of bytes from the beginning of the file
|
211 |
* to the first point record data.
|
212 |
*/
|
213 |
public void setOffsetData(long newValue); |
214 |
|
215 |
/**
|
216 |
* Set the x scale factor for the scale corresponding X values
|
217 |
* within the point record.
|
218 |
*/
|
219 |
public void setXScale(double newValue); |
220 |
|
221 |
/**
|
222 |
* Set the y scale factor for the scale corresponding Y values
|
223 |
* within the point record.
|
224 |
*/
|
225 |
public void setYScale(double newValue); |
226 |
|
227 |
/**
|
228 |
* Set the z scale factor for the scale corresponding Z values
|
229 |
* within the point record.
|
230 |
*/
|
231 |
public void setZScale(double newValue); |
232 |
|
233 |
/**
|
234 |
* Set the x offset used to set the overall offset for the point record
|
235 |
*/
|
236 |
public void setXOffset(double newValue); |
237 |
|
238 |
/**
|
239 |
* Set the y offset used to set the overall offset for the point record
|
240 |
*/
|
241 |
public void setYOffset(double newValue); |
242 |
|
243 |
/**
|
244 |
* Set the z offset used to set the overall offset for the point record
|
245 |
*/
|
246 |
public void setZOffset(double newValue); |
247 |
|
248 |
/**
|
249 |
* Set maximum x of coordinate extent of the file.
|
250 |
*/
|
251 |
public void setMaxX(double newValue); |
252 |
|
253 |
/**
|
254 |
* Set maximum y of coordinate extent of the file.
|
255 |
*/
|
256 |
public void setMaxY(double newValue); |
257 |
|
258 |
/**
|
259 |
* Set maximum z of coordinate extent of the file.
|
260 |
*/
|
261 |
public void setMaxZ(double newValue); |
262 |
|
263 |
/**
|
264 |
* Set minimum x of coordinate extent of the file.
|
265 |
*/
|
266 |
public void setMinX(double newValue); |
267 |
|
268 |
/**
|
269 |
* Set minimum y of coordinate extent of the file.
|
270 |
*/
|
271 |
public void setMinY(double newValue); |
272 |
|
273 |
/**
|
274 |
* Set minimum z of coordinate extent of the file.
|
275 |
*/
|
276 |
public void setMinZ(double newValue); |
277 |
|
278 |
/**
|
279 |
* Return the version type of Lidar Header
|
280 |
*/
|
281 |
public int getVersion(); |
282 |
} |