Questions tagged [nettopologysuite]

NetTopologySuite is a direct-port of all the functionalities offered by the [JTS] Topology Suite

NetTopologySuite is a direct-port of all the functionalities offered by the JTS Topology Suite. NTS exposes JTS in a '.NET way', as example using Properties, Indexers etc...

An excerpt from the JTS website explains the capabilities of NetTopologySuite:
"The JTS Topology Suite is an API for modelling and manipulating 2-dimensional linear geometry. It provides numerous geometric predicates and functions. JTS conforms to the Simple Features Specification for SQL published by the Open GIS Consortium."

138 questions
0
votes
0 answers

InvalidCastException after upgrading to EF Core 5.0

I've just upgraded my project from .NET Core 3.1 to .NET 5.0 and updating all packages to the latest version. All built fine, but now I'm having trouble loading some entities, getting this error: Unable to cast object of type…
Jordan Wallwork
  • 3,116
  • 2
  • 24
  • 49
0
votes
1 answer

EF Core : How can I Create Geometry by Parsing Spatial Data

I had a requirement of storing static spatial data with some polygons, I imported GeoJson into my SQL Server to massage secondary data, once I had the correct data I exported my data into a Json (using FOR JSON PATH). Now since geometry is a CLR…
0
votes
1 answer

Error after deploy to Azure: "The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect."

I'm developing app in .NET Core 3.1 with Visual Studio 2019 and everything works fine on my local machine with Windows 10 Pro. But after deploy to Azure this problem occurs: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol…
Piotrek
  • 1,304
  • 8
  • 16
0
votes
1 answer

Trying to create a Circle on a Map using NetTopologySuite but the circle covers the entire Earth

I'm trying to learn how to use NetTopologySuite (for .NET) but creating a simple circle which is going to be my search area. When I do this using the .Buffer() method, the shape created covers the entire planet Earth. var geographyFactory =…
Pure.Krome
  • 84,693
  • 113
  • 396
  • 647
0
votes
1 answer

.NET TopologySuite Polygon Enlargement

We are using the .NET TopologySuite to solve various tasks to do with Geometries such as Polygons. However, we are stuck in trying to find a way for when given a polygon, how do you expand/enlarge that same polygon by say an amount such a 1 km/100…
user2981411
  • 859
  • 12
  • 34
0
votes
0 answers

C# NetTopology CoordinateValue Infinite Loop

I try to make an OData-API supporting spatial Queries. I build my model, with a database-first approach (from PostGresql) including a PostGIS - Column. It seems to import it correctly, having this in DBContext: entity.Property(e =>…
0
votes
1 answer

Hot to get a Geojson string from entity?

public class City { public int Id { get; set; } public string Name { get; set; } public Geometry Location { get; set; } } My entity framework entity City type has a Geometry property. I am getting data like following: public class…
barteloma
  • 6,403
  • 14
  • 79
  • 173
0
votes
1 answer

NetTopologySuite.Core 1.15.3 and distance units

I want to "convert" cartesian coordinates of distance to meters. I added I try to use the following code: return new PagedList(query.Select(p => new…
Oleg Sh
  • 8,496
  • 17
  • 89
  • 159
0
votes
1 answer

how can you convert KML to WKT in c#?

I can easily convert WKT to KML using the nettopologysuite, with something like: WKTReader wktR = new WKTReader(); GeoAPI.Geometries.IGeometry geom = wktR.Read(wktString); KMLWriter writer = new KMLWriter(); string kml = writer.Write(geom); but i…
Phil
  • 1,852
  • 2
  • 28
  • 55
0
votes
1 answer

How to use R-Tree of NetTopologySuite in GMap.NET to display abundant marker WPF

I am using GMap.NET to display a lot of Marker (about more than 10.000 markers). R-Tree is a solution to optimize render markers at area which window is showing. STRtree in NetTopologySuite is a library to support R-tree. But I'm not sure it…
user7241370
0
votes
0 answers

Using Buffer in meters with spatial Linq

I'm trying to use LINQ with SQL server net core 2.2 to get a buffer around a line representing a route as a Geography type line. Journey is a table which holds details of a route in JourneyAsGeogLine represented a s a Geography line (SRID 4326). …
Martin
  • 45
  • 1
  • 5
0
votes
1 answer

Setup Spatial data in .net core

How do I setup NetTopologySuite in .net core 2.2? I have this already in startup.cs services.AddDbContext(options => …
raklos
  • 28,027
  • 60
  • 183
  • 301
0
votes
2 answers

Computing an event offset using NetTopologySuite?

Does NetTopologySuite have the tools necessary to compute a point a given distance along and away from a polyline offset in a perpendicular direction? This would be for placing signs on a map that are described as 3.1 miles along route 242, 50 feet…
Corey Alix
  • 2,694
  • 2
  • 27
  • 38
0
votes
2 answers

npgsql with NetTopologySuite can't write 3D point

I'm trying to write a 3d point (and linestring) to a database table using npgsql with NetTopologySuite. I'm using last release (4.0.3), as apparently has resolved issue #1906. My code: NpgsqlConnection conn = new NpgsqlConnection (…
0
votes
1 answer

how merge polygons with nettopologysuite?

I have to merge a set of polygons creating a new polygon. Sometimes happens that I have small holes among polygons, so when I try to merge them I receive an error. How can I detect this and solve? Update with some error samples side location…
Luca Morelli
  • 2,530
  • 3
  • 28
  • 45
1 2 3
9
10