OGR bug?

Frank Warmerdam warmerdam at POBOX.COM
Tue Nov 9 09:32:06 PST 2004


Ivano Picco wrote:
> Both using mapserv or my simple perl script the OGR driver for Oracle
> Spatial took about 2Gbytes of memory to getFeature from a layer with 4800
> geometries (the shapefile is 2,6 Mbyte). Both the performance is worst than
>  arcsde connection or shapefile access (6s shape,  21s SDE): about 10
> minutes running perl script !!!

Ivano,

There was another report as well that OGR has some sort of a memory leak
accessing Oracle.  I haven't confirmed this yet since my new Oracle instance
is on Win32 where I lack good memory leak testing tools but I do plan to work
on the problem this week.

You might want to add yourself to the cc: list for the bug.

   http://bugzilla.remotesensing.org/show_bug.cgi?id=663

> I think there's a bug in OGR implementation where it's used to get features
> or shapes (with perl mapscript getFeature, or query layer with mapserv).
> Please, could you confirm this bug?

Do you mean a memory leak bug or something else?  The GetFeature() method at
the OGR level is supposed to work with the OCI driver.  If there isn't an
identified primary key (currently I just look for a field named OGR_FID)
then I end up just using a sequence number as the index, and then fetching
an individual feature can be very expensive (I have to run through all the
features to count to it).

If you think you are running into additional issues please let me know
with details on how to reproduce the issue.  Ideally if you can reproduce
an issue with ogrinfo it is easy for me to track down then if I also need
to go through mapserver layers.

> Other questions: why I can't use getFeature method with OracleSpatial
> connection type?

Fernando Simon is now actively maintaining the direct Oracle Spatial
support in mapserver.  You could submit an enhancement request for direct
feature access.  Make sure you select the "Oracle Spatial" category when
submitting the bug report.

 > Why I can't draw map from SDE or OGR layer?

You can.  I think you will need to be more specific about what problem you
encounter.

> There's any plan to support all methods on all connection types?

It is entirely dependent on the maintainers of the modules in question.
The "core maintainers" don't generally have access to esoteric configurations
(such as Oracle Spatial, SDE, etc) and/or are not willing to take responsibility
for these complex interfaces.  So the degree of support is determined by the
maintainers of the connection code.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the MapServer-users mailing list