Questions tagged [geojson.net]

9 questions
5
votes
4 answers

How to serialize and deserialize geojson in C#

Am trying to Deserialize an object to json where the location details should be converted to geojson format. Tried to achieve this using geojson.net nuget package but am not able to acheve the same. There are no examples available for geojson in…
user3625533
  • 339
  • 1
  • 4
  • 20
2
votes
2 answers

Trying to separate two separate strings

I'm trying to return to separate string in this if statement and not as a single string. one as a latitude and the other as longitude static string GeoCoding(string address) { var json = new WebClient().DownloadString(baseUrlGC +…
user20129051
1
vote
0 answers

GeoJSON File Read Exception Handling in .NET?

Getting this error, somewhere, within a 1gb GeoJSON file. System.ArgumentOutOfRangeException: 'According to the GeoJSON v1.0 spec a LineString must have at least two or more positions. (Parameter 'coordinates')' The input file is an open-source US…
Snowy
  • 5,942
  • 19
  • 65
  • 119
0
votes
1 answer

Why Sql server returns 1 for STIntersects where it should return 0?

I have bunch of multipolygons records. Long story short, I have one point that belongs to just one multipolygon. When you visualise that with QGis or similar software that is correct. But sql server returns STIntersects = 1 for not just multipolygon…
pregmatch
  • 2,629
  • 6
  • 31
  • 68
0
votes
0 answers

How to add geojson file for border in Folium in python?

I am trying to draw borders in folium in python by using a geojson but I have an error. What is wrong? import folium from folium import plugins . . bordersStyle={ color': 'black', weight': 2, fillColor': 'blue', fillOpacity': 0.2 }…
0
votes
0 answers

C#: Opening and processing very large GeoJSON file

I'm trying to process a 25GB GeoJSON file using GeoJSON.net The accepted answer here works on a small test file but is causing Memory Exception errors with a large 25GB file There isn't a huge amount of info about how to process the…
Holly
  • 307
  • 1
  • 8
  • 17
0
votes
1 answer

How to add altitude coordinates in Feature Collection then serialize to Geojson

I greatly appreciate for any help, I deserialized GeoJson file into feature collection using GeoJson.Net. Then I get the feature from the feature collection. Inside the feature I can loop and get all the type of geometry. From there I can loop each…
xChaax
  • 193
  • 5
  • 27
0
votes
1 answer

Calculate distance between two GeoJSON features

i'm using GeoJSON.Net library (https://github.com/GeoJSON-Net/GeoJSON.Net) to create some GeoJSON features in my code. Points, multilines etc. All that works fine until i need to calculate distance between some pair of features. This library does…
Dmytro Gokun
  • 405
  • 3
  • 24
0
votes
0 answers

C# StreamReader -> ReadToEndAsync more than twice as slow as ReadToEnd

I'm using a web application to display geojson on Google Maps. I don't wan't to render everything so I'm using an algorithm to only load specific portions of the geojson. The files are fairly large ranging from 5 to 84 MB with a total size of 227…
Ogglas
  • 62,132
  • 37
  • 328
  • 418