Package com.vividsolutions.jts.generator

Examples of com.vividsolutions.jts.generator.MultiGenerator


    PolygonGenerator pgc = new PolygonGenerator();
    pgc.setGeometryFactory(geometryFactory);
    pgc.setGenerationAlgorithm(PolygonGenerator.BOX);
    pgc.setNumberPoints(1000);
    pgc.setNumberHoles(4);
    MultiGenerator pg = new MultiGenerator(pgc);
    pg.setBoundingBox(new Envelope(0,10,0,10));
    pg.setNumberGeometries(3);
    pg.setGeometryFactory(geometryFactory);
   
    MultiPolygon pt = (MultiPolygon) pg.create();
//    System.out.println((pt==null?"NULL":pt.toString()));

    GMLWriter out = new GMLWriter();
    out.setPrefix(null);
    out.write(pt,getWriter());
View Full Code Here


    PolygonGenerator pgc = new PolygonGenerator();
    pgc.setGeometryFactory(geometryFactory);
    pgc.setGenerationAlgorithm(PolygonGenerator.BOX);
    pgc.setNumberPoints(100);
    pgc.setNumberHoles(100);
    MultiGenerator pg = new MultiGenerator(pgc);
    pg.setBoundingBox(new Envelope(0,10,0,10));
    pg.setNumberGeometries(3);
    pg.setGeometryFactory(geometryFactory);
   
    MultiPolygon pt = (MultiPolygon) pg.create();
//    System.out.println((pt==null?"NULL":pt.toString()));

    GMLWriter out = new GMLWriter();
    out.setPrefix(null);
    out.write(pt,getWriter());
View Full Code Here

   */
  public void testSingleMultiLineStringRoundTrip() throws SAXException, IOException, ParserConfigurationException{
    LineStringGenerator pgc = new LineStringGenerator();
    pgc.setGeometryFactory(geometryFactory);
    pgc.setNumberPoints(10);
    MultiGenerator pg = new MultiGenerator(pgc);
    pg.setBoundingBox(new Envelope(0,10,0,10));
    pg.setNumberGeometries(3);
    pg.setGeometryFactory(geometryFactory);
   
    MultiLineString pt = (MultiLineString) pg.create();

    GMLWriter out = new GMLWriter();
    out.setPrefix(null);
    out.write(pt,getWriter());
   
View Full Code Here

    LineStringGenerator pgc = new LineStringGenerator();
    pgc.setGeometryFactory(geometryFactory);
    pgc.setNumberPoints(1000);
    pgc.setGenerationAlgorithm(LineStringGenerator.HORZ);
    MultiGenerator pg = new MultiGenerator(pgc);
    pg.setBoundingBox(new Envelope(0,10,0,10));
    pg.setNumberGeometries(3);
    pg.setGeometryFactory(geometryFactory);
   
    MultiLineString pt = (MultiLineString) pg.create();
//    System.out.println((pt==null?"NULL":pt.toString()));


    GMLWriter out = new GMLWriter();
    out.setPrefix(null);
View Full Code Here

   * @throws SAXException
   */
  public void testSingleMultiPointRoundTrip() throws SAXException, IOException, ParserConfigurationException{
    PointGenerator pgc = new PointGenerator();
    pgc.setGeometryFactory(geometryFactory);
    MultiGenerator pg = new MultiGenerator(pgc);
    pg.setBoundingBox(new Envelope(0,10,0,10));
    pg.setNumberGeometries(3);
    pg.setGeometryFactory(geometryFactory);
   
    MultiPoint pt = (MultiPoint) pg.create();

    GMLWriter out = new GMLWriter();
    out.setPrefix(null);
    out.write(pt,getWriter());
   
View Full Code Here

   */
  public void testSingleMultiPolygonNoHoleRoundTrip() throws SAXException, IOException, ParserConfigurationException{
    PolygonGenerator pgc = new PolygonGenerator();
    pgc.setGeometryFactory(geometryFactory);
    pgc.setNumberPoints(10);
    MultiGenerator pg = new MultiGenerator(pgc);
    pg.setBoundingBox(new Envelope(0,10,0,10));
    pg.setNumberGeometries(3);
    pg.setGeometryFactory(geometryFactory);
   
    MultiPolygon pt = (MultiPolygon) pg.create();

    GMLWriter out = new GMLWriter();
    out.setPrefix(null);
    out.write(pt,getWriter());
   
View Full Code Here

    PolygonGenerator pgc = new PolygonGenerator();
    pgc.setGeometryFactory(geometryFactory);
    pgc.setGenerationAlgorithm(PolygonGenerator.BOX);
    pgc.setNumberPoints(1000);
    MultiGenerator pg = new MultiGenerator(pgc);
    pg.setBoundingBox(new Envelope(0,10,0,10));
    pg.setNumberGeometries(3);
    pg.setGeometryFactory(geometryFactory);
   
    MultiPolygon pt = (MultiPolygon) pg.create();

    GMLWriter out = new GMLWriter();
    out.setPrefix(null);
    out.write(pt,getWriter());
   
View Full Code Here

    PolygonGenerator pgc = new PolygonGenerator();
    pgc.setGeometryFactory(geometryFactory);
    pgc.setGenerationAlgorithm(PolygonGenerator.BOX);
    pgc.setNumberPoints(10);
    pgc.setNumberHoles(4);
    MultiGenerator pg = new MultiGenerator(pgc);
    pg.setBoundingBox(new Envelope(0,10,0,10));
    pg.setNumberGeometries(3);
    pg.setGeometryFactory(geometryFactory);
   
    MultiPolygon pt = (MultiPolygon) pg.create();

    GMLWriter out = new GMLWriter();
    out.setPrefix(null);
    out.write(pt,getWriter());
   
View Full Code Here

   */
  public void testSingleMultiLineStringRoundTrip() throws SAXException, IOException, ParserConfigurationException{
    LineStringGenerator pgc = new LineStringGenerator();
    pgc.setGeometryFactory(geometryFactory);
    pgc.setNumberPoints(10);
    MultiGenerator pg = new MultiGenerator(pgc);
    pg.setBoundingBox(new Envelope(0,10,0,10));
    pg.setNumberGeometries(3);
    pg.setGeometryFactory(geometryFactory);
   
    MultiLineString pt = (MultiLineString) pg.create();
    checkRoundTrip(pt);
  }
View Full Code Here

    LineStringGenerator pgc = new LineStringGenerator();
    pgc.setGeometryFactory(geometryFactory);
    pgc.setNumberPoints(1000);
    pgc.setGenerationAlgorithm(LineStringGenerator.HORZ);
    MultiGenerator pg = new MultiGenerator(pgc);
    pg.setBoundingBox(new Envelope(0,10,0,10));
    pg.setNumberGeometries(3);
    pg.setGeometryFactory(geometryFactory);
   
    MultiLineString pt = (MultiLineString) pg.create();
    checkRoundTrip(pt);
  }
View Full Code Here

TOP

Related Classes of com.vividsolutions.jts.generator.MultiGenerator

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.