-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add .STAsBinary method to library #19
Comments
Correct. Well-known binary support is not part of the library. Main goal of the library was to enable you to get geometry in and out of sqlserver. You can always just query sqlserver to return STAsBinary as a column. |
Thanks for the quick response! It looks like it's also missing the MakeValid, EnvelopeAngle, ReorientObject, BufferWithTolerance, Point, Reduce, EnvelopeCenter, STDistance, and STIsValid methods in the SqlGeography class. Do you know if there is a better way for me to port over this code to .NET Standard? (Another nuget library, something I'm missing?) |
Most of these operations are not simple-to-implement features, as they require spatial geometry processing, and without knowing Microsoft's implementation, there's no way to get the exact same results they do. It's better to perform these operations in your sql query instead. |
...having said that adding WKB support isn't that hard, and I already have done something similar before that just needs to be ported to here, which is why I renamed the title and left the issue here. I don't have plans to add the other options you asked for, as that is a surprisingly hard task |
I don't suppose the feasibility of implementing the full set of features available in Microsoft.SqlServer.DacFx.x64 Nuget which is .Net Framework into .Net Standard, Core, 5, or 6 has changed since the year-and-a-bit since last post? This is for application-side processing where quite possibly no such Sql Server exists. (or is potentially unreachable due to flaky network conditions, such as an ad-hoc mesh network in volatile terrain) The talk of Microsoft's implementation makes me think this is a case of Closed-Source current implementations not being made Open-Source, so we'd have to reimplement all of the spatial logic, which does sound like quite the task. I'm using the STIntersects() among others, which I expect to be among the "... not simple-to-implement" features. I'm not so sure about calling .Net Framework v 4.6.1 code from a .Net 5 context, or whether that'll work inside a docker container. |
I'm trying to port over a .NET Framework class library to .NET Standard. I'm using your package for Microsoft.SqlServer.Types, as the Microsoft package doesn't support .NET Standard. However, the STAsBinary method seems to be missing from your implementation:
value = ToHexString(((SqlGeography)parameter.Value).STAsBinary().Value);
The text was updated successfully, but these errors were encountered: