svn-gvsig-desktop / branches / v10 / libraries / libDielmoOpenLidar / src / com / dielmo / lidar / LidarHeader.java @ 26395
History | View | Annotate | Download (6.39 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 LAS12F0 = 4; |
72 |
public static final int LAS12F1 = 5; |
73 |
public static final int LAS12F2 = 6; |
74 |
public static final int LAS12F3 = 7; |
75 |
public static final int BIN20010712 = 8; |
76 |
public static final int BIN20020715 = 9; |
77 |
public static final int UNEXPECTED= 9999; |
78 |
|
79 |
/**
|
80 |
* Read the header file
|
81 |
*
|
82 |
* @return true if success else return false
|
83 |
*/
|
84 |
public boolean readLidarHeader(); |
85 |
|
86 |
/**
|
87 |
* Write the header file
|
88 |
*
|
89 |
* @return true if success else return false
|
90 |
*/
|
91 |
public boolean writeLidarHeader(ByteBuffer bb); |
92 |
|
93 |
// GET METHODS
|
94 |
/**
|
95 |
* Return Size, in bytes, of the header file
|
96 |
*
|
97 |
* @return header size
|
98 |
*/
|
99 |
public int getHdrSize(); |
100 |
|
101 |
/**
|
102 |
* Return the total number of points records within the file
|
103 |
*
|
104 |
* @return number of points of file
|
105 |
*/
|
106 |
public long getNumPointsRecord(); |
107 |
|
108 |
/**
|
109 |
* Return Number of bytes from the beginning of the file
|
110 |
* to the first point record data.
|
111 |
*
|
112 |
* @return offset to data
|
113 |
*/
|
114 |
public long getOffsetData(); |
115 |
|
116 |
/**
|
117 |
* Return the x scale factor for the scale corresponding X values
|
118 |
* within the point record.
|
119 |
*
|
120 |
* @return X scale
|
121 |
*/
|
122 |
public double getXScale(); |
123 |
|
124 |
/**
|
125 |
* Return the y scale factor for the scale corresponding Y values
|
126 |
* within the point record.
|
127 |
*
|
128 |
* @return Y scale
|
129 |
*/
|
130 |
public double getYScale(); |
131 |
|
132 |
/**
|
133 |
* Return the z scale factor for the scale corresponding Z values
|
134 |
* within the point record.
|
135 |
*
|
136 |
* @return Z scale
|
137 |
*/
|
138 |
public double getZScale(); |
139 |
|
140 |
/**
|
141 |
* Return the x offset used to set the overall offset for the point record
|
142 |
* @return X offset
|
143 |
*/
|
144 |
public double getXOffset(); |
145 |
|
146 |
/**
|
147 |
* Return the y offset used to set the overall offset for the point record
|
148 |
* @return Y offset
|
149 |
*/
|
150 |
public double getYOffset(); |
151 |
|
152 |
/**
|
153 |
* Return the z offset used to set the overall offset for the point record
|
154 |
* @return Z offset
|
155 |
*/
|
156 |
public double getZOffset(); |
157 |
|
158 |
/**
|
159 |
* Return maximum x of coordinate extent of the file.
|
160 |
*
|
161 |
* @return X max
|
162 |
*/
|
163 |
public double getMaxX(); |
164 |
|
165 |
/**
|
166 |
* Return maximum y of coordinate extent of the file.
|
167 |
*
|
168 |
* @return Y max
|
169 |
*/
|
170 |
public double getMaxY(); |
171 |
|
172 |
/**
|
173 |
* Return maximum z of coordinate extent of the file.
|
174 |
*
|
175 |
* @return Z max
|
176 |
*/
|
177 |
public double getMaxZ(); |
178 |
|
179 |
/**
|
180 |
* Return minimum x of coordinate extent of the file.
|
181 |
*
|
182 |
* @return X min
|
183 |
*/
|
184 |
public double getMinX(); |
185 |
|
186 |
/**
|
187 |
* Return minimum y of coordinate extent of the file.
|
188 |
*
|
189 |
* @return Y min
|
190 |
*/
|
191 |
public double getMinY(); |
192 |
|
193 |
/**
|
194 |
* Return minimum z of coordinate extent of the file.
|
195 |
*
|
196 |
* @return Z min
|
197 |
*/
|
198 |
public double getMinZ(); |
199 |
|
200 |
|
201 |
// SET METHODS
|
202 |
|
203 |
/**
|
204 |
* Set size of the header file
|
205 |
*/
|
206 |
public void setHdrSize(int newValue); |
207 |
|
208 |
/**
|
209 |
* Set the total number of points records within the file
|
210 |
*/
|
211 |
public void setNumPointsRecord(long newValue); |
212 |
|
213 |
/**
|
214 |
* Set number of bytes from the beginning of the file
|
215 |
* to the first point record data.
|
216 |
*/
|
217 |
public void setOffsetData(long newValue); |
218 |
|
219 |
/**
|
220 |
* Set the x scale factor for the scale corresponding X values
|
221 |
* within the point record.
|
222 |
*/
|
223 |
public void setXScale(double newValue); |
224 |
|
225 |
/**
|
226 |
* Set the y scale factor for the scale corresponding Y values
|
227 |
* within the point record.
|
228 |
*/
|
229 |
public void setYScale(double newValue); |
230 |
|
231 |
/**
|
232 |
* Set the z scale factor for the scale corresponding Z values
|
233 |
* within the point record.
|
234 |
*/
|
235 |
public void setZScale(double newValue); |
236 |
|
237 |
/**
|
238 |
* Set the x offset used to set the overall offset for the point record
|
239 |
*/
|
240 |
public void setXOffset(double newValue); |
241 |
|
242 |
/**
|
243 |
* Set the y offset used to set the overall offset for the point record
|
244 |
*/
|
245 |
public void setYOffset(double newValue); |
246 |
|
247 |
/**
|
248 |
* Set the z offset used to set the overall offset for the point record
|
249 |
*/
|
250 |
public void setZOffset(double newValue); |
251 |
|
252 |
/**
|
253 |
* Set maximum x of coordinate extent of the file.
|
254 |
*/
|
255 |
public void setMaxX(double newValue); |
256 |
|
257 |
/**
|
258 |
* Set maximum y of coordinate extent of the file.
|
259 |
*/
|
260 |
public void setMaxY(double newValue); |
261 |
|
262 |
/**
|
263 |
* Set maximum z of coordinate extent of the file.
|
264 |
*/
|
265 |
public void setMaxZ(double newValue); |
266 |
|
267 |
/**
|
268 |
* Set minimum x of coordinate extent of the file.
|
269 |
*/
|
270 |
public void setMinX(double newValue); |
271 |
|
272 |
/**
|
273 |
* Set minimum y of coordinate extent of the file.
|
274 |
*/
|
275 |
public void setMinY(double newValue); |
276 |
|
277 |
/**
|
278 |
* Set minimum z of coordinate extent of the file.
|
279 |
*/
|
280 |
public void setMinZ(double newValue); |
281 |
|
282 |
/**
|
283 |
* Return the version type of Lidar Header
|
284 |
*/
|
285 |
public int getVersion(); |
286 |
|
287 |
} |