by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 19:15
    ranouf reopened #281
  • Jan 31 2019 19:15
    ranouf commented #281
  • Jan 30 2019 17:14
    ranouf closed #281
  • Jan 30 2019 17:14
    ranouf commented #281
  • Jan 27 2019 11:21
  • Jan 25 2019 08:28
    FObermaier commented #281
  • Jan 25 2019 08:12
    FObermaier labeled #281
  • Jan 25 2019 08:12
    FObermaier commented #281
  • Jan 23 2019 20:53
    ranouf opened #281
  • Jan 21 2019 04:08
  • Jan 19 2019 18:12
    roji commented #233
  • Jan 19 2019 14:19
    YohDeadfall commented #280
  • Jan 19 2019 13:29
    airbreather commented #233
  • Jan 19 2019 13:26
    airbreather commented #233
  • Jan 19 2019 13:26
    airbreather commented #233
  • Jan 19 2019 11:17
    airbreather unlabeled #233
  • Jan 19 2019 11:17
    airbreather unlabeled #280
  • Jan 19 2019 11:17
    airbreather labeled #280
  • Jan 19 2019 11:13
    airbreather opened #280
  • Jan 17 2019 00:41
Jeremy Kolb
@kjeremy
I'm not sure if there's something weird with my project or the nuget packages but there seems to be a secret sauce to installing the correct combination of nuget packages
NetTopologySuite.dll doesn't seem to exist
Jeremy Kolb
@kjeremy
I figured it out. I had to reference something in the NetTopologySuite directory
arnaudHerontrack
@arnaudHerontrack
Hi all
I'm looking for some support regarding the use of NTS with EF Core 2.2 and sql server. May I assume that I'm in the right place ?
arnaudHerontrack
@arnaudHerontrack
When trying to use Intersects function on a IQueryable, I got an SqlException...
SqlException: A .NET Framework error occurred during execution of user-defined routine or aggregate "geography":
System.FormatException: One of the identified items was in an invalid format.
2 days I'm searching on that and I have no clue...
please help
Felix Obermaier
@FObermaier
I assume you are using a polygon for the intersect predicate? If so it almost certainly has the wrong orientation of rings. Call Reverse() on it before using it as argument.
arnaudHerontrack
@arnaudHerontrack
Thanks for the answer. Nope, I already check that IsCCW property and reverse my polygon if necessary. In the meantine, I have bypassed my problem by using the distance function because polygon for the intersect was actually a circle (buffer made from a point) but if would still be nice to have a solution for a future case...
Here you can have more detail on what I do :
https://groups.google.com/forum/#!topic/nettopologysuite/PZ6sHeA3XJY
steveoh
@steveoh
hello folks
i see this is not a very active room
bummer
can anyone tell me what happened to NamedCrs.cs?
did that get refactored into geoapi somewhere or trashed
steveoh
@steveoh
@airbreather i see you commented about the NamedCRS stuff back in the day, (NetTopologySuite/NetTopologySuite#191, https://github.com/NetTopologySuite/NetTopologySuite.IO.GeoJSON/pull/15), and have worked on the *.Feature repo for geojson
did you decide to remove crs from the geojson because it was removed from the spec re: https://github.com/NetTopologySuite/NetTopologySuite/issues/191#issuecomment-390185234
ogr2ogr still uses the crs on geojson so it's a bummer if it was indeed "temporary"
steveoh
@steveoh

the spec does state

However, where all involved parties have a prior arrangement, alternative coordinate reference systems can be used without risk of data being misinterpreted.

Joe Amenta
@airbreather
@steveoh the primary motivation for me pushing to remove the CRS-related code from the NetTopologySuite.Features project as part of the suite of v2 breaking changes was to focus that project on things that are common across multiple data providers (as this is used by GeoJSON, Shapefile, and GPX). CRS-related stuff was very specific to GeoJSON (edit: and even there, it was removed in the IETF's version of the spec, so it was of limited utility anyway)
In theory, you should still be able to examine the CRS info, albeit not strongly-typed, via the .Attributes edit: this may not actually be true: I don't recall, but I think we don't necessarily lift arbitrary extra properties of the feature itself onto the .Attributes...

However, where all involved parties have a prior arrangement, alternative coordinate reference systems can be used without risk of data being misinterpreted.

FWIW, this is true regardless of the presence / absence of explicit CRS info; the NamedCRS stuff was there to make sure that your coordinates are interpreted correctly in cases where you don't have a prior arrangement

Joe Amenta
@airbreather
All that said, I don't think it's unreasonable to imagine adding special-case handling for CRS attributes to the GeoJSON project, if there's demand for it, but I would want to be somewhat careful not to explode if something looks a lot like the pre-IETF "crs" member, but it doesn't strictly follow the pre-IETF spec for it, since those are still legal IETF-era GeoJSON documents per §6.1
steveoh
@steveoh
thanks @airbreather, is there anything in NTS or GeoAPI for looking up URNs to SRID's?
MarcoGiorgi
@MarcoGiorgi
Does anyone knows how to remove the bbox field from the GeoJSON produced by serializing a FeatureCollection object? (as the features are all points, the bbox is completely useless and increase the size of the GeoJSON)
Joe Amenta
@airbreather

thanks @airbreather, is there anything in NTS or GeoAPI for looking up URNs to SRID's?

Not that I know of

Joe Amenta
@airbreather
@MarcoGiorgi assuming that you're not setting the static Feature.ComputeBoundingBoxWhenItIsMissing variable to true, we shouldn't be writing out a non-null bbox unless you actually set the value of FeatureCollection.BoundingBox yourself, to something non-null. If it's writing out "bbox": null and you don't want it to, consider setting JsonSerializerSettings.NullValueHandling to NullValueHandling.Ignore instead of NullValueHandling.Include
MarcoGiorgi
@MarcoGiorgi
@airbreather Many thanks, you gave me very useful information. I've set the JsonSerializerSettings.NullValueHandling to Ignore, and now the computed bbox is not showing anymore. Thanks again, best
badjo-5
@badjo-5
Hi, I have a simple question: in a small geodetic application I made (CAD AddIn), I create a topology with plots. So far I have made an almost complete application. One of the things that bothers me is that I didn't find the method/property or whatever it's called the create/find outer edge created by the polygonizer class. I get polygon plots, areas, then overlay the plots polygon with polyline or polygon (zones are defined by the polyline/polygon), but I can't get the outer edge/shell of the whole polygonizer object. I'm sure this is more than a trivial thing, but I'm stuck ... I'm using an older version of NTS (1.10). I don't know if that's the problem or it's me again...
Felix Obermaier
@FObermaier
@badjo-5 geom.Boundary is what you are looking for, or polygon.Shell.Boundary.
Why do you have a constraint on v1.10? That is very old.
badjo-5
@badjo-5
Clients have older software, so I'm doomed to Framework 4. Basically most CAD programs run on/with Framework 4, which means that an older version of NTS is enough for me.
I don't think we understand each other, I know how to get a shell for an individual polygon, I'm interested in the external polygon of the whole polygon object:
Polygonizer parcels = new Polygonizer ();
parcels.Add (geomOfParcel);
parcels.ExternalShell is what I'm trying to get (thick line surounding all parcels)
image.png
Felix Obermaier
@FObermaier
You need to union your geometries. NetTopologySuite.Operation.Union.UnionOp is the class you are looking for.
badjo-5
@badjo-5
image.png

One picture speaks more than a hundred words

Thanks a lot!!!!

Bramford Horton
@bramford
How do I create a Circle?
Ah... Nevermind, I found it: NetTopologySuite.Utilities.GeometricShapeFactory.CreateCircle
Adam Schaible
@aschaible
@bramford Did you find a convenient way to generate a circle for use with GPS applications based upon a coordinate and radius distance?
Or … could anyone provide guidance? I feel like this should be simple and I’m missing something obvious. My apologies.
Adam Schaible
@aschaible
I don’t know enough about geospatial - but I could convert distance into decimal degrees and use that I suppose.. but wouldn’t that create an ellipse due to the earth being an imperfect circle? Maybe that’s ‘correct’? Thanks in advance for any information.
Bramford Horton
@bramford
@aschaible Yes, I did. I'll paste some code shortly
@aschaible
var factory = new NetTopologySuite.Utilities.GeometricShapeFactory();
var center = new NetTopologySuite.Geometries.Coordinate(-122.38646, 47.98736);
var topLeft = new NetTopologySuite.Geometries.Coordinate(center.X - 0.01, center.Y + 0.01);
var bottomRight = new NetTopologySuite.Geometries.Coordinate(center.X + 0.01, center.Y - 0.01);
var env = new NetTopologySuite.Geometries.Envelope(topLeft, bottomRight);
factory.Envelope = env;
// Approximated polygon from circle/ellipse
var circle = factory.CreateEllipse();
Bramford Horton
@bramford
To explain, this example takes a point as the "center" and then creates two points to be the top-left and bottom-right corners of a bounding box (aka envelope). The last step is to draw a circle/ellipse that fills the bounding box.
Adam Schaible
@aschaible
@bramford wow nice, thank you!
Stijn Herreman
@stijnherreman
I'm adding IEnumerable<T> support to the shapefile module, but ShapefileDataReader (combining the .dbf and the .shp files) would be an IEnumerable<System.ComponentModel.ICustomTypeDescriptor> or an IEnumerable<NetTopologySuite.IO.RowStructure> if that type is made public. So it's not really an improvement over the current non-generic IEnumerable, the API needs an overhaul. What would be a good way to discuss such an overhaul? Should I make a proposal first?
Stijn Herreman
@stijnherreman