Examples of makePoint()


Examples of com.spatial4j.core.context.SpatialContext.makePoint()

  @Test
  public void testNGramPrefixGridLosAngeles() throws IOException {
    SpatialContext ctx = SpatialContext.GEO;
    TermQueryPrefixTreeStrategy prefixGridStrategy = new TermQueryPrefixTreeStrategy(new QuadPrefixTree(ctx), "geo");

    Shape point = ctx.makePoint(-118.243680, 34.052230);

    Document losAngeles = new Document();
    losAngeles.add(new StringField("name", "Los Angeles", Field.Store.YES));
    for (IndexableField field : prefixGridStrategy.createIndexableFields(point)) {
      losAngeles.add(field);
View Full Code Here

Examples of com.spatial4j.core.context.SpatialContext.makePoint()

  @Test
  public void testNGramPrefixGridLosAngeles() throws IOException {
    SpatialContext ctx = SpatialContext.GEO;
    TermQueryPrefixTreeStrategy prefixGridStrategy = new TermQueryPrefixTreeStrategy(new QuadPrefixTree(ctx), "geo");

    Shape point = ctx.makePoint(-118.243680, 34.052230);

    Document losAngeles = new Document();
    losAngeles.add(new StringField("name", "Los Angeles", Field.Store.YES));
    for (IndexableField field : prefixGridStrategy.createIndexableFields(point)) {
      losAngeles.add(field);
View Full Code Here

Examples of com.spatial4j.core.context.jts.JtsSpatialContext.makePoint()

    JtsSpatialContext ctx = factory.newSpatialContext();

    Shape shape = ctx.readShapeFromWkt(wktStr);

    assertRelation(null,SpatialRelation.CONTAINS, shape,
            ctx.makePoint(-179.99,-16.9));
    assertRelation(null,SpatialRelation.CONTAINS, shape,
            ctx.makePoint(+179.99,-16.9));
    assertTrue(shape.getBoundingBox().getWidth() < 5);//smart bbox
    System.out.println("Fiji Area: "+shape.getArea(ctx));
  }
View Full Code Here

Examples of com.spatial4j.core.context.jts.JtsSpatialContext.makePoint()

    Shape shape = ctx.readShapeFromWkt(wktStr);

    assertRelation(null,SpatialRelation.CONTAINS, shape,
            ctx.makePoint(-179.99,-16.9));
    assertRelation(null,SpatialRelation.CONTAINS, shape,
            ctx.makePoint(+179.99,-16.9));
    assertTrue(shape.getBoundingBox().getWidth() < 5);//smart bbox
    System.out.println("Fiji Area: "+shape.getArea(ctx));
  }

  private String readFirstLineFromRsrc(String wktRsrcPath) throws IOException {
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.