Computing an event offset using NetTopologySuite?
up vote
0
down vote
favorite
Does NetTopologySuite have the tools necessary to compute a point a given distance along and away from a polyline offset in a perpendicular direction?
This would be for placing signs on a map that are described as 3.1 miles along route 242, 50 feet from the centerline. I've discovered NetTopologySuite.Geometries.Triangle.PerpendicularBisector, but it's not making much sense to me (seems to return a formula for the perpendicular line).
nettopologysuite
add a comment |
up vote
0
down vote
favorite
Does NetTopologySuite have the tools necessary to compute a point a given distance along and away from a polyline offset in a perpendicular direction?
This would be for placing signs on a map that are described as 3.1 miles along route 242, 50 feet from the centerline. I've discovered NetTopologySuite.Geometries.Triangle.PerpendicularBisector, but it's not making much sense to me (seems to return a formula for the perpendicular line).
nettopologysuite
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Does NetTopologySuite have the tools necessary to compute a point a given distance along and away from a polyline offset in a perpendicular direction?
This would be for placing signs on a map that are described as 3.1 miles along route 242, 50 feet from the centerline. I've discovered NetTopologySuite.Geometries.Triangle.PerpendicularBisector, but it's not making much sense to me (seems to return a formula for the perpendicular line).
nettopologysuite
Does NetTopologySuite have the tools necessary to compute a point a given distance along and away from a polyline offset in a perpendicular direction?
This would be for placing signs on a map that are described as 3.1 miles along route 242, 50 feet from the centerline. I've discovered NetTopologySuite.Geometries.Triangle.PerpendicularBisector, but it's not making much sense to me (seems to return a formula for the perpendicular line).
nettopologysuite
nettopologysuite
asked Nov 14 at 17:27
Corey Alix
1,34221331
1,34221331
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
To get a single point offset off a lineal geometry you should use LocationIndexedLine:
var gf = new NetTopologySuite.Geometries.GeometryFactory();
var l = gf.CreateLineString(new GeoAPI.Geometries.Coordinate
{
new GeoAPI.Geometries.Coordinate(10, 10),
new GeoAPI.Geometries.Coordinate(1000, 10),
});
var lid = new NetTopologySuite.LinearReferencing.LocationIndexedLine(l);
var p = lid.ExtractPoint(500, 10);
p is at (510, 20)
public Coordinate extractPoint(LinearLocation index, double offsetDistance)index- the index of the desired pointoffsetDistance- the distance the point is offset from the segment (positive is to the left, negative is to the right)
– Corey Alix
yesterday
add a comment |
up vote
1
down vote
Yes, probably several ways. One way you could do it is to use a buffer from the center line (look into NetTopologySuite.Operation.Buffer.BufferOp.Buffer), then just find a point 'x' distance along the buffered geometry (NetTopologySuite.Operation.Distance.DistanceOp.Distance)
I see -- or I could buffer the line itself and then look for the closest point from a point on the centerline to the buffered geometry. It seems computationally heavy-handed but it should work.
– Corey Alix
Nov 17 at 11:58
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
To get a single point offset off a lineal geometry you should use LocationIndexedLine:
var gf = new NetTopologySuite.Geometries.GeometryFactory();
var l = gf.CreateLineString(new GeoAPI.Geometries.Coordinate
{
new GeoAPI.Geometries.Coordinate(10, 10),
new GeoAPI.Geometries.Coordinate(1000, 10),
});
var lid = new NetTopologySuite.LinearReferencing.LocationIndexedLine(l);
var p = lid.ExtractPoint(500, 10);
p is at (510, 20)
public Coordinate extractPoint(LinearLocation index, double offsetDistance)index- the index of the desired pointoffsetDistance- the distance the point is offset from the segment (positive is to the left, negative is to the right)
– Corey Alix
yesterday
add a comment |
up vote
1
down vote
accepted
To get a single point offset off a lineal geometry you should use LocationIndexedLine:
var gf = new NetTopologySuite.Geometries.GeometryFactory();
var l = gf.CreateLineString(new GeoAPI.Geometries.Coordinate
{
new GeoAPI.Geometries.Coordinate(10, 10),
new GeoAPI.Geometries.Coordinate(1000, 10),
});
var lid = new NetTopologySuite.LinearReferencing.LocationIndexedLine(l);
var p = lid.ExtractPoint(500, 10);
p is at (510, 20)
public Coordinate extractPoint(LinearLocation index, double offsetDistance)index- the index of the desired pointoffsetDistance- the distance the point is offset from the segment (positive is to the left, negative is to the right)
– Corey Alix
yesterday
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
To get a single point offset off a lineal geometry you should use LocationIndexedLine:
var gf = new NetTopologySuite.Geometries.GeometryFactory();
var l = gf.CreateLineString(new GeoAPI.Geometries.Coordinate
{
new GeoAPI.Geometries.Coordinate(10, 10),
new GeoAPI.Geometries.Coordinate(1000, 10),
});
var lid = new NetTopologySuite.LinearReferencing.LocationIndexedLine(l);
var p = lid.ExtractPoint(500, 10);
p is at (510, 20)
To get a single point offset off a lineal geometry you should use LocationIndexedLine:
var gf = new NetTopologySuite.Geometries.GeometryFactory();
var l = gf.CreateLineString(new GeoAPI.Geometries.Coordinate
{
new GeoAPI.Geometries.Coordinate(10, 10),
new GeoAPI.Geometries.Coordinate(1000, 10),
});
var lid = new NetTopologySuite.LinearReferencing.LocationIndexedLine(l);
var p = lid.ExtractPoint(500, 10);
p is at (510, 20)
answered yesterday
FObermaier
1635
1635
public Coordinate extractPoint(LinearLocation index, double offsetDistance)index- the index of the desired pointoffsetDistance- the distance the point is offset from the segment (positive is to the left, negative is to the right)
– Corey Alix
yesterday
add a comment |
public Coordinate extractPoint(LinearLocation index, double offsetDistance)index- the index of the desired pointoffsetDistance- the distance the point is offset from the segment (positive is to the left, negative is to the right)
– Corey Alix
yesterday
public Coordinate extractPoint(LinearLocation index, double offsetDistance) index - the index of the desired point offsetDistance - the distance the point is offset from the segment (positive is to the left, negative is to the right)– Corey Alix
yesterday
public Coordinate extractPoint(LinearLocation index, double offsetDistance) index - the index of the desired point offsetDistance - the distance the point is offset from the segment (positive is to the left, negative is to the right)– Corey Alix
yesterday
add a comment |
up vote
1
down vote
Yes, probably several ways. One way you could do it is to use a buffer from the center line (look into NetTopologySuite.Operation.Buffer.BufferOp.Buffer), then just find a point 'x' distance along the buffered geometry (NetTopologySuite.Operation.Distance.DistanceOp.Distance)
I see -- or I could buffer the line itself and then look for the closest point from a point on the centerline to the buffered geometry. It seems computationally heavy-handed but it should work.
– Corey Alix
Nov 17 at 11:58
add a comment |
up vote
1
down vote
Yes, probably several ways. One way you could do it is to use a buffer from the center line (look into NetTopologySuite.Operation.Buffer.BufferOp.Buffer), then just find a point 'x' distance along the buffered geometry (NetTopologySuite.Operation.Distance.DistanceOp.Distance)
I see -- or I could buffer the line itself and then look for the closest point from a point on the centerline to the buffered geometry. It seems computationally heavy-handed but it should work.
– Corey Alix
Nov 17 at 11:58
add a comment |
up vote
1
down vote
up vote
1
down vote
Yes, probably several ways. One way you could do it is to use a buffer from the center line (look into NetTopologySuite.Operation.Buffer.BufferOp.Buffer), then just find a point 'x' distance along the buffered geometry (NetTopologySuite.Operation.Distance.DistanceOp.Distance)
Yes, probably several ways. One way you could do it is to use a buffer from the center line (look into NetTopologySuite.Operation.Buffer.BufferOp.Buffer), then just find a point 'x' distance along the buffered geometry (NetTopologySuite.Operation.Distance.DistanceOp.Distance)
answered Nov 17 at 0:25
tval
1027
1027
I see -- or I could buffer the line itself and then look for the closest point from a point on the centerline to the buffered geometry. It seems computationally heavy-handed but it should work.
– Corey Alix
Nov 17 at 11:58
add a comment |
I see -- or I could buffer the line itself and then look for the closest point from a point on the centerline to the buffered geometry. It seems computationally heavy-handed but it should work.
– Corey Alix
Nov 17 at 11:58
I see -- or I could buffer the line itself and then look for the closest point from a point on the centerline to the buffered geometry. It seems computationally heavy-handed but it should work.
– Corey Alix
Nov 17 at 11:58
I see -- or I could buffer the line itself and then look for the closest point from a point on the centerline to the buffered geometry. It seems computationally heavy-handed but it should work.
– Corey Alix
Nov 17 at 11:58
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53305727%2fcomputing-an-event-offset-using-nettopologysuite%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown