Scanning a polygon like geographical area
I have a geographical area that has a polygon like shape. I want to scan that area with determined steps, say ~25-30 meters per step. I'm using lat/long system. All I need is a way to do this type of scanning. Efficiency is a plus.
Also, If you can help me find a way to pick points on the border of this polygon with the same steps mentioned above.
Not开发者_Go百科e: I don't care for 100% accurate results.
It sounds like you could:
a) Figure out the axis-aligned bounding rectangle for your shape. Overlay that with a uniform grid, test each point in the grid for being interior to your shape. A naive approach like this is sub-optimal, I am sure, but unless your shape is constrained (is it (strictly) convex ? does it have any holes in it ?) then it might be the simplest and most straightforward to implement.
b) You have the end points for each line segment in the boundary of your shape, it's fairly simple to divide each line segment into regular intervals.
Now, you have points specified in latitude and longitude and distances in metres. If the bounding rectangle is small enough (this is a matter of your accuracy requirements but as a rule of thumb I'd suggest that if your bounding box is less than 30 arc-minutes along both sides it's small enough) just plough ahead and treat lat,long as plane coordinates, transform 30m into (local) angular measurement -- and bear in mind that the east-west and north-south angular measurements may not be equal. For most of the populated parts of the Earth this will be accurate enough.
For higher precision, you will need to use some kind of projection, either to transform your geographical coordinates to plane coordinates to agree with your grid specification, or vice-versa (or both, since your inputs are a mix of geographical and plane points).
精彩评论