Your question about working in units (say 10km) is an interesting one.
The answer depends on the CoordinateReferenceSystem (since it captures
the definition of what the coordinates mean - including their units).
You will need to take your ground units (km, feet, furlongs etc...) and
convert it to an appropriate distance in the unit your geometry is
measured in.
We use the Java units library (cannot remember the JSR number) in our
CoordinateReferenceSystem definition in order to facilitate these
conversions - while I have done all this for customers before I have not
yet made a code example for the wiki.
Once you have your distance you can use the buffer operation (to make a
new geometry); or the dwithin if you just want to select things that are
within 10 km of your geometry etc.
WGS84 is represented as DefaultGeographicCRS.WGS84 in our library; you
can also use CRS.decode("EPSG:4326") if you like; please pay attention
to the axis order (as it is not always simple x, y ordering).
There are utilities for calculating the distance along the sphere
between two points as well; however in general our topology library
(JTS) only handles cartesian values). A general geotedic library has not
yet been developed in the open source arena. If you have any ideas for
scaring up funding (or grad students) to work on this topic it would be
welcomed both here and in the GEOS project.
Jody
Kamineni, Rajeshwar wrote:
>> I have few simple questions? This could be very silly but all the
>> examples seem like use simple cartesian coordinates.
>>
>> How do I create a circle covering a 10KM radius at a lat/lon (WGS84)
>> using GeoTools API?
>>
>> How do I know the Lat/Lon of a Point Y - Given a Point X, Bearing pi
>> degrees and distance d kms from Point X. I have algorithms on the
>> internet but I am looking for GeoTools API which does that?
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users