Skip to content

Wrong type for return and parameters #2

@InkosiZhong

Description

@InkosiZhong

Hi, I recently loaded your package in another project and I get some errors when I run it.
I'm new to golang. I suspect that rtreego has related updates that modified the type of return and parameters, and this project is not adapted.
I'm wondering if there is an easy fix? Or maybe I can rolling back to a certain version of rtreego? (which version?)
Thank you so much.

Environment:
Ubuntu 20.04
go1.19.1

# github.com/mitroadmaps/gomapinfer/common
../go/src/github.com/mitroadmaps/gomapinfer/common/graph_rtree.go:16:9: cannot use rect (variable of type rtreego.Rect) as type *rtreego.Rect in return statement
../go/src/github.com/mitroadmaps/gomapinfer/common/graph_rtree.go:38:41: cannot use RtreegoRect(rect) (value of type *rtreego.Rect) as type rtreego.Rect in argument to rtree.tree.SearchIntersect
../go/src/github.com/mitroadmaps/gomapinfer/common/graph_rtree.go:41:14: impossible type assertion: spatials[i].(*edgeSpatial)
	*edgeSpatial does not implement rtreego.Spatial (wrong type for Bounds method)
		have Bounds() *rtreego.Rect
		want Bounds() rtreego.Rect
../go/src/github.com/mitroadmaps/gomapinfer/common/graph_rtree.go:49:16: cannot use &edgeSpatial{…} (value of type *edgeSpatial) as type rtreego.Spatial in argument to rtree.Insert:
	*edgeSpatial does not implement rtreego.Spatial (wrong type for Bounds method)
		have Bounds() *rtreego.Rect
		want Bounds() rtreego.Rect

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions