Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to draw a polygon using center`s gps and long\width\hight ? #508

Open
pai-qi opened this issue Aug 4, 2021 · 3 comments
Open

Comments

@pai-qi
Copy link

pai-qi commented Aug 4, 2021

I konw it can be done using 4 gps , and I generate the 4 gps with centers gps + long\width\height, but it takes too much time, is there another way I dont know ? Thanks

@yujingz
Copy link

yujingz commented Aug 5, 2021

I think you are confusing rectangle/square with polygon, if you think carefully about the definition of polygon, you won't ask this question. My suggestion would be to make a custom layer based off of the polygon layer

Also I don't understand why calculating vertices from center + length, width, and height would be time-consuming, do you have so many bounding boxes? If you care so much about performance, prepare the data in the backend before it hits the front end

@pai-qi
Copy link
Author

pai-qi commented Aug 6, 2021

I think you are confusing rectangle/square with polygon, if you think carefully about the definition of polygon, you won't ask this question. My suggestion would be to make a custom layer based off of the polygon layer

Also I don't understand why calculating vertices from center + length, width, and height would be time-consuming, do you have so many bounding boxes? If you care so much about performance, prepare the data in the backend before it hits the front end

Thanks for your reply.
What I need is to draw the cars on the road, so my first choice is to use XVIZMetadataBuilder. What I get from datasource is a car`s center gps and its length\width\height, this api seems not to support it without coordinate transformation(which takes much time either in frontend or in backend)? Using Deck.gl the interaction with cars will be a big problem, so it is not my first choice.

@twojtasz
Copy link
Contributor

twojtasz commented Jan 2, 2022

The /vehicle_pose represents a point. The default mesh we create this point at the center of the rear axle, however, you can provide your own car prop (see https://avs.auto/#/streetscape.gl/api-reference/react-components/log-viewer?section=car-object-optional-)

And if you prep mesh you can create it as necessary to match your use-case.

The only case that would be awkward is if you have a number of different sizes you need. However, Im sure we can advise a way around that if it was the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants