Hi, I seem to either not be understanding how to apply #distance( ), or it is just not working as I expect with the params I am giving it.
I used Geotools to project EPSG:4326 to EPSG:2807 http://spatialreference.org/ref/epsg/2807/prettywkt/ so that I could use JTS operations in the cartesian coordinate reference system of 2807 with units in meters. So, here's my converted point: POINT (8337480.054094018 -255908.5492072735) And if I execute: // 1 mile buffer Geometry buffer = point.buffer(1609.344); Here's my polygon buffer: POLYGON ((8339089.398094018 -255908.5492072735, 8339058.475000324 -256222.51664646823, 8338966.894076388 -256524.41849304966, 8338818.17472576 -256802.6528283622, 8338618.03214968 -257046.5272629354, 8338374.157715107 -257246.6698390149, 8338095.923379795 -257395.38918964335, 8337794.021533214 -257486.97011357875, 8337480.054094018 -257517.8932072735, 8337166.086654823 -257486.97011357875, 8336864.184808242 -257395.38918964335, 8336585.9504729295 -257246.6698390149, 8336342.076038357 -257046.5272629354, 8336141.933462277 -256802.6528283622, 8335993.2141116485 -256524.41849304966, 8335901.633187713 -256222.51664646823, 8335870.710094019 -255908.5492072735, 8335901.633187713 -255594.58176807876, 8335993.2141116485 -255292.67992149733, 8336141.933462277 -255014.4455861848, 8336342.076038357 -254770.5711516116, 8336585.9504729295 -254570.42857553207, 8336864.184808242 -254421.70922490364, 8337166.086654823 -254330.12830096824, 8337480.054094018 -254299.20520727348, 8337794.021533214 -254330.12830096824, 8338095.923379795 -254421.70922490364, 8338374.157715107 -254570.42857553207, 8338618.03214968 -254770.5711516116, 8338818.17472576 -255014.4455861848, 8338966.894076388 -255292.67992149733, 8339058.475000324 -255594.5817680788, 8339089.398094018 -255908.5492072735)) What I wanted to measure was the distance between the point and the polygon, which should be close to 1609.344 meters. However, if I do this: double distance = point.distance(buffer); It always returns 0.0 -- what am I doing wrong? Thanks, Davis -- Zeno Consulting, Inc. home: http://www.zenoconsulting.biz blog: http://zenoconsulting.wikidot.com p: 248.894.4922 f: 313.884.2977 _______________________________________________ jump-users mailing list [email protected] http://lists.refractions.net/mailman/listinfo/jump-users
