Opened 16 years ago
#2713 new defect
Layer from MS_LAYER_RASTER type did'nt have getExtent()
Reported by: | mapmaniac | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | MapServer C Library | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
i have written a java mapscript like this to get the Extent of the layer defined in the mapfile:
System.loadLibrary("mapscript"); mapObj map = new mapObj("C:/AppsJava/mapserver_java/test.map"); int size = map.getNumlayers(); for (int i=0;i<size;i++){ layerObj layer=map.getLayer(i); layer.setTemplate("template.html"); pointObj p = new pointObj(4.868779043979817,44.99013635404045,0); layer.queryByPoint(map, p3a, mapscriptConstants.MS_SINGLE, 1) try { System.out.println(layer.getExtent().getMinx()); System.out.println(layer.getExtent().getMiny()); System.out.println(layer.getExtent().getMaxx()); System.out.println(layer.getExtent().getMaxy()); } catch (ParseException e) { e.printStackTrace(); } }
If the type of the layer is MS_LAYER_RASTER, i get wrong values for the Extent.
I looked to the sources and i found in maprasterquery.c
int msRASTERLayerGetExtent(layerObj *layer, rectObj *extent) { return MS_FAILURE; }
So i think that this is'nt implemented. Is this right? Can you fix this?
Thank you very much
Mahmut
Note:
See TracTickets
for help on using tickets.