Different region geometry?

Asked by Greg Howell

I think the answer is probably no, but I need to ask if it is possible to declare a region of a geometry other than a rectangle. For example, could you declare a quadrilateral that is not a rectangle or even more generic any polygon?

Thanks,

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Greg Howell
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Yes, the answer is no ;-)

Everything is based on rectangles only.

Only because I am always curious:
The reason behind your question?

Revision history for this message
Greg Howell (ghowell) said :
#2

That's what I figured from reading all the documentation.

So the product I work on is a surveillance tracking program where you draw a watchbox around an area on a map and it shows tracks (movement) within the watchbox in the form of little red stars that move around. Part of what I need to verify is that the tracks are only displayed inside the watchbox and don't go outside. The watchbox can be drawn as any polygon ( believe it can't be drawn back into itself so it just needs to be an enclosed area of any shape). So I can draw my watchbox as a rectangle and make my region match it, but that won't verify that the software works with other shapes. For example, I can draw an odd shaped quadrilateral that includes a roads intersection and a parking lot area but I'd have to use a region that has much more area than the watchbox and if a track goes outside the watchbox, it will most likely still be within the region and I would still see it as an observation.

Anyway, that's the deal. Thanks for responding.

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of RaiMan
Sent: Tuesday, August 26, 2014 11:52 AM
To: Howell, Greg
Subject: Re: [Question #253637]: Different region geometry?

Your question #253637 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/253637

    Status: Open => Answered

RaiMan proposed the following answer:
Yes, the answer is no ;-)

Everything is based on rectangles only.

Only because I am always curious:
The reason behind your question?

--
If this answers your question, please go to the following page to let us know that it is solved:
https://answers.launchpad.net/sikuli/+question/253637/+confirm?answer_id=0

If you still need help, you can reply to this email or go to the following page to enter your feedback:
https://answers.launchpad.net/sikuli/+question/253637

You received this question notification because you asked the question.

Revision history for this message
RaiMan (raimund-hocke) said :
#3

ok, you are the guy with the onChange observation on the map.

… but I'd have to use a region that has much more area than the watchbox and if a track goes outside the watchbox, it will most likely still be within the region and I would still see it as an observation.

that is true.
But you might ignore matches, that are reported outside such a non-rectangular shape (matchbox) by some algorithm.
I am sure, there are some available libraries, that allow to define such shapes and check, wether a point lies inside or outside.

Revision history for this message
Greg Howell (ghowell) said :
#4

That's a good point. I'm already figuring out the x,y coordinates of the track that occurred so I can write them to a file and I know what the coordinates of the outside of the watchbox is, so I should be able to figure that out with some math.

Thanks!

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of RaiMan
Sent: Tuesday, August 26, 2014 12:52 PM
To: Howell, Greg
Subject: Re: [Question #253637]: Different region geometry?

Your question #253637 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/253637

    Status: Open => Answered

RaiMan proposed the following answer:
ok, you are the guy with the onChange observation on the map.

… but I'd have to use a region that has much more area than the watchbox and if a track goes outside the watchbox, it will most likely still be within the region and I would still see it as an observation.

that is true.
But you might ignore matches, that are reported outside such a non-rectangular shape (matchbox) by some algorithm.
I am sure, there are some available libraries, that allow to define such shapes and check, wether a point lies inside or outside.

--
If this answers your question, please go to the following page to let us know that it is solved:
https://answers.launchpad.net/sikuli/+question/253637/+confirm?answer_id=2

If you still need help, you can reply to this email or go to the following page to enter your feedback:
https://answers.launchpad.net/sikuli/+question/253637

You received this question notification because you asked the question.

Revision history for this message
Greg Howell (ghowell) said :
#5

This problem is resolved as mentioned above in #4. Closing out the ticket.