root / trunk / libraries / libjni-gdal / src / es / gva / cit / jogr / OGRFeature.java @ 7765
History | View | Annotate | Download (9.97 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 es.gva.cit.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(){ |
117 |
if(cPtr > 0) |
118 |
FreeOGRFeatureNat(cPtr); |
119 |
} |
120 |
|
121 |
|
122 |
/**
|
123 |
*
|
124 |
*/
|
125 |
|
126 |
public OGRFeatureDefn getDefnRef()throws OGRException{ |
127 |
return null; |
128 |
} |
129 |
|
130 |
/**
|
131 |
*
|
132 |
*/
|
133 |
|
134 |
public void setGeometryDirectly( OGRGeometry geom )throws OGRException{//Excepciones |
135 |
|
136 |
} |
137 |
|
138 |
/**
|
139 |
*
|
140 |
*/
|
141 |
|
142 |
public void setGeometry( OGRGeometry geom )throws OGRException{//Excepciones |
143 |
|
144 |
} |
145 |
|
146 |
/**
|
147 |
*
|
148 |
*/
|
149 |
|
150 |
public OGRGeometry getGeometryRef()throws OGRException{ |
151 |
return null; |
152 |
} |
153 |
|
154 |
/**
|
155 |
*
|
156 |
*/
|
157 |
|
158 |
public OGRGeometry stealGeometry()throws OGRException{ |
159 |
return null; |
160 |
} |
161 |
|
162 |
/**
|
163 |
*
|
164 |
*/
|
165 |
|
166 |
public OGRFeature cloneFeature()throws OGRException{ |
167 |
return null; |
168 |
} |
169 |
|
170 |
/**
|
171 |
*
|
172 |
*/
|
173 |
|
174 |
public int equal( OGRFeature poFeature )throws OGRException{ |
175 |
return 0; |
176 |
} |
177 |
|
178 |
/**
|
179 |
*
|
180 |
*/
|
181 |
|
182 |
public int getFieldCount()throws OGRException{ |
183 |
return 0; |
184 |
} |
185 |
|
186 |
/**
|
187 |
*
|
188 |
*/
|
189 |
|
190 |
public OGRFieldDefn getFieldDefnRef( int iField )throws OGRException{ |
191 |
return null; |
192 |
} |
193 |
|
194 |
/**
|
195 |
*
|
196 |
*/
|
197 |
|
198 |
public int getFieldIndex( String pszName)throws OGRException{ |
199 |
return 0; |
200 |
} |
201 |
|
202 |
/**
|
203 |
*
|
204 |
*/
|
205 |
|
206 |
public int isFieldSet( int iField )throws OGRException{ |
207 |
return 0; |
208 |
} |
209 |
|
210 |
/**
|
211 |
*
|
212 |
*/
|
213 |
|
214 |
public void unsetField( int iField )throws OGRException{ |
215 |
|
216 |
} |
217 |
|
218 |
/**
|
219 |
*
|
220 |
*/
|
221 |
|
222 |
public OGRField getRawFieldRef( int i )throws OGRException{ |
223 |
return null; |
224 |
} |
225 |
|
226 |
/**
|
227 |
*
|
228 |
*/
|
229 |
|
230 |
public int getFieldAsInteger( int i )throws OGRException{ |
231 |
return 0; |
232 |
} |
233 |
|
234 |
/**
|
235 |
*
|
236 |
*/
|
237 |
|
238 |
public double getFieldAsDouble( int i )throws OGRException{ |
239 |
return 0; |
240 |
} |
241 |
|
242 |
/**
|
243 |
*
|
244 |
*/
|
245 |
|
246 |
public String getFieldAsString( int i )throws OGRException{ |
247 |
return null; |
248 |
} |
249 |
|
250 |
/**
|
251 |
*
|
252 |
*/
|
253 |
|
254 |
public int getFieldAsIntegerList( int i, int pnCount )throws OGRException{ |
255 |
return 0; |
256 |
} |
257 |
|
258 |
/**
|
259 |
*
|
260 |
*/
|
261 |
|
262 |
public double getFieldAsDoubleList( int i, int pnCount )throws OGRException{ |
263 |
return 0; |
264 |
} |
265 |
|
266 |
/**
|
267 |
*
|
268 |
*/
|
269 |
|
270 |
public String[] getFieldAsStringList( int i )throws OGRException{ |
271 |
return null; |
272 |
} |
273 |
|
274 |
/**
|
275 |
*
|
276 |
*/
|
277 |
|
278 |
public int getFieldAsInteger( String pszFName )throws OGRException{ |
279 |
return 0; |
280 |
} |
281 |
|
282 |
/**
|
283 |
*
|
284 |
*/
|
285 |
|
286 |
public double getFieldAsDouble( String pszFName )throws OGRException{ |
287 |
return 0; |
288 |
} |
289 |
|
290 |
/**
|
291 |
*
|
292 |
*/
|
293 |
|
294 |
public String getFieldAsString( String pszFName )throws OGRException{ |
295 |
return null; |
296 |
} |
297 |
|
298 |
/**
|
299 |
*
|
300 |
*/
|
301 |
|
302 |
public int getFieldAsIntegerList( String pszFName, int pnCount )throws OGRException{ |
303 |
return 0; |
304 |
} |
305 |
|
306 |
/**
|
307 |
*
|
308 |
*/
|
309 |
|
310 |
public double getFieldAsDoubleList( String pszFName, int pnCount )throws OGRException{ |
311 |
return 0; |
312 |
} |
313 |
|
314 |
/**
|
315 |
*
|
316 |
*/
|
317 |
|
318 |
public String[] getFieldAsStringList( String pszFName )throws OGRException{ |
319 |
return null; |
320 |
} |
321 |
|
322 |
/**
|
323 |
*
|
324 |
*/
|
325 |
|
326 |
public void setField( int i, int nValue )throws OGRException{ |
327 |
|
328 |
} |
329 |
|
330 |
/**
|
331 |
*
|
332 |
*/
|
333 |
|
334 |
public void setField( int i, double dfValue )throws OGRException{ |
335 |
|
336 |
} |
337 |
|
338 |
/**
|
339 |
*
|
340 |
*/
|
341 |
|
342 |
public void setField( int i, String pszValue )throws OGRException{ |
343 |
|
344 |
} |
345 |
|
346 |
/**
|
347 |
*
|
348 |
*/
|
349 |
|
350 |
public void setField( int i, int nCount, int panValues )throws OGRException{ |
351 |
|
352 |
} |
353 |
|
354 |
/**
|
355 |
*
|
356 |
*/
|
357 |
|
358 |
public void setField( int i, int nCount, double padfValues )throws OGRException{ |
359 |
|
360 |
} |
361 |
|
362 |
/**
|
363 |
*
|
364 |
*/
|
365 |
|
366 |
public void setField( int i, String[] papszValues )throws OGRException{ |
367 |
|
368 |
} |
369 |
|
370 |
/**
|
371 |
*
|
372 |
*/
|
373 |
|
374 |
public void setField( int i, OGRField puValue )throws OGRException{ |
375 |
|
376 |
} |
377 |
|
378 |
/**
|
379 |
*
|
380 |
*/
|
381 |
|
382 |
public void setField( String pszFName, int nValue )throws OGRException{ |
383 |
|
384 |
} |
385 |
|
386 |
/**
|
387 |
*
|
388 |
*/
|
389 |
|
390 |
public void setField( String pszFName, double dfValue )throws OGRException{ |
391 |
|
392 |
} |
393 |
|
394 |
/**
|
395 |
*
|
396 |
*/
|
397 |
|
398 |
public void setField( String pszFName, String pszValue)throws OGRException{ |
399 |
|
400 |
} |
401 |
|
402 |
/**
|
403 |
*
|
404 |
*/
|
405 |
|
406 |
public void setField( String pszFName, int nCount, int panValues )throws OGRException{ |
407 |
|
408 |
} |
409 |
|
410 |
/**
|
411 |
*
|
412 |
*/
|
413 |
|
414 |
public void setField( String pszFName, int nCount, double padfValues )throws OGRException{ |
415 |
|
416 |
} |
417 |
|
418 |
/**
|
419 |
*
|
420 |
*/
|
421 |
|
422 |
public void setField( String pszFName, String[] papszValues )throws OGRException{ |
423 |
|
424 |
} |
425 |
|
426 |
/**
|
427 |
*
|
428 |
*/
|
429 |
|
430 |
public void setField( String pszFName, OGRField puValue )throws OGRException{ |
431 |
|
432 |
} |
433 |
|
434 |
/**
|
435 |
*
|
436 |
*/
|
437 |
|
438 |
public long getFID()throws OGRException{ |
439 |
return 0; |
440 |
} |
441 |
|
442 |
/**
|
443 |
*
|
444 |
*/
|
445 |
|
446 |
public void setFID( long nFID )throws OGRException{//Excepciones |
447 |
|
448 |
} |
449 |
|
450 |
/**
|
451 |
*
|
452 |
*/
|
453 |
|
454 |
public void setFrom( OGRFeature feature, int b)throws OGRException{//Excepciones |
455 |
|
456 |
} |
457 |
|
458 |
/**
|
459 |
*
|
460 |
*/
|
461 |
|
462 |
public void remapFields( OGRFeatureDefn poNewDefn, int panRemapSource )throws OGRException{//Excepciones |
463 |
|
464 |
} |
465 |
|
466 |
/**
|
467 |
*
|
468 |
*/
|
469 |
|
470 |
public String getStyleString()throws OGRException{ |
471 |
return null; |
472 |
} |
473 |
|
474 |
/**
|
475 |
*
|
476 |
*/
|
477 |
|
478 |
public void setStyleString(String style)throws OGRException{ |
479 |
|
480 |
} |
481 |
|
482 |
/**
|
483 |
*
|
484 |
*/
|
485 |
|
486 |
public void setStyleTable(OGRStyleTable poStyleTable)throws OGRException{ |
487 |
|
488 |
} |
489 |
|
490 |
/**
|
491 |
*
|
492 |
*/
|
493 |
|
494 |
public static OGRFeature createFeature( OGRFeatureDefn feature )throws OGRException{ |
495 |
return null; |
496 |
} |
497 |
|
498 |
/**
|
499 |
*
|
500 |
*/
|
501 |
|
502 |
public static void destroyFeature( OGRFeature feature )throws OGRException{ |
503 |
|
504 |
} |
505 |
|
506 |
|
507 |
} |