Skip to main content

Questions tagged [nettopologysuite]

A C#/.NET port of JTS Topology Suite, a Java library for GIS operations, (OpenGIS compliant).

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

How to group a List<LineString> which are connected to each other to a “MultilineString” in NetTopologySuite

I'm using NetTopologySuite and have a lot of lines in a List<LineString> and would like to group them in List<MultiLineString>. Every MultiLineString should contain the LineStrings which ...
NewbieInCSharp's user avatar
0 votes
0 answers
42 views

Add point name and style point layer C# NetTopo DotSpatial

How can I add point name and style? The point layer as blue and ellipse. My code is below: for (int i = 0; i < featureCollection.Count; i++) { List<Coordinate> ...
ayaz's user avatar
  • 1
0 votes
0 answers
49 views

Problem with Triangulation

I have a polygon: POLYGON((10 12,10 8,9 8,9 13,10 13,10 15,11 15,11 13,12 13,12 15,14 15,14 13,15 13,15 8,13 8,13 12,12 12,12 9,11 9,11 12,10 12)) and I need to triangulate it, so what I'm doing is ...
user17952421's user avatar
1 vote
2 answers
184 views

Points and MultiPoints while generating SHP file with NetTopologySuite

I'm trying to generate an SHP file from geometries I have in Postgres DB. Everything goes well with LineString / MultiLineString and Polygon/MultiPolygon, but there is and issue with Point / ...
predefined_'s user avatar
2 votes
0 answers
711 views

NetTopologySuite distance between polygon and point in meters

I want to get distance between polygon and point in meters. When I'm using Distance() method I get it in cartesian units. How can I get in meters? I tried looking for solution but I can get only how ...
Bogdan's user avatar
  • 21
0 votes
1 answer
661 views

How to add a polygon to multipolygon geometry in NetTopologySuite?

I am missing something which seems obvious but does anyone know the answer? I have tried 'Append' method on MultiPolygon with Polygon geometry parameter but nothing happens. Would prefer to preserve ...
Kumbra's user avatar
  • 470
1 vote
1 answer
229 views

Which temporary projection is most suitable for calculating a buffer around a route

To create a buffer around route (for purpose of querying around a route), I figured I need to: convert route points from geographic to planar coordinates calculate a buffer convert result back to ...
zigzag's user avatar
  • 151
1 vote
0 answers
383 views

How can I access PostGIS Topologies with C#?

I would like to access a PostGIS Topology with C#. I looked through the nPgSQL PostGIS/NetTopologySuite Type Plugin but didn't see anything. With the word topology appearing in so many places, I may ...
Kirk Kuykendall's user avatar
-1 votes
2 answers
651 views

Where to find the WKT of a particular co-ordinate system

I'm using ProjNet in my C# application for coordinate conversion that requires WKT of source and target co-ordinate systems. I have googled but didn't find the WKT of MGA2020 Zone 46 [EPSG 7846], ...
Ved's user avatar
  • 11
1 vote
0 answers
164 views

How to write ST_Project method in C# using NetTopologySuite [closed]

I would like to write a method in C# (+NetTopologySuite) which works like ST_Project in PostGIS (https://postgis.net/docs/ST_Project.html). So the argements are: input coordinates, distance, azimuth ...
zsoooc's user avatar
  • 349
0 votes
1 answer
318 views

Storing MultiSurface and PolygonPatches in SQL database - conversion to basic OGC geometry types

I am new to GIS. I am working on a requirement of storing in the database administrative units (states, counties, communities, cities, etc.) as geometries (borders / areas) in order to be able to make ...
Sebastian Widz's user avatar
0 votes
2 answers
688 views

How to seralize ArcGIS JSON to .Net core object?

I want to get ArcGIS JSON response (like here) from server and save it to my database. I am using .Net core and entity framework net topologysuite for CRUD operations database. But I coud not convert ...
barteloma's user avatar
  • 1,704
1 vote
1 answer
255 views

Two identical geography objects produce different STIntersects results in SQL Server 2019

Consider I have two POLYON geography object, @g1 and @g2. One from WKT and the other one converted from binary: DECLARE @g1 geography = 'POLYGON ((-45.70072144031528 70.79588950876575,-45....
noelex's user avatar
  • 111
0 votes
1 answer
307 views

Converting lat/long to northing/easting given data from a .prj file [duplicate]

I have been given the a file containing a bunch of lat long coordinates along with this information that came from a ".prj" file alongside a ".shp" file: GEOGCS["GCS_GDA_1994&...
Hamish's user avatar
  • 101
0 votes
0 answers
334 views

Simplifying a polygon, result must contain original

I have some high-res polygons, without enclaves or exclaves that I want to simplify or smooth without loosing any part of the original. Using NettopologySuite I could do polygon.Buffer(x) and then ...
user2591351's user avatar
1 vote
1 answer
454 views

How to cut segments of a LinearRing with another Geometry using NETTopologySuite?

I have two linear rings, A (green) and B (red). I want to include all intersection points between two geometries in A. In fact what I need is (A-B)+(A.B) (or maybe just A+(A.B)), but those operations ...
saastn's user avatar
  • 111
2 votes
1 answer
1k views

Can't convert a WKT with a Z value into a SQL Geometry value

I'm using nettopologysuite in c# to build a nettopology geometry object, and then save it as a geometry object in SQL. Generally this works fine, except i recent came up with (from a shapefile) the ...
Phil's user avatar
  • 336
3 votes
2 answers
2k views

Get Geometry object from Envelope in NetTopologySuite

I've built some code to take multiple geometries and merge them into one envelope, but now I need to convert that envelope into a polygon/IGeometry shape that represents that area. Is there a way to ...
Phil's user avatar
  • 336
-1 votes
1 answer
970 views

NetTopologySuite: How to convert Polygon into LineString?

I have a load of GeoJSON which represents roads that are defined as Polygons in the data. I wish to convert them into a simpler representation so as to reduce the amount of noise in the presentation. ...
Ian Newson's user avatar
1 vote
0 answers
275 views

How to convert "linear" polygons to lines using NetTopologySuite?

If I have set of polygons representing country rivers, how to convert them to their linear representation using NetTopologySuite. I did some digging but i was unable to find exact function like Create ...
watbywbarif's user avatar
0 votes
1 answer
847 views

Merge feature data rows of a shapefile

I'm using NetTopologySuite to read a shapefile like below code: private FeatureDataTable GetFeatureTableFromShapefile(string shapeFilePath) { GeoAPI.GeometryServiceProvider....
kamal hamidi's user avatar
3 votes
2 answers
5k views

Using SqlGeometry.MakeValid to get a counter-clockwise polygon in SQL Server

The data I've loaded from a shapefile into a geometry column in SQL Server (using NetTopologySuite) is not producing valid GeoJSON when I export it because it doesn't follow the right-hand rule. I ...
Sean's user avatar
  • 161
2 votes
0 answers
889 views

NearestNeighbour with NetTopologySuite with wgs84

I've got a list of polygons in wgs84 WKB, I read them into NetTopologySuite Igeometries put them into an STRtree and then use the NearestNeighbour function to get the closest polygon to a point (also ...
dibs487's user avatar
  • 408
1 vote
0 answers
109 views

This functionality is not supported by Default spatial service. DevArt dotConnect for PostgreSQL error

I want to get geometry data as binary. Its give me an error {"This functionality is not supported by Default spatial service."}. I am searching but nothing found about it. var ilces = db.MaksIlces....
Ömür Bilgili's user avatar
1 vote
0 answers
141 views

{"Cannot convert value"} error while save geometry data to postgresql table

I want to add a record to postgresql table with DevArt dotConnect for PostgreSQL component. I use Entity Framework 6 and I add a kind of NuGet packages to my project. SharpMap, NetTopologySuite,GeoAPI....
Ömür Bilgili's user avatar
1 vote
0 answers
484 views

Speed up union for tessellating polygons

I'm doing a union of a large number of complicated polygons using nettopologysuite and it is very slow. As these polygons are perfectly tessellating is there something I can do to speed things up? ...
dibs487's user avatar
  • 408
2 votes
1 answer
5k views

How to determine if one polygon is contained in another?

Using the Net Topology Suite, what is the easiest way to determine if one polygon is entirely contained in another? Given two independent polygons, A and B, they may overlap, or they may not. If they ...
Jeff Dege's user avatar
  • 331
6 votes
0 answers
897 views

How to add geometries using EntityFramework 6, EF designer from database, npgsql and postgis?

I have a postgre database with postgis geometries that i would like to access using Entity framework and npgsql. I tried to go for the "EF designer from database" , but when doing so i only get the ...
William's user avatar
  • 249
5 votes
1 answer
4k views

Fixing orientation in Net Topology Suite

I have a MultiPolygon that was created by reading from a GeoJSON string. string geoJson = getGeoJson(); var rdr = new GeoJsonReader(); var multiPolygon = rdr.Read<MultiPolygon>(geoJson); My ...
Jeff Dege's user avatar
  • 331
1 vote
1 answer
503 views

How do I obtain the shape at a specific coordinate using NTS

I'm using the .NET NTS library and have the code together to load a KML file. This gives me an instance of IGeometry. Along with this data being loaded, I also have coordinates that I'd like to look ...
Alexander Trauzzi's user avatar
0 votes
0 answers
1k views

Splitting polygon into three equal parts using NetTopologySuite and C#?

I have a polygon, I want to split it into three equal parts, I have a scenario as below: User must select a vertex on polygon User must add direction to start split on Based on the node and direction ...
Majid Hojati's user avatar
1 vote
2 answers
990 views

NetTopologySuite polygon is not valid

Can anyone tell me why when I load the following polygon into NetTopologySuite its not valid? When I load it the IsValid property is False MULTIPOLYGON(((120.399269 16.46649, 120.397217 16.46594, 120....
Noam's user avatar
  • 113
3 votes
1 answer
205 views

Style geometry in shapefile with NTS

I am using NTS to generate a shapefile based on users' selection of data in a web interface. Each item selected is represented by a linestring and all relevant dbf data is exported nicely and the user ...
timkosi's user avatar
  • 31
13 votes
3 answers
23k views

Transforming point using NetTopologySuite

I'm exploring how we can use NetTopologySuite to address a geoprocessing task. based on some code sample I found, I was able to piece together a sample application that reads a shapefile and checks if ...
DenaliHardtail's user avatar
0 votes
1 answer
2k views

How two add line from point A to B

I am trying to draw a line between two lines. I could create points by using the createPoint Method using System; using System.Collections.Generic; using System.ComponentModel; using System....
newb's user avatar
  • 89
4 votes
1 answer
3k views

How to tell if a line intersects a polygon not only at endpoints?

How do I do this in .net topology suite or jts? Please see image. Any other library that can I run on .NET is fine, or even a general algorithm if there is no option. For example this answer is only ...
Edza's user avatar
  • 143
1 vote
3 answers
2k views

MS Sql Server 2012 UnionAggregate geometry fails in ArcMap [closed]

I have following two geometries. Geometry 1 (G1): MULTIPOLYGON (((148.134707676 -34.1519003565, 148.143738823 -34.1540810687, 148.14648294 -34.1396863245, 148.143196834 -34.1392361445, 148.140859243 ...
RasikaSam's user avatar
  • 111
2 votes
1 answer
2k views

Intersection between two LineString gives "Non-noded intersection"

I am using NTS in my application and I have two line strings which are as follows: Line String 1: LINESTRING (51055.227410858584 52102.041513978584, 51073.39084032347 52096.46568847251, 51183....
Pankaj Sachdeva's user avatar
3 votes
2 answers
7k views

What is the problem with the polygon? Getting a *"found non-noded intersection"* exception error

I am working on a GIS program in which I needed to find the difference between the two polygons so, I decided to used NetTopologySuite (NTS) to find the difference. It seems to be working on some of ...
Pankaj Sachdeva's user avatar
6 votes
2 answers
5k views

Calculate distance of point along a line using NetTopologySuite

I am looking to calculate the distance along a line of a point using NetTopologySuite. Indications are that the distanceOp may have something to do with it, given that I can a point on a line closest ...
Matt B's user avatar
  • 91
4 votes
2 answers
4k views

Get Point at distance on a LineString using NetTopologySuite

I am quite sure there is a function in NTS that actually gets us a point at a distance along a line starting at first vertex. I am using NetTopologySuite version 1.12.1. In Shapely, the python ...
vinayan's user avatar
  • 7,282
20 votes
1 answer
8k views

What is a "non-noded intersection"?

Can someone provide a precise definition of what a "non-noded intersection" is? There are various GIS platforms and toolkits that have errors with this text, and Google search results for this tend to ...
FMM's user avatar
  • 309
2 votes
1 answer
306 views

how to judge the side from a point to a linestring

I'm working with NTS (NetTopologySuite), I get point geometry and a directed linestring, how to judge the side of the point locate with the linestring? one the left side, right side, or just on the ...
billycat's user avatar
  • 311
1 vote
1 answer
1k views

How to convert a CompositeCurve to a NetTopologySuite MultiLineString?

I would like to use NetTopologySuite to convert a CompositeCurve to a MultiLineString. I would like to find some code which shows how to convert this to a MultiLineString: <gml:CompositeCurve ...
ca0v's user avatar
  • 2,951
6 votes
1 answer
10k views

how to reproject the coordinate system from WGS84 to UTM with ProjNET

I'm new to ProjNET and NetTopologySuite, I get some points with Lon/Lat in WGS84, and the distance between two points is not with the unit of meter, so I want to reproject the coordinate system from ...
billycat's user avatar
  • 311
2 votes
1 answer
3k views

How can I make a buffer with xxx meter by NetTopologySuite

I am very new in NetTopologySuite, I work with the coordinatesystem in WGS84 by lon/lat, with the NetTopologySuite. I found the Buffer function to create a buffer with a distance, but how can I make a ...
billycat's user avatar
  • 311
4 votes
2 answers
3k views

Why isn't valid geometry not valid in NetTopologySuite when close to poles?

I have a Polygon which crosses the south pole: Polygon in WKT: POLYGON((5.86826073458095 75.6638564054071,-16.5436836399021 63.2220742891438,-19.3664667294083 59.846221066959,-21.7009816876343 56....
CaptDragon's user avatar
  • 13.3k