Skip to content

Commit

Permalink
Fix the CreatePoint() example (#2404)
Browse files Browse the repository at this point in the history
The Point.CreatePoint() method has two variants:
        public Point CreatePoint(CoordinateSequence coordinates);
        public Point CreatePoint(Coordinate coordinate); 
It does not support a variant that takes two decimals as described in this example. Visual Studio 2019 marks the current version of line 90 as an error.
Rather those decimal values need to be wrapped in a Coordinate object that can be constructed from those values.
I have updated line 90 to reflect this change.
  • Loading branch information
uncheckederror committed Jun 15, 2020
1 parent c3d92af commit 64c309a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entity-framework/core/modeling/spatial.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ You can use constructors to create geometry objects; however, NTS recommends usi

``` csharp
var geometryFactory = NtsGeometryServices.Instance.CreateGeometryFactory(srid: 4326);
var currentLocation = geometryFactory.CreatePoint(-122.121512, 47.6739882);
var currentLocation = geometryFactory.CreatePoint(new Coordinate(-122.121512, 47.6739882));
```

> [!NOTE]
Expand Down

0 comments on commit 64c309a

Please sign in to comment.