如何为iOS编译spatialite

发布于 2024-10-14 08:05:33 字数 111 浏览 1 评论 0原文

我是新来的,这是我的第一个主题。我对 iOS 平台非常陌生,我正在尝试使用 sqlite3 的空间扩展,但我无法做到这一点。这让我抓狂。我不知道如何以及从哪里开始。有人可以给我建议吗?

谢谢。

I am new here and this is my first topic. I am very new on iOS platform and i am trying to use spatialiate extension with sqlite3 but i couldn't do this. It is making me crazy. I don't know how and where do i start. Can someone give me suggestion?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

只是偏爱你 2024-10-21 08:05:33

我是在 http:// 上共享库的人;-)
我在简化 iOS 版 spaceite 的集成方面取得了一些良好进展。
现在我可以构建一个完全独立的spatialite 静态库(2.3.1,嵌入所需的 GEOS 和 PROJ,这样就不必占用它们)。

只需下载 zip http://lionel.gueganton.free.fr/spatialite/ spaceite2.3.1.zip,您将获得 x86 和 arm + 标头的 .a,以便您可以直接使用这些标头中的 spaceite 接口。

拖放 .a 后(两者都需要在模拟器和真实硬件上工作),您只需调用 spatialite_init(1) 即可初始化 Spatialite。

您的控制台日志上应显示以下内容:
<代码>

SpatiaLite version ..: 2.3.1    Supported Extensions:
    - 'VirtualShape'    [direct Shapefile access]
    - 'VirtualText      [direct CSV/TXT access]
    - 'VirtualNetwork   [Dijkstra shortest path]
    - 'RTree'       [Spatial Index - R*Tree]
    - 'MbrCache'        [Spatial Index - MBR cache]
    - 'VirtualFDO'      [FDO-OGR interoperability]
    - 'SpatiaLite'      [Spatial SQL - OGC]
PROJ.4 version ......: Rel. 4.6.1, 21 August 2008
GEOS version ........: 3.1.1-CAPI-1.6.0


I'm the guy who shared the libs on http:// ;-)
I did some good progress on easing the integration of spatialite for iOS.
Now I'm able to build a fully standalone static library of spatialite (2.3.1 that embeds the required GEOS and PROJ so that don't have to take car of them).

Just download the zip http://lionel.gueganton.free.fr/spatialite/spatialite2.3.1.zip and you'll get the .a for x86 and arm + headers so that you can use directly the spatialite interface from those headers.

Once you've drag n drop the .a (both are required to work in the simulator AND on the real hardware), you can initialize spatialite by just invoking spatialite_init(1).

The following should be displayed on your console log:


SpatiaLite version ..: 2.3.1 Supported Extensions:
- 'VirtualShape' [direct Shapefile access]
- 'VirtualText [direct CSV/TXT access]
- 'VirtualNetwork [Dijkstra shortest path]
- 'RTree' [Spatial Index - R*Tree]
- 'MbrCache' [Spatial Index - MBR cache]
- 'VirtualFDO' [FDO-OGR interoperability]
- 'SpatiaLite' [Spatial SQL - OGC]
PROJ.4 version ......: Rel. 4.6.1, 21 August 2008
GEOS version ........: 3.1.1-CAPI-1.6.0

终陌 2024-10-21 08:05:33

卷起来,卷起来,趁热拿走!

大师们,谷歌福这一项就强了!

不能说我写了这个(我确实计划为 iPhone SQLite 和 Spatialite 提供 CMake 脚本,很快就会实现),但我建议你自己开始< a href="http://lionel.gueganton.free.fr/spatialite/" rel="nofollow">此网站,404 之前:

http://lionel.gueganton.free.fr/spatialite/

去下载一些好东西,包括预编译的 Spatialite + 扩展 2.3.1 二进制文件!

有一个SQLite-on-OSX Cmake脚本(最初发现此处),可能只需很少的工作,就可以重新定位SQLite-iPhone 构建(我一有时间就会做)。这应该允许您使用最新的 SQLite 版本(我读到 Apple 包含的版本略有缺陷)。然后,据说,您只需以本地方式引用new头文件,即使用引号

(例如“sqllitexxx.h”)

而不是使用尖括号:(

) h>)

那么,我能得到那些有趣的点吗;-) ?

干杯

大富翁

Roll up, Roll up, get them while they're hot!

Masters, the Google-fu is strong in this one!

Can't say I wrote this (I do plan on having CMake scripts for both iPhone SQLite and Spatialite, sometime real soon), but I suggest you get yourselves over to this site, before 404:

http://lionel.gueganton.free.fr/spatialite/

go download you some goodies, including pre-compiled Spatialite + extensions 2.3.1 binaries!!!.

There is an SQLite-on-OSX Cmake script (originally found here), which, with probably little work, should be re-targetable at SQLite-iPhone builds (I'll do it, just as soon as I get the time). This should allow you to use the latest SQLite version (I've read that the Apple-included version is slightly crippled). Then, supposedly, you just have to reference the new header files in a local manner, i.e. using quotes

(e.g. "sqllitexxx.h")

instead of using angle brackets:

(<sqllitexoldx.h>)

So, do I get those juicy points ;-) ?

Cheers

Big Rich

小瓶盖 2024-10-21 08:05:33

您可能必须编译到armv7目标(优化构建),您还应该链接到stdlib++.dylib。

You may have to compile to armv7 target (optimised build), you should also link with stdlib++.dylib.

失眠症患者 2024-10-21 08:05:33

Spatialite for iOS 只需 3 个简单步骤:

  1. https://github.com/gstf/libspatialite 获取 Makefile 和补丁-ios
  2. 输入 make
  3. 没有第 3 步

向 Gustaf Lindqvist 致敬,让其可用!

Spatialite for iOS in 3 easy steps:

  1. Get the Makefile and patch from https://github.com/gstf/libspatialite-ios
  2. Type make
  3. There is no step 3

Hat tip to Gustaf Lindqvist for making this available!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文