gvsig-raster / org.gvsig.raster.gdal / trunk / org.gvsig.raster.gdal / org.gvsig.raster.gdal.jni / src / main / java / org / gvsig / jogr / OGRFeature.java @ 2453
History | View | Annotate | Download (10.1 KB)
1 |
/**********************************************************************
|
---|---|
2 |
* $Id: OGRFeature.java 7765 2006-10-03 07:05:18Z nacho $
|
3 |
*
|
4 |
* Name: OGRFeature.java
|
5 |
* Project: JGDAL. Interface java to gdal (Frank Warmerdam).
|
6 |
* Purpose:
|
7 |
* Author: Nacho Brodin, brodin_ign@gva.es
|
8 |
*
|
9 |
**********************************************************************/
|
10 |
/*Copyright (C) 2004 Nacho Brodin <brodin_ign@gva.es>
|
11 |
|
12 |
This program is free software; you can redistribute it and/or
|
13 |
modify it under the terms of the GNU General Public License
|
14 |
as published by the Free Software Foundation; either version 2
|
15 |
of the License, or (at your option) any later version.
|
16 |
|
17 |
This program is distributed in the hope that it will be useful,
|
18 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
GNU General Public License for more details.
|
21 |
|
22 |
You should have received a copy of the GNU General Public License
|
23 |
along with this program; if not, write to the Free Software
|
24 |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
25 |
*/
|
26 |
|
27 |
package org.gvsig.jogr; |
28 |
|
29 |
|
30 |
/**
|
31 |
*
|
32 |
* @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es
|
33 |
* @version 0.0
|
34 |
* @link http://www.gvsig.gva.es
|
35 |
*/
|
36 |
|
37 |
public class OGRFeature extends JNIBase{ |
38 |
|
39 |
private native void FreeOGRFeatureNat(long cPtr); |
40 |
private native void dumpReadableNat(long cPtr, String file); |
41 |
private native long getDefnRefNat(long cPtr); |
42 |
private native int setGeometryDirectlyNat( long cPtr, OGRGeometry geom );//Excepciones |
43 |
private native int setGeometryNat( long cPtr, OGRGeometry geom );//Excepciones |
44 |
private native long getGeometryRefNat(long cPtr); |
45 |
private native long stealGeometryNat(long cPtr); |
46 |
private native long cloneFeatureNat(long cPtr);//* |
47 |
private native int equalNat( long cPtr, OGRFeature poFeature ); |
48 |
private native long getFieldDefnRefNat(long cPtr, int iField ); |
49 |
private native int getFieldIndexNat( long cPtr, String pszName); |
50 |
private native int isFieldSetNat( long cPtr, int iField ); |
51 |
private native void unsetFieldNat( long cPtr, int iField ); |
52 |
private native long getRawFieldRefNat( long cPtr, int i ); |
53 |
private native int getFieldAsIntegerNat( long cPtr, int i ); |
54 |
private native double getFieldAsDoubleNat( long cPtr, int i ); |
55 |
private native String getFieldAsStringNat( long cPtr, int i ); |
56 |
private native int getFieldAsIntegerListNat( long cPtr, int i, int pnCount ); |
57 |
private native double getFieldAsDoubleListNat( long cPtr, int i, int pnCount ); |
58 |
private native String[] getFieldAsStringListNat( long cPtr, int i ); |
59 |
private native int getFieldAsIntegerNat( long cPtr, String pszFName ); |
60 |
private native double getFieldAsDoubleNat( long cPtr, String pszFName ); |
61 |
private native String getFieldAsStringNat( long cPtr, String pszFName ); |
62 |
private native int getFieldAsIntegerListNat( long cPtr, String pszFName, int pnCount ); |
63 |
private native double getFieldAsDoubleListNat( long cPtr, String pszFName, int pnCount ); |
64 |
private native String[] getFieldAsStringListNat( long cPtr, String pszFName ); |
65 |
private native void setFieldNat( long cPtr, int i, int nValue ); |
66 |
private native void setFieldNat( long cPtr, int i, double dfValue ); |
67 |
private native void setFieldNat( long cPtr, int i, String pszValue ); |
68 |
private native void setFieldNat( long cPtr, int i, int nCount, int panValues ); |
69 |
private native void setFieldNat( long cPtr, int i, int nCount, double padfValues ); |
70 |
private native void setFieldNat( long cPtr, int i, String[] papszValues ); |
71 |
private native void setFieldNat( long cPtr, int i, OGRField puValue ); |
72 |
private native void setFieldNat( long cPtr, String pszFName, int nValue ); |
73 |
private native void setFieldNat( long cPtr, String pszFName, double dfValue ); |
74 |
private native void setFieldNat( long cPtr, String pszFName, String pszValue); |
75 |
private native void setFieldNat( long cPtr, String pszFName, int nCount, int panValues ); |
76 |
private native void setFieldNat( long cPtr, String pszFName, int nCount, double padfValues ); |
77 |
private native void setFieldNat( long cPtr, String pszFName, String[] papszValues ); |
78 |
private native void setFieldNat( long cPtr, String pszFName, OGRField puValue ); |
79 |
private native long getFIDNat(long cPtr); |
80 |
private native int setFIDNat( long cPtr, long nFID );//Excepciones |
81 |
private native int setFromNat( long cPtr, OGRFeature feature, int b);//Excepciones |
82 |
private native int remapFieldsNat( long cPtr, OGRFeatureDefn poNewDefn, int panRemapSource );//Excepciones |
83 |
private native String getStyleStringNat(long cPtr); |
84 |
private native void setStyleStringNat(long cPtr, String style); |
85 |
private native void setStyleTableNat(long cPtr, OGRStyleTable poStyleTable); |
86 |
private native static OGRFeature createFeatureNat( long cPtr, OGRFeatureDefn feature ); |
87 |
private native static void destroyFeatureNat( long cPtr, OGRFeature feature ); |
88 |
|
89 |
static int h=0; |
90 |
|
91 |
/**
|
92 |
* Constructor
|
93 |
* @param cPtr direcci?n de memoria al objeto OGRFeature de C.
|
94 |
*/
|
95 |
|
96 |
public OGRFeature(long cPtr){ |
97 |
this.cPtr=cPtr;
|
98 |
} |
99 |
|
100 |
/**
|
101 |
*
|
102 |
*/
|
103 |
|
104 |
public void dumpReadable(String file)throws OGRException{ |
105 |
h++; |
106 |
if(cPtr == 0) |
107 |
throw new OGRException("Error en dumpReadable(). El constructor ha fallado."+h); |
108 |
dumpReadableNat(cPtr, file); |
109 |
|
110 |
} |
111 |
|
112 |
/**
|
113 |
* Destructor
|
114 |
*/
|
115 |
|
116 |
protected void finalize() throws OGRFailureException{ |
117 |
if(cPtr == 0) |
118 |
throw new OGRFailureException("Fallo al acceder al dato."); |
119 |
|
120 |
FreeOGRFeatureNat(cPtr); |
121 |
} |
122 |
|
123 |
|
124 |
/**
|
125 |
*
|
126 |
*/
|
127 |
|
128 |
public OGRFeatureDefn getDefnRef()throws OGRException{ |
129 |
return null; |
130 |
} |
131 |
|
132 |
/**
|
133 |
*
|
134 |
*/
|
135 |
|
136 |
public void setGeometryDirectly( OGRGeometry geom )throws OGRException{//Excepciones |
137 |
|
138 |
} |
139 |
|
140 |
/**
|
141 |
*
|
142 |
*/
|
143 |
|
144 |
public void setGeometry( OGRGeometry geom )throws OGRException{//Excepciones |
145 |
|
146 |
} |
147 |
|
148 |
/**
|
149 |
*
|
150 |
*/
|
151 |
|
152 |
public OGRGeometry getGeometryRef()throws OGRException{ |
153 |
return null; |
154 |
} |
155 |
|
156 |
/**
|
157 |
*
|
158 |
*/
|
159 |
|
160 |
public OGRGeometry stealGeometry()throws OGRException{ |
161 |
return null; |
162 |
} |
163 |
|
164 |
/**
|
165 |
*
|
166 |
*/
|
167 |
|
168 |
public OGRFeature cloneFeature()throws OGRException{ |
169 |
return null; |
170 |
} |
171 |
|
172 |
/**
|
173 |
*
|
174 |
*/
|
175 |
|
176 |
public int equal( OGRFeature poFeature )throws OGRException{ |
177 |
return 0; |
178 |
} |
179 |
|
180 |
/**
|
181 |
*
|
182 |
*/
|
183 |
|
184 |
public int getFieldCount()throws OGRException{ |
185 |
return 0; |
186 |
} |
187 |
|
188 |
/**
|
189 |
*
|
190 |
*/
|
191 |
|
192 |
public OGRFieldDefn getFieldDefnRef( int iField )throws OGRException{ |
193 |
return null; |
194 |
} |
195 |
|
196 |
/**
|
197 |
*
|
198 |
*/
|
199 |
|
200 |
public int getFieldIndex( String pszName)throws OGRException{ |
201 |
return 0; |
202 |
} |
203 |
|
204 |
/**
|
205 |
*
|
206 |
*/
|
207 |
|
208 |
public int isFieldSet( int iField )throws OGRException{ |
209 |
return 0; |
210 |
} |
211 |
|
212 |
/**
|
213 |
*
|
214 |
*/
|
215 |
|
216 |
public void unsetField( int iField )throws OGRException{ |
217 |
|
218 |
} |
219 |
|
220 |
/**
|
221 |
*
|
222 |
*/
|
223 |
|
224 |
public OGRField getRawFieldRef( int i )throws OGRException{ |
225 |
return null; |
226 |
} |
227 |
|
228 |
/**
|
229 |
*
|
230 |
*/
|
231 |
|
232 |
public int getFieldAsInteger( int i )throws OGRException{ |
233 |
return 0; |
234 |
} |
235 |
|
236 |
/**
|
237 |
*
|
238 |
*/
|
239 |
|
240 |
public double getFieldAsDouble( int i )throws OGRException{ |
241 |
return 0; |
242 |
} |
243 |
|
244 |
/**
|
245 |
*
|
246 |
*/
|
247 |
|
248 |
public String getFieldAsString( int i )throws OGRException{ |
249 |
return null; |
250 |
} |
251 |
|
252 |
/**
|
253 |
*
|
254 |
*/
|
255 |
|
256 |
public int getFieldAsIntegerList( int i, int pnCount )throws OGRException{ |
257 |
return 0; |
258 |
} |
259 |
|
260 |
/**
|
261 |
*
|
262 |
*/
|
263 |
|
264 |
public double getFieldAsDoubleList( int i, int pnCount )throws OGRException{ |
265 |
return 0; |
266 |
} |
267 |
|
268 |
/**
|
269 |
*
|
270 |
*/
|
271 |
|
272 |
public String[] getFieldAsStringList( int i )throws OGRException{ |
273 |
return null; |
274 |
} |
275 |
|
276 |
/**
|
277 |
*
|
278 |
*/
|
279 |
|
280 |
public int getFieldAsInteger( String pszFName )throws OGRException{ |
281 |
return 0; |
282 |
} |
283 |
|
284 |
/**
|
285 |
*
|
286 |
*/
|
287 |
|
288 |
public double getFieldAsDouble( String pszFName )throws OGRException{ |
289 |
return 0; |
290 |
} |
291 |
|
292 |
/**
|
293 |
*
|
294 |
*/
|
295 |
|
296 |
public String getFieldAsString( String pszFName )throws OGRException{ |
297 |
return null; |
298 |
} |
299 |
|
300 |
/**
|
301 |
*
|
302 |
*/
|
303 |
|
304 |
public int getFieldAsIntegerList( String pszFName, int pnCount )throws OGRException{ |
305 |
return 0; |
306 |
} |
307 |
|
308 |
/**
|
309 |
*
|
310 |
*/
|
311 |
|
312 |
public double getFieldAsDoubleList( String pszFName, int pnCount )throws OGRException{ |
313 |
return 0; |
314 |
} |
315 |
|
316 |
/**
|
317 |
*
|
318 |
*/
|
319 |
|
320 |
public String[] getFieldAsStringList( String pszFName )throws OGRException{ |
321 |
return null; |
322 |
} |
323 |
|
324 |
/**
|
325 |
*
|
326 |
*/
|
327 |
|
328 |
public void setField( int i, int nValue )throws OGRException{ |
329 |
|
330 |
} |
331 |
|
332 |
/**
|
333 |
*
|
334 |
*/
|
335 |
|
336 |
public void setField( int i, double dfValue )throws OGRException{ |
337 |
|
338 |
} |
339 |
|
340 |
/**
|
341 |
*
|
342 |
*/
|
343 |
|
344 |
public void setField( int i, String pszValue )throws OGRException{ |
345 |
|
346 |
} |
347 |
|
348 |
/**
|
349 |
*
|
350 |
*/
|
351 |
|
352 |
public void setField( int i, int nCount, int panValues )throws OGRException{ |
353 |
|
354 |
} |
355 |
|
356 |
/**
|
357 |
*
|
358 |
*/
|
359 |
|
360 |
public void setField( int i, int nCount, double padfValues )throws OGRException{ |
361 |
|
362 |
} |
363 |
|
364 |
/**
|
365 |
*
|
366 |
*/
|
367 |
|
368 |
public void setField( int i, String[] papszValues )throws OGRException{ |
369 |
|
370 |
} |
371 |
|
372 |
/**
|
373 |
*
|
374 |
*/
|
375 |
|
376 |
public void setField( int i, OGRField puValue )throws OGRException{ |
377 |
|
378 |
} |
379 |
|
380 |
/**
|
381 |
*
|
382 |
*/
|
383 |
|
384 |
public void setField( String pszFName, int nValue )throws OGRException{ |
385 |
|
386 |
} |
387 |
|
388 |
/**
|
389 |
*
|
390 |
*/
|
391 |
|
392 |
public void setField( String pszFName, double dfValue )throws OGRException{ |
393 |
|
394 |
} |
395 |
|
396 |
/**
|
397 |
*
|
398 |
*/
|
399 |
|
400 |
public void setField( String pszFName, String pszValue)throws OGRException{ |
401 |
|
402 |
} |
403 |
|
404 |
/**
|
405 |
*
|
406 |
*/
|
407 |
|
408 |
public void setField( String pszFName, int nCount, int panValues )throws OGRException{ |
409 |
|
410 |
} |
411 |
|
412 |
/**
|
413 |
*
|
414 |
*/
|
415 |
|
416 |
public void setField( String pszFName, int nCount, double padfValues )throws OGRException{ |
417 |
|
418 |
} |
419 |
|
420 |
/**
|
421 |
*
|
422 |
*/
|
423 |
|
424 |
public void setField( String pszFName, String[] papszValues )throws OGRException{ |
425 |
|
426 |
} |
427 |
|
428 |
/**
|
429 |
*
|
430 |
*/
|
431 |
|
432 |
public void setField( String pszFName, OGRField puValue )throws OGRException{ |
433 |
|
434 |
} |
435 |
|
436 |
/**
|
437 |
*
|
438 |
*/
|
439 |
|
440 |
public long getFID()throws OGRException{ |
441 |
return 0; |
442 |
} |
443 |
|
444 |
/**
|
445 |
*
|
446 |
*/
|
447 |
|
448 |
public void setFID( long nFID )throws OGRException{//Excepciones |
449 |
|
450 |
} |
451 |
|
452 |
/**
|
453 |
*
|
454 |
*/
|
455 |
|
456 |
public void setFrom( OGRFeature feature, int b)throws OGRException{//Excepciones |
457 |
|
458 |
} |
459 |
|
460 |
/**
|
461 |
*
|
462 |
*/
|
463 |
|
464 |
public void remapFields( OGRFeatureDefn poNewDefn, int panRemapSource )throws OGRException{//Excepciones |
465 |
|
466 |
} |
467 |
|
468 |
/**
|
469 |
*
|
470 |
*/
|
471 |
|
472 |
public String getStyleString()throws OGRException{ |
473 |
return null; |
474 |
} |
475 |
|
476 |
/**
|
477 |
*
|
478 |
*/
|
479 |
|
480 |
public void setStyleString(String style)throws OGRException{ |
481 |
|
482 |
} |
483 |
|
484 |
/**
|
485 |
*
|
486 |
*/
|
487 |
|
488 |
public void setStyleTable(OGRStyleTable poStyleTable)throws OGRException{ |
489 |
|
490 |
} |
491 |
|
492 |
/**
|
493 |
*
|
494 |
*/
|
495 |
|
496 |
public static OGRFeature createFeature( OGRFeatureDefn feature )throws OGRException{ |
497 |
return null; |
498 |
} |
499 |
|
500 |
/**
|
501 |
*
|
502 |
*/
|
503 |
|
504 |
public static void destroyFeature( OGRFeature feature )throws OGRException{ |
505 |
|
506 |
} |
507 |
|
508 |
|
509 |
} |