Loading go-packages/meep-vis-traffic-mgr/traffic-mgr.go +12 −1 Original line number Diff line number Diff line Loading @@ -863,7 +863,7 @@ func (tm *TrafficMgr) GetPoaCategory(longitude float32, latitude float32) (categ coordinates := "(" + strconv.FormatFloat(float64(longitude), 'E', -1, 32) + " " + strconv.FormatFloat(float64(latitude), 'E', -1, 32) + ")" dbQuery := "SELECT category FROM " + GridTable + " WHERE ST_Contains(" + GridTable + ".grid" + ", 'SRID=4326;POINT" + coordinates + ");" dbQuery := "SELECT category FROM " + GridTable + " WHERE ST_Contains(" + GridTable + ".grid, 'SRID=4326;POINT" + coordinates + "');" var rows *sql.Rows rows, err = tm.db.Query(dbQuery) Loading Loading @@ -892,6 +892,17 @@ func (tm *TrafficMgr) GetPoaCategory(longitude float32, latitude float32) (categ // PopulatePoaLoad - Populate the Traffic Load table func (tm *TrafficMgr) PopulatePoaLoad(poaNameList []string, gpsCoordinates [][]float32) (err error) { // Validate input if poaNameList == nil { err = errors.New("Missing POA Name List") return err } if gpsCoordinates == nil { err = errors.New("Missing GPS coordinates") return err } for i, poaName := range poaNameList { poaLongitude := gpsCoordinates[i][0] poaLatitude := gpsCoordinates[i][1] Loading Loading
go-packages/meep-vis-traffic-mgr/traffic-mgr.go +12 −1 Original line number Diff line number Diff line Loading @@ -863,7 +863,7 @@ func (tm *TrafficMgr) GetPoaCategory(longitude float32, latitude float32) (categ coordinates := "(" + strconv.FormatFloat(float64(longitude), 'E', -1, 32) + " " + strconv.FormatFloat(float64(latitude), 'E', -1, 32) + ")" dbQuery := "SELECT category FROM " + GridTable + " WHERE ST_Contains(" + GridTable + ".grid" + ", 'SRID=4326;POINT" + coordinates + ");" dbQuery := "SELECT category FROM " + GridTable + " WHERE ST_Contains(" + GridTable + ".grid, 'SRID=4326;POINT" + coordinates + "');" var rows *sql.Rows rows, err = tm.db.Query(dbQuery) Loading Loading @@ -892,6 +892,17 @@ func (tm *TrafficMgr) GetPoaCategory(longitude float32, latitude float32) (categ // PopulatePoaLoad - Populate the Traffic Load table func (tm *TrafficMgr) PopulatePoaLoad(poaNameList []string, gpsCoordinates [][]float32) (err error) { // Validate input if poaNameList == nil { err = errors.New("Missing POA Name List") return err } if gpsCoordinates == nil { err = errors.New("Missing GPS coordinates") return err } for i, poaName := range poaNameList { poaLongitude := gpsCoordinates[i][0] poaLatitude := gpsCoordinates[i][1] Loading