It's better to use:
double lon = -105.0;
double lat = 40.0;
GeometryFactory geometryFactory = new GeometryFactory(new
PrecisionModel(),8307);
Geometry point = geometryFactory.createPoint(new
Coordinate(lon,lat));
In general you should use the create methods on GeometryFactory to
create geometries. (At some point in the future this will become
mandatory...)
John Cartwright wrote:
Hello All,
I'm trying to construct a geometry representing a simple point - x, y
values along w/ a SRID. Is the correct approach something like the
following or is there a better way?
double lon = -105.0;
double lat = 40.0;
Coordinate[] coordinates = new Coordinate[] {new
Coordinate(lon,lat)};
CoordinateSequence coordinateSequence = new
CoordinateArraySequence(coordinates);
GeometryFactory geometryFactory = new GeometryFactory(new
PrecisionModel(),8307);
Geometry point = new Point(coordinateSequence,geometryFactory));
Thanks!
-- john
_______________________________________________
jts-devel mailing list
jts-devel@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jts-devel
--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022
_______________________________________________
jts-devel mailing list
jts-devel@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jts-devel