Ticket #4431 (closed enhancement: fixed)

Opened 17 months ago

Last modified 17 months ago

ogrtindex in Java

Reported by: thlin Owned by: 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

ogrtindex.java Download (25.2 KB) - added by thlin 17 months ago.

Change History

Changed 17 months ago by thlin

Changed 17 months ago by 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.

Changed 17 months ago by rouault

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 2.0.0

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.