LoginSignup
0
0

More than 5 years have passed since last update.

DataGripでmod_spatialiteを使う

Last updated at Posted at 2018-01-12

JetBrains謹製のデータベースIDE、DataGripを使い始めてみました。
Windows環境下でmod_spatialiteを利用できるようにするのに手こずったのでメモしておきます。

要はパスを通すだけなんですけど…^^;

mod_spatialite.dll(Windowsの場合)他一式の格納パスを通しておけばいいのですが、IDEの設定がなかなかわからず時間を費やしてしまった。。

  1. File -> Data Sources
  2. ドライバ一覧からSqliteを選択
  3. AdvancedタブからVM environment(右のから設定)
  4. Pathmod_spatialite.dllの格納ディレクトリを追加

image.png

あとは、load_extensionで読み込むことができます。

SELECT load_extension('mod_spatialite');
SELECT spatialite_version();

(結果)

"spatialite_version()"
4.4.0-RC0

めでたしめでたし。

ちなみに

load_extension()にフルパスを指定すればいいよ」てな記述もあるのですが、、いろいろ試してみたけれど、どうもうまくいきません。Windowsのパス表記だと無効なのかもしれません。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0