Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spatialindex includes in subfolder, not found by qgis #15119

Closed
qgib opened this issue Apr 29, 2012 · 2 comments
Closed

spatialindex includes in subfolder, not found by qgis #15119

qgib opened this issue Apr 29, 2012 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS

Comments

@qgib
Copy link
Contributor

qgib commented Apr 29, 2012

Author Name: William Kyngesburye (@kyngchaos)
Original Redmine Issue: 5517
Affected QGIS version: master
Redmine category:build/install


The standard spatialindex installation places its headers in a subfolder of $prefix/include, ie @/usr/local/include/spatialindex/@. The cmake FindSpatialitindex does not check for this, but I'm not sure if that is broken, as I am installing in a non-standard location.

But, qgsspatialindex.cpp also does not include from the subfolder. A leftover from when spatialindex was included in the source and didn't have the subfolder. Changing the qgsspatialindex.cpp include to:

#include <spatialindex/SpatialIndex.h>

fixes the include problem. The findspatialindex.cmake probably needs a similar fix.

@qgib
Copy link
Contributor Author

qgib commented Apr 29, 2012

Author Name: Jürgen Fischer (@jef-n)


@SPATIALINDEX_INCLUDE_DIR@ is the directory where @SpatialIndex.h@ is, so @FindSpatialindex.cmake@ should set it to @/usr/local/include/spatialindex@ in your case - and @#include "SpatialIndex.h"@ should work just fine.

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2012

Author Name: William Kyngesburye (@kyngchaos)


Ah. But then spatialindex has a bug. I looked at all its internal headers included by spatialindex.h, and they are indeed local off the subfolder. Except Point.h, it causes the include error I saw with this:

#include <spatialindex/tools/Tools.h>

If you install spatialindex in a standard location like /usr/local you probably won't see an error because /usr/local/include will likely also be in your compile command.

So, invalid QGIS bug. Over to spatialindex folks...


  • resolution was changed from to invalid
  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS labels May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS
Projects
None yet
Development

No branches or pull requests

1 participant