Examples of newSpatialContext()


Examples of com.spatial4j.core.context.jts.JtsSpatialContextFactory.newSpatialContext()

    //Fiji is a group of islands crossing the dateline.
    String wktStr = readFirstLineFromRsrc("/fiji.wkt.txt");

    JtsSpatialContextFactory factory = new JtsSpatialContextFactory();
    factory.normWrapLongitude = true;
    JtsSpatialContext ctx = factory.newSpatialContext();

    Shape shape = ctx.readShapeFromWkt(wktStr);

    assertRelation(null,SpatialRelation.CONTAINS, shape,
            ctx.makePoint(-179.99,-16.9));
View Full Code Here
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.