Package com.vividsolutions.jts.geom

Examples of com.vividsolutions.jts.geom.PrecisionModel


 
  public void setUp() throws Exception
  {
    super.setUp();
   
    this.geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ), 27700 );
  }
View Full Code Here


 
  public void setUp() throws Exception
  {
    super.setUp();
   
    this.geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ), 27700 );
  }
View Full Code Here

 
  public void setUp() throws Exception
  {
    super.setUp();
   
    this.geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ), 27700 );
   
    // TODO Try using the SimpleFeatureBuilder class.
    GeometryType geometryType = LimbGeneratorTest.Utils.createGeometryType( LineString.class );
    GeometryDescriptor geometryDescriptor = LimbGeneratorTest.Utils.createGeometryDescriptor( geometryType );
    List<AttributeDescriptor> attributeDescriptors = new ArrayList<AttributeDescriptor>();
View Full Code Here

 
  public void setUp() throws Exception
  {
    super.setUp();
   
    this.geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ), 27700 );
    this.processor = new DiscardSmallerLineSegmentsIntersectionProcessor();
  }
View Full Code Here

 
  @Override
  public void write(Object[] input){
    logger.debug("writing "+this.fileName+" ...");
    Geometry[] geometries = (Geometry[])input;
    GeometryCollection coll = new GeometryCollection(geometries, new GeometryFactory(new PrecisionModel(PrecisionModel.FLOATING),4030));
   
    //write geometries
    try{
      shpWriter.skipHeaders();
      shpWriter.write(coll,ShapeType.POLYGON);
View Full Code Here

    String modelStr = args.get("precisionModel");

    if (scaleStr != null) {
      if (modelStr != null && !modelStr.equals("fixed"))
        throw new RuntimeException("Since precisionScale was specified; precisionModel must be 'fixed' but got: "+modelStr);
      precisionModel = new PrecisionModel(Double.parseDouble(scaleStr));
    } else if (modelStr != null) {
      if (modelStr.equals("floating")) {
        precisionModel = new PrecisionModel(PrecisionModel.FLOATING);
      } else if (modelStr.equals("floating_single")) {
        precisionModel = new PrecisionModel(PrecisionModel.FLOATING_SINGLE);
      } else if (modelStr.equals("fixed")) {
        throw new RuntimeException("For fixed model, must specifiy 'precisionScale'");
      } else {
        throw new RuntimeException("Unknown precisionModel: "+modelStr);
      }
View Full Code Here

  @ParametersFactory
  public static Iterable<Object[]> parameters() {
    //try floats
    JtsSpatialContextFactory factory = new JtsSpatialContextFactory();
    factory.precisionModel = new PrecisionModel(PrecisionModel.FLOATING_SINGLE);

    return Arrays.asList($$(
        $(JtsSpatialContext.GEO),//doubles
        $(factory.newSpatialContext())//floats
    ));
View Full Code Here

public class PolygonOverlayFunctions
{

  public static Geometry overlaySnapRounded(Geometry g1, Geometry g2, double precisionTol)
  {
    PrecisionModel pm = new PrecisionModel(precisionTol);
    GeometryFactory geomFact = g1.getFactory();
   
    List lines = LinearComponentExtracter.getLines(g1);
    // add second input's linework, if any
    if (g2 != null)
View Full Code Here

   *            will be written
   * @throws IOException
   */
  private void writeFeature(int i, JsonGenerator jgen, Boolean forcePoints) throws IOException {

    GeometryFactory geometryFactory = new GeometryFactory(new PrecisionModel());

    GeometrySerializer geomSerializer = new GeometrySerializer();

    jgen.writeStartObject();
    {
View Full Code Here

            boolean render = evRenderer.renderEdge(edge, evAttrs);
            if (!render)
                continue;

            Geometry midLineGeom = context.transform.transform(edgeGeom);
            OffsetCurveBuilder offsetBuilder = new OffsetCurveBuilder(new PrecisionModel(),
                    bufParams);
            Coordinate[] coords = offsetBuilder.getOffsetCurve(midLineGeom.getCoordinates(),
                    lineWidth * 0.4);
            LineString offsetLine = geomFactory.createLineString(coords);
            Shape midLineShape = shapeWriter.toShape(midLineGeom);
View Full Code Here

TOP

Related Classes of com.vividsolutions.jts.geom.PrecisionModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.