This isn't JTS-related (except inasmuch as we're using it for handling our geometries) but you guys are pretty knowledgeable so maybe you can point out what I'm doing wrong.
I earlier had the question on how to find distance in lat/lon. The solution we've decided to use (because it's pretty fast and easy) is just to construct a "circular" polygon (a 60-point polygon is close enough to a circle for our purposes) and query ArcGIS Server for all intersecting polygons. The problem is how to construct the circle, since we're working in lat/lon. At first we though it would be easy to just reproject the center point to spherical mercator, draw a circle, and reproject the circle points back to lat/lon. The problem is that doesn't keep the bounds of the circle "correct for what we expect to see". We're viewing the map stretched flat, using web mercator, so vertical distance (in degrees latitude) is a constant (in screen pixels), but Antarctica and Greenland are of course stretched to rediculous widths. What the above technique does is keeps the ratio between width and height correct, but the "wrong" one gets scaled (for what we want). So as you move the circle north from the equator, it gets shorter instead of wider. Would I be better off just writing a function to generate circle points in lat/lon, or did I just pick the wrong projection to use to draw the circle in? Thanks, Jeff _______________________________________________ jts-devel mailing list [hidden email] http://lists.refractions.net/mailman/listinfo/jts-devel |
Jeff,
what size (roughly) is your circle? And, where in the world can it be? _______________________________________________ jts-devel mailing list [hidden email] http://lists.refractions.net/mailman/listinfo/jts-devel |
At the moment the largest circle we'll draw is a 50-mile radius. That might go up but I doubt it would go much beyond 100 mile radius. The smallest is 1-mile radius.
The location is North America.
On Mon, Feb 16, 2009 at 10:53 AM, Paul Uszak <[hidden email]> wrote: Jeff, _______________________________________________ jts-devel mailing list [hidden email] http://lists.refractions.net/mailman/listinfo/jts-devel |
I wound up just doing the math in lat/lon, which works (different math than in a cartesian coord system of course, but I found a couple examples here: http://forum.worldwindcentral.com/showthread.php?t=20688).
On Mon, Feb 16, 2009 at 11:03 AM, Jeff Adams <[hidden email]> wrote: At the moment the largest circle we'll draw is a 50-mile radius. That might go up but I doubt it would go much beyond 100 mile radius. The smallest is 1-mile radius. _______________________________________________ jts-devel mailing list [hidden email] http://lists.refractions.net/mailman/listinfo/jts-devel |
thanks for posting that link Jeff - definitely one for my handy
snippets collection Michael 2009/2/17 Jeff Adams <[hidden email]>: > I wound up just doing the math in lat/lon, which works (different math than > in a cartesian coord system of course, but I found a couple examples here: > http://forum.worldwindcentral.com/showthread.php?t=20688). > _______________________________________________ jts-devel mailing list [hidden email] http://lists.refractions.net/mailman/listinfo/jts-devel |
Free forum by Nabble | Edit this page |