Source code:
fire.require(
function(){
var output = $("#output > pre > code");
var pm = new fire.gear.geom.PrecisionModel(fire.gear.geom.PrecisionModel.FLOATING);
var factory = new fire.gear.geom.GeometryFactory(pm);
var c1 = new fire.gear.geom.Coordinate(8, 43, 10);
var pt1 = factory.createPoint(c1);
output.append("POINT: " + pt1.toString() + "<br/>");
output.append("isValid?: " + pt1.isValid() + "<br/>");
output.append("X: " + pt1.getX() + "<br/>");
output.append("Y: " + pt1.getY() + "<br/>");
output.append("Z: " + pt1.getZ() + "<br/>");
output.append("<br/>");
var c2 = new fire.gear.geom.Coordinate(6, 45, NaN);
var pt2 = factory.createPoint(c2);
output.append("POINT: " + pt2.toString() + "<br/>");
output.append("isValid?: " + pt2.isValid() + "<br/>");
output.append("X: " + pt2.getX() + "<br/>");
output.append("Y: " + pt2.getY() + "<br/>");
output.append("Z: " + pt2.getZ() + "<br/>");
output.append("<br/>");
var buffer = pt1.buffer(0.5);
output.append("<b>BUFFER</b>: " + buffer.toString() + "<br/>");
output.append("<br/>");
output.append("POINT1 INTERSECTS BUFFER?: " + pt1.intersects(buffer) + "<br/>");
output.append("POINT2 INTERSECTS BUFFER?: " + pt2.intersects(buffer) + "<br/>");
output.append("<br/>");
var pt3 = pt1.clone();
output.append("CLONED POINT: " + pt3.toString() + "<br/>");
}, {
modules : [fire.Modules.GEAR]
,mode : fire.Mode.BUILD
,otherScripts: []
,relative: "../lib/fire/"
}
);