269 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
63
views
SQL Server 2019 (v15) : error with creating geography: 24200: The specified input does not represent a valid geography instance
We store PATH in database as it was received from gmaps.
For most it works, but some produce this error. I assume because path does cross itself.
How can I get geometry object from those specific ...
-1
votes
1
answer
107
views
SQL Server STWithin, STIntersects inaccurate [closed]
Here's my setup. I define a polygon and a point close to the middle of that polygon. Using STWithin or STIntersects nothing is returned.
create table #gtest ([Lat] [float], [Lng] [float], [GeoPoint] ...
0
votes
2
answers
77
views
Geography producing incorrect rows
We have a table of approximately 2m UK based data points as long/lat in a table. We have converted the long/lat to a geography data type. we can then query the table for the reference numbers within a ...
0
votes
1
answer
43
views
SqlGeography Web Reference
Is there a way to pass a SqlGeography type (Microsoft.SqlServer.Types) as a web reference?
EDIT. This is a project that I inherited. The web reference generates ASMX files for a WPF project.
In our ...
2
votes
1
answer
167
views
Geography point within polygon showing incorrect results
In my database, I have a table containing a set of Polygons & their attributes and another table containing a set of points that have coordinates within the boundaries of those polygons. I've ...
0
votes
0
answers
89
views
I would like to improve performance for my Snowflake SQL query that contains a Well-Known Text (WKT)
I have a Snowflake query that contains a Well-Known Text (WKT) and I'm trying to improve the performance.
WITH CustomArea AS (
SELECT
"PPPPPP" AS GC,
ROUND(SUM(HP),5) AS ...
1
vote
1
answer
83
views
Microsoft.SqlServer.Types (106.1000.6) raising exception when attempting to retrieve values from a userdefined type
Attempting to migrate away from System.Data.SqlClient, we ran into a snag around operations using SqlGeography objects when dealing with user defined types. In short, I am able to setup and retrieve ...
0
votes
0
answers
74
views
Error accesing Geography data: OutOfMemoryException Microsoft.SqlServer.Types.SridList
I'm getting a weird error on my site, up until this point everything was ok, now I get this error everytime I access a page that queries data that contains geography data (from what I can tell) . I ...
-1
votes
2
answers
229
views
Convert varchar(max) to geography [closed]
I have an SQL table containing multipolygons (country borders) in varchar(max) format.
enter image description here
I want to convert them into geography format so that I can intersect them with ...
0
votes
1
answer
436
views
Using NetTopologySuite, how can I convert meters to degrees?
I have no language preference for an answer; either VB.NET or C# will be fine.
I've seen this problem discussed elsewhere here on SO, for example here and here, but I've not found solutions that ...
0
votes
1
answer
107
views
Error on loading SQL geography type column into Vertica
I was trying to convert latitude and longitude columns which is in float type to geography type in SQL and then load them into Vertica table.
I used the following code to convert the columns into ...
1
vote
1
answer
658
views
Converting Geometry to a Geography yields an Invalid shape
I have two Geometry shapes of types Polygon or MultiPolygon [with Lat & Lng points] that I want to get their intersected shape.
I do this as follows:
land_shape.STIntersection(grid_shape) as shape
...
0
votes
1
answer
220
views
How to find distance from one geographic co-ordinate point to nearest polygon
I want to find the closest distance from one co-ordinate to the nearest end of a region.
Like the image below, how can I calculate the closest distance from red dot to end of the region polygon?
So ...
0
votes
1
answer
333
views
Cross-platform solution to do geography calculations
I'm working on migrating a .Net framework application to .Net Core and I need to support running on Linux.
The application needs to calculate the intersection of polygons and very long lines on the ...
2
votes
2
answers
576
views
SqlGeography.STGeomFromText throw exception when creating Polygon
During creating Polygon it throws execution. I am using library Microsoft.SqlServer.Types latest version 160.
polyText = "POLYGON ((
45.3972179 8.8406638000000157,
45.4215054 8.9151509000000715,
...