Package chunmap.example.test

Source Code of chunmap.example.test.GeometryTest

/**
* Copyright (c) 2009-2011, chunquedong(YangJiandong)
*
* This file is part of ChunMap project
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
*
* History:
*     2010-05-05  Jed Young  Creation
*/
package chunmap.example.test;

import java.util.List;

import chunmap.example.BaseGeometryMap;
import chunmap.model.geom.Geometry;
import chunmap.model.geom.WktReader;

/**
* @author chunquedong
*
*/
public class GeometryTest extends BaseGeometryMap {

  /**
   * @param args
   */
  public static void main(String[] args) {
    GeometryTest me = new GeometryTest();
    me.init();

  }

  @Override
  protected void addGeometry(List<Geometry> geoms) {
    // WktReader wkt = new WktReader();
    // Geometry g = wkt.read("LineString(0 250,0 100)");
    // geoms.add(g);
    WktReader wkt = new WktReader();
    Geometry g1 = wkt
        .read("LINESTRING(-2.0040035707361197 -0.9999955610463935,-3.9999857319385903 0.9880551094385923,1.0 6.0)");
    Geometry g2 = wkt
        .read("LINESTRING(1.0 6.0,5.999998414659173 1.0039816335536662,1.0079632645824341 -3.999993658637697,-1.8399918576928131 -1.1633555361108505)");
    Geometry g3 = wkt
        .read("LINESTRING(-1.8399918576928131 -1.1633555361108505,-2.0040035707361197 -0.9999955610463935)");

    Geometry g4 = wkt
        .read("LINESTRING(-2.0040035707361197 -0.9999955610463935,-2.639991350383829 -0.9999955610463935,-2.639991350383829 -1.7999950537374092)");
    Geometry g5 = wkt
        .read("LINESTRING(-2.639991350383829 -1.7999950537374092,-1.8399918576928131 -1.7999950537374092,-1.8399918576928131 -1.1633555361108505)");
    Geometry g6 = wkt
        .read("LINESTRING(-2.7207711785272037 -1.8589409557588967,-2.7350278636719665 -1.8311087346837973)");
    Geometry g7 = wkt
        .read("LINESTRING(-2.739953831631839 -1.7999950537374083,-2.735175438265397 -1.7693358069404994,-2.7210518966070625 -1.741435785931271,-2.699001560850286 -1.7192621914030142,-2.6711807015790856 -1.7049833472375313,-2.639991350383829 -1.6999950537374091,-2.5399913503838287 -1.6999950537374091)");
    Geometry g8 = wkt
        .read("LINESTRING(-2.5399913503838287 -1.6999950537374091,-1.9399918576928132 -1.6999950537374091,-1.9399918576928132 -0.9999955610463935,-1.939954338940824 -0.9999955610463935)");
    Geometry g9 = wkt
        .read("LINESTRING(-1.939954338940824 -0.9999955610463935,-1.9351759455743818 -0.9693363142494836,-1.9210524039160468 -0.9414362932402554,-1.8990020681592708 -0.9192626987119985,-1.87118120888807 -0.9049838545465156,-1.8399918576928131 -0.8999955610463936,-1.8091053056829198 -0.9048849890528441,-1.781239105121424 -0.9190751429475903,-1.7591182516375001 -0.941178388013256,-1.7449059116421661 -0.9690332797406911,-1.7399918893996298 -0.9999159283753202,-1.7400044304807292 -0.9999955610463935,-1.739991857692813 -0.9999955610463935,-1.739991857692813 -1.7999950537374092,-1.7400044304807296 -1.79999505373741,-1.7448567200694303 -1.8308058568652084,-1.7590246788650967 -1.8586833485897951,-1.7811103014960337 -1.8808217964643401,-1.8089538667256089 -1.8950563135477008,-1.8398325924011645 -1.8999949269101633,-1.8399918576928131 -1.8999699747124394,-1.8399918576928131 -1.8999950537374093,-2.639991350383829 -1.8999950537374093,-2.639991350383829 -1.8999699747124392,-2.6707263850912843 -1.8951546966619783,-2.6986151503008315 -1.881008941949809)");
    Geometry g10 = wkt
        .read("LINESTRING(-2.6986151503008315 -1.881008941949809,-2.7207711785272037 -1.8589409557588967)");

    // geoms.add(g1);
    // geoms.add(g2);
    geoms.add(g3);
    //
    // geoms.add(g4);
    // geoms.add(g5);
    // geoms.add(g6);
    // geoms.add(g7);
    // geoms.add(g8);
    // geoms.add(g9);
    // geoms.add(g10);
  }
}
TOP

Related Classes of chunmap.example.test.GeometryTest

TOP
Copyright © 2018 www.massapi.com. 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.