[Gdal-dev] ogr_miattrind.cpp dependency
Mateusz Łoskot
mateusz at loskot.net
Tue Feb 7 12:03:55 EST 2006
Frank Warmerdam wrote:
> On 2/6/06, Mateusz Łoskot <mateusz at loskot.net> wrote:
>
>>Hi,
>>
>>As I revealed ogr\ogrsf_frmts\generic\ogr_miattrind.cpp file
>>is dedicated to MapInfo and has nothing to do with other drivers.
>>Am I right?
>>
>>If I am, then why it seems to be required dependency even if I want to
>>build only shapefile support.
>>Generic OGRLayer::InitializeIndexSupport
>>calls OGRCreateDefaultLayerIndex and the only implementation of
>>OGRCreateDefaultLayerIndex function is available from ogr_miattrind.cpp
>>file:
>>
>>OGRLayerAttrIndex *OGRCreateDefaultLayerIndex()
>>{
>> return new OGRMILayerAttrIndex();
>>}
>>
>>But as I said, ogr_miattrind.cpp is coupled with MapInfo driver, so
>>currently there is no way to build OGR with shapefile driver but without
>>MapInfo driver.
>>Am I right or I've missed something while analysing OGR sources.
>
>
> Mateusz,
>
> You are correct that you cannot currently build the shapefile
> driver without also having the mapinfo driver. The ogr_mitattrind.cpp
> implements a "generic" attribute indexing mechanism that other
> drivers can use. But it is implemented using mapinfo TAB format,
> hence the dependency. Currently only the shapefile driver uses
> this indexing mechanism.
I understand.
> I think the best solution to this would be to add some sort
> of build/preprocessor magic so that if the mapinfo driver isn't
> included in a build, the attribute indexing will also be dropped.
> This may be a bit messy.
Do you think it's something recommended or expected by other users?
Or there is no problem with current state of this configuration?
Cheers
--
Mateusz Łoskot
http://mateusz.loskot.net
More information about the Gdal-dev
mailing list