Questions tagged [nettopologysuite]
A C#/.NET port of JTS Topology Suite, a Java library for GIS operations, (OpenGIS compliant).
45
questions
0
votes
0
answers
19
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> ...
0
votes
0
answers
32
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 ...
1
vote
2
answers
119
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 / ...
2
votes
0
answers
470
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 ...
1
vote
1
answer
181
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 ...
1
vote
0
answers
302
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 ...
-1
votes
2
answers
563
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], ...
1
vote
0
answers
148
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
...
0
votes
1
answer
270
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 ...
0
votes
2
answers
601
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 ...
1
vote
1
answer
228
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....
0
votes
1
answer
247
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&...
0
votes
0
answers
273
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 ...
1
vote
1
answer
364
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 ...
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 ...
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 ...
-1
votes
1
answer
846
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.
...
1
vote
0
answers
233
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 ...
0
votes
1
answer
783
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....
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 ...
2
votes
0
answers
812
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 ...
1
vote
0
answers
107
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....
1
vote
0
answers
134
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....
1
vote
0
answers
450
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?
...
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 ...
6
votes
0
answers
856
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 ...
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 ...
1
vote
1
answer
489
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 ...
0
votes
0
answers
995
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 ...
1
vote
2
answers
910
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....
3
votes
1
answer
198
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 ...
12
votes
3
answers
21k
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 ...
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....
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 ...
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 ...
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....
3
votes
2
answers
6k
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 ...
5
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 ...
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 ...
20
votes
1
answer
7k
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 ...
2
votes
1
answer
287
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 ...
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 ...
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 ...
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 ...
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....