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
1 vote
0 answers
35 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 ...
user avatar
0 votes
0 answers
13 views

Connect shortest list of line strings to each other

This is a problem almost the same as my problem but I could not understand R language nor the algorithm he used Suppose I have a list of line strings, I want to connect the green line to the shortest ...
user avatar
-1 votes
2 answers
179 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], ...
user avatar
  • 11
1 vote
0 answers
49 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 ...
user avatar
  • 190
0 votes
0 answers
169 views

NetTopologySuite and feature operations

I'm doing geo spatial work with NetTopoloySuite and C#. In Python (GeoPandas), you can do overlay operations on features (as opposed to on the raw geometries), so you can keep the metadata associated ...
user avatar
  • 161
0 votes
1 answer
83 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 ...
user avatar
0 votes
2 answers
303 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 ...
user avatar
  • 1,624
1 vote
1 answer
117 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....
user avatar
  • 11
0 votes
1 answer
104 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&...
user avatar
  • 101
0 votes
0 answers
88 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 ...
user avatar
1 vote
1 answer
148 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 ...
user avatar
  • 111
2 votes
1 answer
778 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 ...
user avatar
  • 296
3 votes
2 answers
1k 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 ...
user avatar
  • 296
-1 votes
1 answer
426 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. ...
user avatar
1 vote
0 answers
140 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 ...
user avatar
0 votes
1 answer
639 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....
user avatar
3 votes
2 answers
4k 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 ...
user avatar
  • 161
2 votes
0 answers
583 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 ...
user avatar
  • 388
1 vote
0 answers
85 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....
user avatar
1 vote
0 answers
120 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....
user avatar
1 vote
0 answers
343 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? ...
user avatar
  • 388
2 votes
1 answer
4k 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 ...
user avatar
  • 321
6 votes
0 answers
667 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 ...
user avatar
  • 149
4 votes
1 answer
3k 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 ...
user avatar
  • 321
1 vote
1 answer
411 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 ...
user avatar
0 votes
0 answers
800 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 ...
user avatar
1 vote
2 answers
625 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....
user avatar
  • 113
3 votes
1 answer
169 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 ...
user avatar
  • 31
11 votes
3 answers
16k 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 ...
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....
user avatar
  • 89
4 votes
1 answer
2k 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 ...
user avatar
  • 143
1 vote
3 answers
1k 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 ...
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....
user avatar
2 votes
2 answers
5k 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 ...
user avatar
5 votes
2 answers
4k 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 ...
user avatar
  • 81
4 votes
2 answers
3k 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 ...
user avatar
  • 7,024
19 votes
1 answer
6k 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 ...
user avatar
  • 299
2 votes
1 answer
220 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 ...
user avatar
  • 291
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 ...
user avatar
  • 2,841
5 votes
1 answer
9k 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 ...
user avatar
  • 291
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 ...
user avatar
  • 291
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....
user avatar
  • 13.1k