David, Buffering in Geographic Coordinate Systems is a well know problem. Distance is not uniform in latitude. Even ESRI only recently provided support for it. I Recommend you convert to a projected coordinate system such as UTM and do the buffer analysis. Oracle may be doing something like that, but I wouldn't trust the answer without checking.
regards, Larry Becker On Wed, Feb 11, 2009 at 10:18 AM, Davis Ford <[email protected]>wrote: > Hi, > > If I have an Oracle table with an SDO_GEOMETRY column, and I insert a > point into it - example: > > MDSYS.SDO_GEOMETRY(2001, 8307, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1, > 1), MDSYS.SDO_ORDINATE_ARRAY(-82.90755596903085, 42.40409951227155)) > > Then I can use the SDO_GEOM.SDO_BUFFER function to get a buffer around > it (and specify the units in miles) -> > > // 1.5 miles, 0.5 tolerance > SELECT SDO_GEOM.SDO_BUFFER(a.geometry, 1.5, 0.5, 'unit=mile') geom > FROM MY_TABLE a.id = 1; > > Simple enough, but how do I do the same thing in JTS? If I try the > following: > > Geometry point = new WKTReader().read("POINT(-82.90755596903085 > 42.40409951227155)"); > > // question1: should I set the SRID? Oracle uses 8307 for WGS:84, but > JTS seems to ignore SRID in calculations, is this true? > > // question2: what units does buffer take? I make the assumption of > meters, but this is wrong > > // try converting 1.5 miles to meters > double meters = 2414.016 > Geomtry buffer = point.buffer(meters); > > This is very wrong since it gives me polygon with coordinates that are > outside -180/180, -90/90. Do I assume then that buffer takes radians > I guess? > > I'm just trying to accomplish the same thing I can do in Oracle above with > JTS. > > Thanks in advance, > 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 > -- http://amusingprogrammer.blogspot.com/
_______________________________________________ jump-users mailing list [email protected] http://lists.refractions.net/mailman/listinfo/jump-users
