Esempio n. 1
0
        private IGeometry GetGeometry(PhysicalNetworkModel.LocationExt location)
        {
            List <Coordinate> points = new List <Coordinate>();

            foreach (var locPt in location.coordinates)
            {
                points.Add(new Coordinate(locPt.X, locPt.Y));
            }

            return(new LineString(points.ToArray()));
        }
Esempio n. 2
0
        public void AddLocation(Guid psrId, PhysicalNetworkModel.LocationExt loc)
        {
            Guid locationId = AddLocation(psrId, Guid.Parse(loc.mRID));

            if (loc.coordinates.Length == 1)
            {
                AddPositionPoint(locationId, 0, loc.coordinates[0].X, loc.coordinates[0].Y);
            }
            else
            {
                int seqNo = 1;
                foreach (var coord in loc.coordinates)
                {
                    AddPositionPoint(locationId, seqNo, coord.X, coord.Y);
                    seqNo++;
                }
            }
        }