Skip to content

Commit

Permalink
Document PROJ workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
bricelam committed Jan 14, 2020
1 parent 7c1266e commit 7dafac6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions entity-framework/core/modeling/spatial.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,22 @@ apt-get install libsqlite3-mod-spatialite
brew install libspatialite
```

Unfortunately, newer versions of PROJ (a dependency of SpatiaLite) are incompatible with EF's default [SQLitePCLRaw bundle](/dotnet/standard/data/sqlite/custom-versions#bundles). You can work around this by either creating a custom [SQLitePCLRaw provider](/dotnet/standard/data/sqlite/custom-versions#sqlitepclraw-providers) that uses the system SQLite library, or you can install a custom build of SpatiaLite disabling PROJ support.

``` sh
curl https://www.gaia-gis.it/gaia-sins/libspatialite-4.3.0a.tar.gz | tar -xz
cd libspatialite-4.3.0a

if [[ `uname -s` == Darwin* ]]; then
# Mac OS requires some minor patching
sed -i "" "s/shrext_cmds='\`test \\.\$module = .yes && echo .so \\|\\| echo \\.dylib\`'/shrext_cmds='.dylib'/g" configure
fi

./configure --disable-proj
make
make install
```

### Configuring SRID

In SpatiaLite, columns need to specify an SRID per column. The default SRID is `0`. Specify a different SRID using the ForSqliteHasSrid method.
Expand Down

0 comments on commit 7dafac6

Please sign in to comment.