Math.NET Spatial with Portable Class Library?

(Tim Ebling) #1


I’m building an art creation app using Xamarin, and I’m looking for a vector geometry library which I can use to implement both basic things like geometry storage, simple vector operations in 2D, etc. as well as more complex tasks like Bezier curve manipulation.

The Spatial library looks like it’s a perfect fit for my needs, except that I can’t add the NuGet package to the Portable Class Library, as I get an error about it not targeting the PCL. For my purposes, I need the basic vector classes to be accessible from both shared code and from the UI layer implemented per platform.

Interestingly I was able to add the Math.NET Numerics to the PCL, so there’s a precedent for this within the Math.NET ecosystem. Is it the intent that Spatial has platform specific optimizations which would prevent it from operating similarly to Numerics?

Thanks very much!



We very much appreciate the initiative!

We are working on a large project that used to target Net 4.6.1 and used Media3D extensively (Math only, no animations, etc). We now are migrating our core libraries to .NetStandard 2.0. in order to support UWP and .Net projects 4.6.1 (and higher) with the same code base.

In .NetStandard, there is no support for the Media3D API.

Is it wise to substitute Windows.Media.Media3D by Math.Net Spacial?

  • Is Math.Net Spacial a going forward concern?
  • Can the current version be used with NetStandard?

Thanks for your thoughts!!!


@sulzi I suggest you to ask this Q in the MathNet-Spatial gitter


Thanks for the pointer! I will do that