Hi Liz
Thank you but is not working.
Please can you tell me what's wrong?
I have points in a database an want to create the polyline object (polylne is in MapInfo)
'Geometry constructionlo_MIDPoints(0) = New MapInfo.Geometry.DPoint(1, 100)
lo_MIDPoints(1) = New MapInfo.Geometry.DPoint(2, 200)
lo_MIDPoints(2) = New MapInfo.Geometry.DPoint(3, 300)
lo_MI_Geometry = New MapInfo.Geometry.MultiCurve(MapControl1.Map.GetDisplayCoordSys, CurveSegmentType.Linear, lo_MIDPoints,
First question: The multiCurve geometry is the correct geometry to construct the "polyline:"?--------------------------------------------------------------------------------------
'Loop to know coordinate of each nodeFor Each oCurve As Curve In lo_MI_Geometry
For Each oSegment As LineString In oCurve
'oSegment.StartPoint
'oSegment.EndPoint
Next
Next
Why can' get each segment and their coordinates? In this case return me only one segment when in fact I have 3 points.! So I shoud get 2 segments right?
Segment 1, from 1,100 to 2,200
Segment 2, from 2,200 to 3,300
Thank you!
------------------------------
Alejandro Hernandez
Information Technology & Services
ITS SA (GBD)
Buenos Aires
------------------------------
Original Message:
Sent: 01-24-2020 04:20
From: Liz Walker
Subject: How to know if a MultiCurve objets has more than one node in the same location?
Hi Alejandro,
To extract the points you need to loop through each Curve within the MultiCurve, then within each curve loop through each segment which is actually a line string which will give you start and end points
e.g.
MultiCurve myMultiCurve foreach (var curve in myMultiCurve ) { foreach (var segment in curve) { var x = segment.StartPoint.x; var y = segment.StartPoint.y; } }
------------------------------
Liz Walker
Original Message:
Sent: 01-22-2020 15:42
From: Alejandro Hernandez
Subject: How to know if a MultiCurve objets has more than one node in the same location?
Hi Peter
I am using MapXtreme 8.1
Is this the correct forum?
Thank you
------------------------------
Alejandro Hernandez
Information Technology & Services
ITS SA (GBD)
Buenos Aires
Original Message:
Sent: 01-22-2020 07:42
From: Peter Horsbøll Møller
Subject: How to know if a MultiCurve objets has more than one node in the same location?
Hi Alejandro,
What software are you using? MapInfo Pro or MapXtreme?
If you are using MapBasic, I'd recommend that you post your questions in the MapInfo Pro Developers User Group instead.
You will have more people looking at your question that know about developing with MapInfo Pro using MapBasic, .NET or even Python.
------------------------------
Peter Horsbøll Møller
Distinguished Engineer
Pitney Bowes Software & Data
Original Message:
Sent: 01-22-2020 05:24
From: Alejandro Hernandez
Subject: How to know if a MultiCurve objets has more than one node in the same location?
Hi,
I can solve this is anyone shows me how to extract nodes coordinates of each node
Thank you!
------------------------------
Alejandro Hernandez
Information Technology & Services
ITS SA (GBD)
Buenos Aires
------------------------------