Plugin.SpatialiteForms 0.0.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Plugin.SpatialiteForms --version 0.0.1.1                
NuGet\Install-Package Plugin.SpatialiteForms -Version 0.0.1.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Plugin.SpatialiteForms" Version="0.0.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Plugin.SpatialiteForms --version 0.0.1.1                
#r "nuget: Plugin.SpatialiteForms, 0.0.1.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Plugin.SpatialiteForms as a Cake Addin
#addin nuget:?package=Plugin.SpatialiteForms&version=0.0.1.1

// Install Plugin.SpatialiteForms as a Cake Tool
#tool nuget:?package=Plugin.SpatialiteForms&version=0.0.1.1                

SpatialiteForms

A nuget package that enables spatialite for Xamarin Forms. As an example this allows to do reverse geocoding offline on mobile devices (this barely scratches the surface of Spatialite, but it's a very common usecase for mobile dev)

It's entirely based on:

If you find this library useful, please support the above two projects.

What this means is that it exposes a SQLiteConnection that supports spatial SQL capabilities.

To enable this functionality native libraries/framework is required (apart from the nuget package itself) :

  1. Get Android libraries from here and add under libs folder, with build action as "AndroidNativeLibrary"
  2. Get iOS framework from here and add as Native Reference to iOS project

Current versioning/capabilities information can be accessed via SpatialiteInfo property, available in the SpatialiteConnection class.

SpatialiteForms also allows to use "pre-packaged" database files using Assets folder in Android and Resources folder for iOS.

Usage

Example using countryData.db on how to prepackage a database with geometry data within the xamarin app and to get a Spatialite-capable SQLiteConnection.

  1. Add countryData.db under Assets folder on Android and Resources folder on iOS

  2. Define a Region class

public class Region {  
 public string Name { get; set; }  
}
  1. Get the Spatialite capable SQLiteConnection
var dbPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "countryData.db");
SpatialiteConnection spatialite = CrossSpatialiteForms.Current.GetSpatialiteConnection(dbPath, "countryData.db", true);

var info = spatialite.SpatialiteInfo;
var region = spatialite.SQLiteConnection.Query<Region>("select name from region where within(Makepoint(-100.7594387, 46.77519), geometry);").FirstOrDefault();

the result region should have the name of North Dakota

Again this is only a small thing of what spatialite is capable of, please check official Spatialite documentation for more details.

License

This project is licensed under GPL3

Spatialite libraries have been compiled from original source code and no changes was made to it.

If you believe that I have infringed your copyright in any way please let me know and I will make remove any code that is your copyright ASAP.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.1 is compatible.  netstandard1.2 was computed.  netstandard1.3 was computed.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed.  monoandroid81 is compatible. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Windows Phone wpa81 was computed. 
Windows Store netcore was computed.  netcore45 was computed.  netcore451 was computed. 
Xamarin.iOS xamarinios was computed.  xamarinios10 is compatible. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.4 1,564 3/30/2019
0.0.3 789 12/3/2018
0.0.1.1 704 12/1/2018
0.0.1 664 12/1/2018

Initial release