Opened 8 years ago

Closed 8 years ago

#4431 closed enhancement (fixed)

ogrtindex in Java

Reported by: thlin Owned by: Even Rouault
Priority: normal Milestone: 1.10.0
Component: JavaBindings Version: 1.8.1
Severity: normal Keywords: java, ogrtindex
Cc:

Description

I have implemented a JAva version ogrtindex with some advice from Even. http://osgeo-org.1803224.n2.nabble.com/GDAL-Java-Binding-meomory-problem-under-intensive-method-calls-td7155011.html#a7161661

But there is still one thing... I got a "3D Polygon" instead ordinary "Polygon" which I will get by directly calling ogrtindex binary command from GDAL.

Geometry: 3D Polygon
Feature Count: 2
Extent: (9.535000, 54.488333) - (30.016606, 63.364299)
Layer SRS WKT:
GEOGCS["GCS_WGS_1984",
    DATUM["WGS_1984",
        SPHEROID["WGS_1984",6378137,298.257223563]],
    PRIMEM["Greenwich",0],
    UNIT["Degree",0.017453292519943295]]
LOCATION: String (200.0)
OGRFeature(LAKARE):0
  LOCATION (String) = a.shp,0
  POLYGON ((17.9685395 56.3835488 0,17.9685395 63.3642986 0,30.0166059 63.364298
6 0,30.0166059 56.3835488 0,17.9685395 56.3835488 0))

Attachments (1)

ogrtindex.java (25.2 KB) - added by thlin 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by thlin

Attachment: ogrtindex.java added

comment:1 Changed 8 years ago by Even Rouault

For the 3D polygon, I think it is because the use of AddPoint?() that adds an implicit z=0 in the SWIG bindings. Try using AddPoint_2D() instead.

comment:2 Changed 8 years ago by Even Rouault

Milestone: 2.0.0
Resolution: fixed
Status: newclosed

Commited. Thanks

r23738 /trunk/gdal/swig/java/ (GNUmakefile apps/ogrtindex.java makefile.vc): Java sample applications: add ogrtindex.java (contributed by thlin, #4431)

Note: See TracTickets for help on using tickets.